lkml.org 
[lkml]   [1999]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Ext2 defragmentation
Date
On Wed, 17 Nov 1999 18:37:18 +0100, you wrote:

> TenThumbs wrote:
> [about find /]
> > I tried this with a 1G FAT16 partition and a 1G ext2 partition on IDE
> > drives. While find on the FAT fs is faster than on the ext2 fs (the
> > first time as well as subsequent times), the difference seems to be
> > that ext2 is modifying access times and that data is being
> > rewritten. The 2.2.12 kernel does this sub-optimally. Actually, it
> > stinks. The head scurrying all over the disk makes a very disturbing
> > sound.
>
> It is mostly due to ext2's directory block allocation policy. Files are
> allocated close together if they're in the same directory, but
> directories are spread more or less randomly over the disk. I have a
> program called "treescan" which tries to read in a better order. It's
> faster but you still hear a lot of head activity. It's not particularly
> random -- it seems even small seeks are noisy.
>

True, but I don't think it's really the fs's job to worry about disk position.
If the kernel did a better job of scheduling writes this wouldn't be a
problem.

> > I would think that optimizing disk writes would make most of the
> > difference go away.
>
> The writes makes some difference: the inodes do seem to get written back
> in a bad order. You can see how much improvement is possible here by
> mounting with `nodiratime'.
>
> With 2.3.26 the inode write-backs don't seem so significant. (That's
> 100% subjective and unscientific).
>
> -- Jamie

My mount doesn't seem to know about nodiratime but it did buy noatime and that
made all the nasty seeking go away at the end. In any event, find is probably
the major culprit. Du is a lot quieter and it also walks the directory tree.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.042 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site