Disk defragmenter in Linux
fc-cornette at insight.rr.com
Fri Dec 30 03:49:31 UTC 2005
John Summerfied wrote:
> Jeff Vian wrote:
>> Exactly, and IIRC the filesystem knows that if it needs X amount of
>> space for a file, then Y number of inodes are marked for use for that
>> file at the beginning. Thus space allocated is as contiguous as is
>> efficient for read/write on the disk.
> If "the filesystem knows that if it needs X amount of space for a
> file," that implies there's a way of telling it that.
> How's that done? I don't recall any system call for *x (there is one
> for OS/2), and one could do it in JCL in IBM's OS in the 60s), but in
> the *x world I've never seen a way to do it.
Since the discussions regarding fragmentation on ext3 filesystems was
pretty long running. I decided to try
filefrag /usr/bin/* |sort |grep 'would be'
and the output showed a lot of fragmentation. One of the files was up to 45.
/usr/bin/postgres: 45 extents found, perfection would be 1 extent
I outputted the findings to a file which ended up being around 75 kb
The log files didn't seems to be as fragmented as I expected. Another
pecularity was that some of the files did not seem to be things that I
Another excerpt from the query.
/usr/bin/php: 52 extents found, perfection would be 1 extent
/usr/bin/php-cgi: 62 extents found, perfection would be 1 extent
My system is running development. This of course means frequently
updated programs. Checking usr/lib showed fragmentation also.
/usr/lib/libXm.so.4: 48 extents found, perfection would be 1 extent
/usr/lib/libXm.so.4.0.0: 48 extents found, perfection would be 1 extent
/usr/lib/libxvidcore.so.4: 49 extents found, perfection would be 1 extent
I guess fragmentation is present on the system and probably needs
addressed or a less fragmented filesystem type needs implemented.
More information about the fedora-list