no "defrag" in Linux?
Paul Puschmann
lnx at uzulabs.net
Fri Jul 21 07:57:03 UTC 2006
Peter Garrett <peter.garrett at optusnet.com.au> schrieb am Fri, Jul 21, 2006 at 02:31:56PM +1000:
> 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
Perhaps your files is now located on the outer areas of your harddisk
where the datarate is lower. But this is only speculation.
It could also be that there were some other process running, like
slocate / updatedb or whatever.
Paul
--
: Please answer below the quote, use a realname and
: use plain-text (no HTML).
: Thank you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060721/fadd8ef5/attachment.sig>
More information about the ubuntu-users
mailing list