[NTLUG:Discuss] Is there a disk defragmenter for Linux

Bug Hunter bughuntr at one.ctelcom.net
Sat Dec 21 19:28:11 CST 2002


  As I understand it, the way ext2 algorithms reuse best fit sectors 
whenever possible keeps file fragmentation way down.

  However, the disk can become fragmented.  I've heard of some 
"defragmenting" programs that simply copy a file and then delete the old 
file name and rename the new file.  During this process, which assumes 
relatively unfragmented free space is the only space available, the files 
become less fragmented, naturally.

  This is only of a concern when you are doing a lot of disk i/o on very 
large (or very fragmented) files. It can slow things down horribly.  The 
Gnome/KDE desktop can see the effect of this fairly easily.

  On a side note, I've read about the new 2.6 kernel coming out.  It has 
several features I find quite interesting:

  1) Write requests to disk are starved for cpu execution time if read 
requests from disk exist.

  2) The kernel is now pre-emptible.  It can interrupt itself (which 
allows the #1 feature to be implemented).

  Together, these two features will make your desktop experience really 
feel good.   I'm not so sure if it will do  well on a busy web server that 
does as much writing as reading.  That will remain to be seen.  I think we 
really need some new hard drive technology.

  The new Intel P4 dual threading feature they finally let out of the bag 
offers more possibilities for a snappy machine.  I'm looking forward to 
that one being exploited by linux.

rambling,
bug


On 21 Dec 2002, Rev. wRy wrote:

> On Sat, 2002-12-21 at 16:03, Steve Baker wrote:
> > Kipton Moravec wrote:
> > > Coming from a MS background, I always run the disk defragmenter once a week.
> > > 
> > > Is there one for Linux?  What should I look for?  Is it needed?
> > 
> > No - only crappy OS's need to have their disks defragged.
> 
> Can you expand on this for a moment?  It's a critical difference between M$ 
> and Linux, and I've yet to stumble across anything other than one line answers
> to the question that say any more than what you've written.  Yes, I've looked
> at the LDP howto on filesystems.  I've googled (although perhaps on the wrong
> subjects).  I've taken various classes on *nix, but I've yet to see this
> explained.
> 
> So how exactly does *nix write data to a hard drive that eliminates the need 
> for a defrag?  And why is there fsck if there is no need for a defrag?
> 
> Obviously Linux requires a different way of thinking than does M$, but I don't see how 
> saying "Crap OS'es need a defrag, Linux doesn't" explains what's going on under the
> hood, and often times with Linux, knowing what goes on under the hood is half the battle
> won.
> 
> 
> Ry
> (sorry if that sounded flamey Steve, wasn't meant to be.)

-- 
---------------------------------
Sick and tired of spam?
Ask me about Mail Deflector!
http://www.maildeflector.com
---------------------------------





More information about the Discuss mailing list