Re: atomicity

tytso@mit.edu
Tue, 8 Dec 1998 16:39:38 -0500


Date: Mon, 7 Dec 1998 02:42:05 -0800 (PST)
From: Tracy R Reed <treed@ultraviolet.org>

> With ext2fs you should never need a defragmenter

What does this mean? Is 22.4 % insignificant or should I be worried?

/dev/md1: 2407/78624 files (22.4% non-contiguous), 185079/313260 blocks

A high non-contiguous percentage doesn't necessary mean that your
filesystem is highly fragmented. Files which are larger than the
maximum number of data blocks available in a block group are guaranteed
to be non-contiguous, by the very nature of the ext2 filesystem.

Hence, I was very hesitant when I included that metric in e2fsck, since
it could be very easily misused and misunderstood. The problem is that
doing a better metric is rather difficult.

So for example, in the above example, there are 2407 files taking up 185
megabytes, for an average size of 77k a file. Given that there is
usually a large number of small files (i.e., less than 10k), there is
likely a goodly number of large files which are much more likely to
overflow the confines of the block group and thus get counted as a
"non-contiguous" file. But more simply, there's a big difference
between a file which has the following allocation pattern:

Blocks 10-8191, 8202-6000

and ....

Blocks 10-20, 30-56, 60, 64-66, 100-140, 142-143, 150-200, ....

Both of the above two files are counted as a single "non-contiguous"
file. But obviously, there's a very big difference as to the
fragmentation of that particular file.

- Ted

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