Paul Hartman wrote: > On Wed, Sep 5, 2012 at 1:02 PM, Dale <[email protected]> wrote: >> >> I have to say that here, it is not a whole lot of fragmentation but it >> does seem a bit faster afterwards. I guess it depends on what is >> fragmented and such. I sometimes wonder if it defrags itself. Even >> when I watch the fsck when booting, all the ext4 partitions have a very >> small percentage of fragmentation. My /boot which is ext2 is fragmented >> as heck. lol I'm not worried about it tho. ;-) When I was using >> reiserfs, it was always a good bit of fragmentation. >> >> Just thought it was worth a mention since this is the first time I saw a >> Linux defrag tool. > I think almost all linux defrag tools/techniques deal with file > fragmentation only, that is to say one file with more than 1 extent, > but don't deal with filesystem fragmentation (10000 small files > scattered all over the drive, rather than written contiguously). So > I'm not surprised that Peter did not see fragmentation after > installing KDE. > > AFAIK almost all that modern defrag tools do is just copy the file, > allocating the whole file at once in the copy process, and if that new > copy has fewer extents than the old copy, it fills in the data, then > removes the original file. The concept is not entirely dissimilar to > the old "backup, format, restore" defrag process. > > Over the years I have used a poor-man's version of that concept to > defrag files. Just move it to another drive (or -- even better -- a > ramdrive/tmpfs), then move it back to disk (with a tool that performs > preallocation). > > There is a userland defrag tool that does exactly this, on any > filesystem. It is called "shake". > > Typically I only see fragmentation on large files that were copied > from a slow source (over the network/internet), or bittorrent clients > that do not preallocate space, etc. Any kind of streaming file that > was written, huge multi-gigabyte video recording files, that kind of > stuff. But the key to avoiding file fragmentation is preallocation... > >
I used shake before but it just didn't seem to work right for me. I found a script that does something and it seems to work for the most part but still not great or anything. I just like the way ext4 works. Heck, I liked it before I found the defrag tool. I've had this install for a while and it has never had much fragmentation even before the tool. So, I find it funny that they make a tool that really isn't needed very much. :/ Dale :-) :-) -- I am only responsible for what I said ... Not for what you understood or how you interpreted my words!

