no "defrag" in Linux?
Peter Garrett
peter.garrett at optusnet.com.au
Fri Jul 21 04:31:56 UTC 2006
On Thu, 20 Jul 2006 15:34:47 -0700
"Henk Postma" <henkpm at gmail.com> wrote:
[snip]
> 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
Tried it on the "Elephant's Dream" movie ( ED_1024.avi)
$ du -h ED_1024.avi
426M ED_1024.avi
$ sudo filefrag ED_1024.avi
ED_1024.avi: 294 extents found, perfection would be 4 extents
$ time cat ED_1024.avi > /dev/null
real 0m11.178s
user 0m0.052s
sys 0m1.056s
$ cp ED_1024.avi ED_1024-new.avi
$ sudo filefrag ED_1024-new.avi
ED_1024-new.avi: 103 extents found, perfection would be 4 extents
$ time cat ED_1024-new.avi > /dev/null
real 0m11.470s
user 0m0.060s
sys 0m1.156s
OK, it seems to be less fragmented, but if anything it takes *longer* to
cat it to /dev/null ( or about the same - although doing it several
times, each time the new file took longer)
Did I miss something ?
Peter
More information about the ubuntu-users
mailing list