no "defrag" in Linux?

James Gray james at grayonline.id.au
Tue Jul 18 05:58:33 UTC 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peter Clutton wrote:
> ext3 is better than windows file systems like fat and ntfs, it is soo
> unlikely you would reach more then 0.1 percent fragmented.

I agree - defragmenting ext2/3 is more a waste of time than anything
else, but I have to challenge your assertion that >0.1% fragmentation is
highly unlikely.  I've been running Linux both in the server room and on
desktops since the mid-90's.  It's not uncommon for ext2/3 (or
jfs/xfs/reiserfs too) to be between 5-10% fragmented.  However, this
amount of fragmentation on these file systems, coupled with the way the
Linux kernel uses buffers and caching for disk access, results in no
appreciable reduction in performance.

I've only occasionally seen more than 10% fragmentation and that was on
extremely small and busy partitions (like 100MB /temp partitions).  As
the partitions were small, it's pretty easy to drop to single user mode,
tar up the partition to /somewhere/else then reformat the partition and
untar the files back where they came from.  Back into run level 3 and
/temp is 0% fragmented.  Voila.

Using /temp as an example is rather trivial but highlights the
conditions required to cause significant fragmentation:
1. small partition.
2. lots of files being created/deleted with varying sizes.
3. a lot of time.

Cheers,

James
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEvHiJwBHpdJO7b9ERAqK+AKDC3a49T8hxhF911No0sxNK+BmUcgCgutvM
5ThxzBJatNg2H5aiceYacII=
=UUXX
-----END PGP SIGNATURE-----





More information about the ubuntu-users mailing list