Re: Ext2 defragmentation

Randall R Schulz (rrschulz@cris.com)
Sun, 14 Nov 1999 12:19:25 -0800


Hello,

If the fragmentation number (say, 17.4%) is a statement of how many
files are not fully contiguous, it's not really telling you much.
E.g., it doesn't tell you how many fragments are typically occupied
by non-contiguous files or whether it's occurring to small files as
well as large ones.

If we knew some more detailed statistics about the number of
fragments into which the files are broken and how fragment counts are
distributed over different file sizes, it would help. It might also
be useful to know about internal fragmentation (space wasted due to
minimum allocation increments).

With some of these more detailed statistics, it might be possible to
optimize a file system by re-creating it (via: "dump; mke2fs
-better_parameters; restore") after it had been in use long enough
for the statistics to be representative of file sizes and growth
patterns.

Presumably adding some more detailed statistical output to e2fsck
wouldn't be too difficult?

Sorry, though, I'm not volunteering. I have neither the ext2
knowledge nor the time to implement this suggestion.

Randy Schulz
Mountain View, CA USA

>Jeff Garzik wrote:
> > Of course, since ext2 is resistent to fragmentation, it is questionable
>
>Is it?
>I do not really call 17.4% relatively unfragmented :)
>(/dev/hdb1: 16597/1024000 files (17.4% non-contiguous), 580761/1024001
>blocks)
>
> > how worthwhile this is... defragging will affect different situations in
> > different ways, so you won't know how effective it is until you
> > benchmark it.
>
>That is true.
>
>Folkert van Heusden

-
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/