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

Re: how to counteract slowdown



On Monday November 12, pernzer redhat com wrote:
> Hello,
> 
> as far as I understood ext3 will more or less hog a machine when writing 
> away the journal. A customer is having a slowdown every 5 minues for about 
> 30 seconds, the machine becomes more or less unusable.
> 
> This is an NFS server serving 300 Gigs spread over 2 NFS shares.
> 
> I'm wondering what would be the best course of action:
>   a) make the journal bigger?
>   b) make the journal smaller?
>   c) switch from ordered to writeback?
> 
> Can somebody give me a hint?

I've seen something a lot like this.

I export with "sync" (because it is the safe thing to do) and with
"no_wdelay" (because that is nicer to ext3) and mount with
"data=journal" because that is nicer for sync-writes.

Under heavy NFS load, I get pauses of a few seconds every few minutes.
If I
   echo 40 0 0 0 60 300 60 0 0 > /proc/sys/vm/bdflush

the problem goes away.

What I *think* is happening is that the journal fills up before
bdflush flushs the data to it's rightful home.  When this happens,
ext3 blocks while it forces this data out to disk so that it can make
more room in the journal.
What ext3 *should* do is start pushing data out when the journal gets
X% full for some value of X like 50 or 75.

This may or may not be related to your problem, depending on what
export and mount options you are using.

The 5 minutes sounds like the journal commit interval.  It's probably
a long shot, but might you have a heavily fragmented journal?
use "debugfs" to find the inode number of the journal, and then
  stat <inode>
to find where the blocks are.  If they are all over the place, then
sequential journal writes might not be fast.

NeilBrown





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