All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: xfs@oss.sgi.com
Subject: Re: long hangs when deleting large directories (3.0-rc3)
Date: Thu, 30 Jun 2011 09:53:23 +1000	[thread overview]
Message-ID: <20110629235323.GT561@dastard> (raw)
In-Reply-To: <20110629124814.GA1762@x4.trippels.de>

On Wed, Jun 29, 2011 at 02:48:14PM +0200, Markus Trippelsdorf wrote:
> On 2011.06.29 at 22:10 +1000, Dave Chinner wrote:
> > On Wed, Jun 29, 2011 at 09:41:27AM +0200, Markus Trippelsdorf wrote:
> > > On 2011.06.29 at 17:24 +1000, Dave Chinner wrote:
> > > > On Wed, Jun 29, 2011 at 08:19:54AM +0200, Markus Trippelsdorf wrote:
> > > > > On 2011.06.29 at 14:31 +1000, Dave Chinner wrote:
> > > > > > On Wed, Jun 22, 2011 at 05:30:47PM +1000, Dave Chinner wrote:
> > > > > > > Jun 22 08:53:09 x4 kernel: XFS (sdb1): ail: ooo splice, tail 0x12000156e7, item 0x12000156e6
> > > > > > > Jun 22 08:53:09 x4 kernel: XFS (sdb1): ail: ooo splice, walked 15503 items      
> > > > > > > .....
> > > > > > > Jun 22 08:53:12 x4 kernel: XFS (sdb1): ail: ooo splice, tail 0x12000156e7, item 0x12000156e6
> > > > > > > Jun 22 08:53:12 x4 kernel: XFS (sdb1): ail: ooo splice, walked 16945 items
> > > > > > > 
> > > > > > > Interesting is the LSN of the tail - it's only one sector further on
> > > > > > > than the items being inserted. That's what I'd expect from a commit
> > > > > > > record write race between two checkpoints. I'll have a deeper look
> > > > > > > into whether this can be avoided later tonight and also whether I
> > > > > > > can easily implement a "last insert cursor" easily so subsequent
> > > > > > > inserts at the same LSN avoid the walk....
> > > > > > 
> > > > > > Ok, so here's a patch that does just this. I should probably also do
> > > > > > a little bit of cleanup on the cursor code as well, but this avoids
> > > > > > the repeated walks of the AIL to find the insert position.
> > > > > > 
> > > > > > Can you try it without the WQ changes you made, Marcus, and see if
> > > > > > the interactivity problems go away?
> > > > > 
> > > > > Sorry to be the bringer of bad news, but this made things much worse:
....
> > > > > As you can see in the table above (resolution 1sec) the hang is now
> > > > > 5-6 seconds long, instead of the 1-3 seconds seen before.
> > > > 
> > > > Interesting. I checked that the ordering was correct in each case
> > > > adn that it was behaving correctly here.
> > > > 
> > > > Can you add the following patch and send me the dmesg output over a
> > > > hang? It will tell me where the cursor is being initialised and when
> > > > it is being dropped, so should indicate if a specific insert chain
> > > > is getting stuck or doing something stoopid.
> > > 
> > > The kernel log is attached.
> > > rm -fr && sync starts at Jun 29 09:32:24.
> > 
> > Add this patch on top of the first one I sent. If it doesn't fix the
> > problem, can you readd the debug patch and send the log again?
> 
> This completely fixes the issue. As a bonus "rm -fr && sync" completes
> much quicker now.

Great to hear the hang has gone away.

I'm also seeing performance improvements on unlink workloads with
these two patches - quite significant, too. Cold cache parallel rm
-rf tests over tens of millions of inodes are finishing 15-20%
faster. Hot cache parallel rm -rf now go to being CPU bound on a
8p system with the unlink rate improving by about 50%....

As I always say, the hardest part of fixing a bug is getting a
reproducable test case to analyse and test. Thank's for providing
the test case and the testing, Markus!

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  parent reply	other threads:[~2011-06-29 23:53 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-18 14:19 long hangs when deleting large directories (3.0-rc3) Markus Trippelsdorf
2011-06-18 14:24 ` Christoph Hellwig
2011-06-18 14:37   ` Markus Trippelsdorf
2011-06-19  8:16     ` Markus Trippelsdorf
2011-06-19 22:24 ` Dave Chinner
2011-06-20  0:54   ` Markus Trippelsdorf
2011-06-20  1:34     ` Dave Chinner
2011-06-20  2:02       ` Markus Trippelsdorf
2011-06-20  2:36         ` Dave Chinner
2011-06-20  6:03           ` Markus Trippelsdorf
2011-06-20 11:13             ` Markus Trippelsdorf
2011-06-20 11:45               ` Michael Monnerie
2011-06-20 12:31                 ` Markus Trippelsdorf
2011-06-20 21:16                   ` Markus Trippelsdorf
2011-06-21  4:25               ` Dave Chinner
2011-06-21  8:02                 ` Markus Trippelsdorf
2011-06-21 18:24                   ` Markus Trippelsdorf
2011-06-21 18:57                     ` Markus Trippelsdorf
2011-06-21 21:22                       ` Markus Trippelsdorf
2011-06-22  0:04                       ` Dave Chinner
2011-06-22  7:06                         ` Markus Trippelsdorf
2011-06-22  7:30                           ` Dave Chinner
2011-06-22  7:40                             ` Markus Trippelsdorf
2011-06-29  4:31                             ` Dave Chinner
2011-06-29  6:19                               ` Markus Trippelsdorf
2011-06-29  7:24                                 ` Dave Chinner
2011-06-29  7:41                                   ` Markus Trippelsdorf
2011-06-29 12:10                                     ` Dave Chinner
2011-06-29 12:48                                       ` Markus Trippelsdorf
2011-06-29 15:08                                         ` Michael Weissenbacher
2011-06-29 23:53                                         ` Dave Chinner [this message]
2011-06-21 10:18                 ` Markus Trippelsdorf
2011-06-21 10:40                   ` Markus Trippelsdorf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110629235323.GT561@dastard \
    --to=david@fromorbit.com \
    --cc=markus@trippelsdorf.de \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.