[wplug] File systems and Defrag

Mark Dalrymple wplug at badgertronics.com
Thu Sep 16 18:00:14 EDT 2004


> The meat of the conversation revolved around why
> Microsoft's OS all have file systems that need defragmenter and how come
> *nix file systems do not.  From what I've read it is not so much that
> *nix file systems do not fragment, but that they are virtually
> unaffected by this fragmentation.

it's some of both.  Like HFS+ support on Mac OS X in newer revisions
takes a proactive stance on fragmentation:

http://www.kernelthread.com/mac/apme/fragmentation/

especially on-the-fly defragmentation.  It amortizes the defragmentation
cost amongst lots of file openings.

Unix file systems also don't grind to a halt when the do encounter
fragmentation:

http://cbbrowne.com/info/defrag.html

If you're interested in file systems, check out Dominic Giampaolo's
(who did the Be file system, and a lot of the new, cool stuff being
dome with HFS+ on the Mac side like Spotlight) book, "Practical File
System design with the Be File System" There's 41 references to
'fragment' which might shed some light, as well as references to the
BSD FFS and Linux ext2.  I found it a fascinating read, but then I'm
pretty geeky.  The light turned on for me on how journaled file
systems work when reading this book.

Here's his page:
http://www.nobius.org/~dbg/

Cheers,
++Mark Dalrymple.  markd at badgertronics.com.  http://badgertronics.com
  "In the old days, accidentally introducing an O(N**2) (or worse)
   algorithm into your code would be something you'd notice immediately.
   But nowadays, machines are so bloody fast that this can be easily
   overlooked."
    -- Ben Haller


More information about the wplug mailing list