no "defrag" in Linux?

Gabriel M Dragffy dragffy at yandex.ru
Fri Jul 21 10:46:18 UTC 2006


It may be that the new file you created is located on a different area
of the physical disc. If it's nearer the centre then performance may
degrade and towards the edges of the platter performance will increase.


On Fri, 2006-07-21 at 14:31 +1000, Peter Garrett wrote:

> 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
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060721/92f6f095/attachment.html>


More information about the ubuntu-users mailing list