On Tue, Jun 13, 2000 at 06:50:18PM -0500, Ron Johnson, Jr. wrote:
> > > Could any body know there is any utility like Defrag under Windows for
> > > optimization of Hard disk in Mandrake 6.0 or RPM in higher version?
> >
> > No, the Linux file system is designed properly, so there's no need.
>
> What does "(ext2) is designed properly, so there's no need" mean?
>
> No filesystem can be designed to eliminate fragmentation. If
> you are constantly "churning" on your disk, especially if your
> disk is > 80% full, it *will* become fragged.
>
> Of course, high speed disks, high speed CPUs and lots of RAM
> for cache will minimize fragmentation's effect...
>
> Of course, since I have high speed disks, high speed CPUs and
> lots of RAM for cache, and the disks are < 80% full, and I
> don't "churning" on my disks, I don't defrag my disks.
>
That's only partially the truth. It is true that fragmentation can
not be avoided (especially in the extreme cases you describe), but
the way ext2 handles fragmentation is better than for other file
systems (well, at least some of them, i don't know about all the
fs...). The ext2 fs is designed to keep a list of all empty blocks
on the hd. When some blocks are needed to write a file, ext2 look
at his list and find *contiguous* free blocks to handle the write
(if those blocks exist, at least). The fat fs by opposition writes
the file in the first free blocks it encounters. So fragmentation
can be held at a lower rate with ext2.
Of course, as i'm not a specialist in fs, this story must only be
a small part of the truth. There is an interesting article on the
net by Roberto Di Cosmo who deals (among other things) about fs and
fragmentation. You can find the english version at :
http://www.pps.jussieu.fr/~dicosmo/Piege/PiegeEN.html
Hope this helps :-)
Pascal Gross�