public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* xfs: very slow after mount, very slow at umount
@ 2011-01-27  1:22 Mark Lord
  2011-01-27  1:43 ` Mark Lord
  2011-01-27  3:30 ` Dave Chinner
  0 siblings, 2 replies; 35+ messages in thread
From: Mark Lord @ 2011-01-27  1:22 UTC (permalink / raw)
  To: Christoph Hellwig, Alex Elder, Linux Kernel

Alex / Christoph,

My mythtv box here uses XFS on a 2TB drive for storing recordings and videos.
It is behaving rather strangely though, and has gotten worse recently.
Here is what I see happening:

The drive mounts fine at boot, but the very first attempt to write a new file
to the filesystem suffers from a very very long pause, 30-60 seconds, during which
time the disk activity light is fully "on".

This happens only on the first new file write after mounting.
>From then on, the filesystem is fast and responsive as expected.
If I umount the filesystem, and then mount it again,
the exact same behaviour can be observed.

This of course screws up mythtv, as it causes me to lose the first 30-60
seconds of the first recording it attempts after booting.  So as a workaround
I now have a startup script to create, sync, and delete a 64MB file before
starting mythtv.  This still takes 30-60 seconds, but it all happens and
finishes before mythtv has a real-time need to write to the filesystem.

The 2TB drive is fine -- zero errors, no events in the SMART logs,
and I've disabled the silly WD head-unload logic on it.

What's happening here?  Why the big long burst of activity?
I've only just noticed this behaviour in the past few weeks,
running 2.6.35 and more recently 2.6.37.

* * *

The other issue is something I notice at umount time.
I have a second big drive used as a backup device for the drive discussed above.
I use "mirrordir" (similar to rsync) to clone directories/files from the main
drive to the backup drive.  After mirrordir finishes, I then "umount /backup".
The umount promptly hangs, disk light on solid, for 30-60 seconds, then finishes.

If I type "sync" just before doing the umount, sync takes about 1 second,
and the umount finishes instantly.

Huh? What's happening there?

System is running 2.6.37 from kernel.org, but similar behaviour
has been there under 2.6.35 and 2.6.34.  Dunno about earlier.

I can query any info you need from the filesystem.

Thanks
-ml

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2011-01-31 19:17 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-27  1:22 xfs: very slow after mount, very slow at umount Mark Lord
2011-01-27  1:43 ` Mark Lord
2011-01-27  3:43   ` Dave Chinner
2011-01-27  3:53     ` Mark Lord
2011-01-27  4:54       ` Mark Lord
2011-01-27 23:34       ` Dave Chinner
2011-01-27  3:30 ` Dave Chinner
2011-01-27  3:49   ` Mark Lord
2011-01-27 15:12     ` Mark Lord
2011-01-27 15:40       ` Justin Piszcz
2011-01-27 16:03         ` Mark Lord
2011-01-27 19:40           ` Stan Hoeppner
2011-01-27 20:11             ` david
2011-01-27 23:53               ` Stan Hoeppner
2011-01-28  2:09                 ` david
2011-01-28 13:56                   ` Dave Chinner
2011-01-28 19:26                     ` david
2011-01-29  5:40                       ` Dave Chinner
2011-01-29  6:08                         ` david
2011-01-29  7:35                           ` Dave Chinner
2011-01-31 19:17                             ` Christoph Hellwig
2011-01-27 21:56             ` Mark Lord
2011-01-28  0:17               ` Dave Chinner
2011-01-28  1:22                 ` Mark Lord
2011-01-28  1:36                   ` Mark Lord
2011-01-28  4:14                   ` David Rees
2011-01-28 14:22                     ` Mark Lord
2011-01-28  7:31                   ` Dave Chinner
2011-01-28 14:33                     ` Mark Lord
2011-01-28 23:58                       ` Dave Chinner
2011-01-28 19:18             ` Martin Steigerwald
2011-01-27 20:24           ` John Stoffel
2011-01-27 23:41       ` Dave Chinner
2011-01-28  0:59         ` Mark Lord
2011-01-27 23:39     ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox