[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Performance problem with mysql on a 3ware 1+0 raid array

Heh... that's funny.  That last message stopped at a lone period on the line.  
:o)  Here's the actual message.

Hi Neil,

I have a question regarding your bdflush settings.  The kernel docs say the 

Table 2-2: Parameters in /proc/sys/vm/bdflush
 Value      Meaning
 nfract     Percentage of buffer cache dirty to  activate bdflush
 ndirty     Maximum number of dirty blocks to  write out per wake-cycle
 nrefill    Number of clean buffers to try to obtain  each time we call refill
 nref_dirt  buffer threshold for activating bdflush when trying to refill
 dummy      Unused
 age_buffer Time for normal buffer to age before we flush it
 age_super  Time for superblock to age before we flush it
 dummy      Unused
 dummy      Unused

"The 5th and 6th numbers are significant."
 -Is that really the case?  Above, the 5th isn't even used.

age_buffer and age_super

Finally, the age_buffer and age_super parameters govern the maximum time Linux
waits before  writing  out  a  dirty buffer to disk. The value is expressed in
jiffies (clockticks),  the  number of jiffies per second is 100. Age_buffer is
the maximum age for data blocks, while age_super is for filesystems meta data.

Could you explain how the "every 5 seconds it flushs data older than 30 
seconds" works?  I just don't get that from what the docs say.  I'm just 
somewhat confused now.



On Friday 02 May 2003 12:55 am, Neil Brown wrote:
> On Friday May 2, cchan outblaze com wrote:
> > Hi all,
> >
> > We are observing a consistent interval of about 4 minutes at which there
> > are large sustained writes to disk that causes mysqld to block and not
> > respond for the entire period.
> >
> > We are using data=journal with a 128M journal and the filesystem is
> > 150GB in size.
> Yep.  This is due to some lazy code in ext3.
> If the journal fills up, then it flushes the whole journal before
> continuing.
> There are three ways to get around this problem.
>  1/ fix the code :-)
>  2/ use a bigger journal.  There is a drawback with bigger journals
>    though as replay after a crash will take longer.
>  3/ Push the bdflush parameters down so that data in the journal will
>     be flushed out more often and the journal will not get full.
>    Something like:
>         echo 40 0 0 0 60 300 60 0 0 > /proc/sys/vm/bdflush
>     The 5th and 6th numbers are significant.
>     The defaults are 500 and 3000 (hundreths of a second) so
>     every 5 seconds it flushs data older than 30 seconds.  If your
>     journal cannot hold 30 seconds of data, this is a problem.
>     So drop the 3000 to maybe 300 or 500 (3 or 5 seconds) and then
>     drop the 500 to a reasonable fraction of that (50  or so (half a
>     second)).
> 2 and 3 are complimentary.  The bigger the journal, the larger the
> age of flushed buffers can be.
> NeilBrown
> _______________________________________________
> Ext3-users mailing list
> Ext3-users redhat com
> https://listman.redhat.com/mailman/listinfo/ext3-users

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]