no "defrag" in Linux?

Alexander Skwar listen at alexander.skwar.name
Fri Jul 21 05:55:29 UTC 2006


ยท Henk Postma <henkpm at gmail.com>:

> Go ahead and try the following.
> 1) locate a large file (divx movie?).
> 2) sudo filefrag $movie, note the level of fragmentation
> 3) time cat $movie > /dev/null, note the time it took
> 4) now make a copy of the movie:
> cp $movie $movie.new
> 5) sudo filefrag $movie.new Most likely, you will find that it is less
> fragmented
> 6) time cat $movie.new > /dev/null
> 
> I guarantee you will see a big reduction in time it takes to dump the
> file to /dev/null

This test is flawed. You're right, there'll be a big reduction in time,
but how much is this influenced by the fact, that the $movie.new
will/might still be in cache?

To test this a bit more properly, you should reboot before steps
(3) and (6) and you should be in singleuser mode (init S).

Alexander Skwar
-- 
Lieber locker vom Hocker, als hektisch um den Ecktisch.






More information about the ubuntu-users mailing list