Slashdot Mirror


Mac OS X 10.3 Defrags Automatically

EverLurking writes "There is a very interesting discussion over at Ars' Mac Forum about how Mac OS X 10.3 has implemented an on-the-fly defragmentation scheme for files on the hard drive. Apparently it uses a method known as 'Hot-File-Adaptive-Clustering' to consolidate fragmented files that are under 20 MB in size as they are accessed. Source code from the Davwin 7.0 Kernel is cited as proof that this is happening."

4 of 181 comments (clear)

  1. Amortized cost... by Ianoo · · Score: 3, Interesting

    Obviously doing this process slows down file access a little. I wonder whether any safeguards are in place, such as turning the system off after a certain I/O load is reached? If not, this may not be such a good idea.

    Also, I wonder whether if you were to calculate the extra time (perhaps 500ms) to defragment each fragmented 20MB file against doing a manual defrag every month, and whether it's actually worth it...

    Don't some Linux filesystems already do this to some extent? I could be hallucinating again, but I'm sure I read this somewhere.

    1. Re:Amortized cost... by clifyt · · Score: 5, Interesting

      "Drives are defragged to allow the OS to access the files faster."

      Are you so sure?

      I have talked with a senior OS designer (one of the non-free ones) and his view is that these days, defragging does more damage than it saves.

      Why? Drives generally have large caches on them and multiple platters / read heads.

      Noting this, the fastest way to get data off a drive might not be a straight line. Its looks pretty when you run the different utilities and makes the home makers of whom believe everything should be put away neat and tidy, but the engineer had mentioned that being defragged means you loose a lot of advantages of those multiple readheads and cache. He claimed that it was actually better to leave your drive to its own devices, allowing for about 30% free space at all times, and you will see a speedup over a defragged drive.

      I didn't believe it at first, but his arguments did make a lot of sense even though it went against everything I had learned before. He actually mentioned if he had his choice, he'd make certain defraggers would NEVER work, but the market believes that these are necessary so its easier to have these things included as well as supporting third parties, so its there.

  2. Re:In other news.... by squiggleslash · · Score: 3, Interesting
    Er, when you install OS X, you can choose UFS instead of HFS/HFS+. Then you get an old fashioned Unix-style file system. Unfortunately, doing so means that you lose metadata, forks, etc (though the Finder does a sort-of half-arsed job and creates little dot files all over the place to try to at least cover some of the metadata.)

    Me, I'd take the comparatively modern HFS+. I'm still confused as to why metadata isn't being taken seriously by the rest of the computing world.

    --
    You are not alone. This is not normal. None of this is normal.
  3. Re:Necessarily Useless by berniecase · · Score: 3, Interesting

    Fragmentation is a very real problem for people who need lots of contiguous free space, especially those working with multitrack audio and video files. They can't have drive heads searching around a drive for free blocks of space when they could be writing linearly.

    Even with this file defragmenter built-in, a drive defragmenter is still needed for certain types of users.