Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

majordude

macrumors 68020
Original poster
Apr 28, 2007
2,443
75
Hootersville
My friend has Drive Genius and it offers to defrag HDs in OS X. I thought OS X doesn't need to be defragged. :confused:

He has a large external drive that he started defragging last night. This morning we saw it had finished and indeed it "needed" to be defragged. Is this a bunch of crap or have I misunderstood something fundamental about OS X?
 
OSX has on-the-fly defragmenting of files 20MB and below IIRC, but for anything more, I sometimes run iDefrag :)
 
OSX has on-the-fly defragmenting of files 20MB and below IIRC, but for anything more, I sometimes run iDefrag :)

IIRC? Wut dat?

I just visted the iDefrag site and they say that OSX needs to be defragged.
"Some people say that HFS+ is so good that you don’t need to defragment. In a way, they’re right—HFS+ is pretty good at keeping small to medium sized files from getting fragmented… it isn’t particularly good, however, at keeping large files or free space from fragmenting, a particular problem on the Mac because the swapfile must be contiguous on the disk, so you can actually run out of virtual memory long before you run out of disk space if your free space is fragmented."
And Apple adds this...
"You probably won't need to optimize at all if you use Mac OS X. Here's why:
  • Hard disk capacity is generally much greater now than a few years ago. With more free space available, the file system doesn't need to fill up every "nook and cranny." Mac OS Extended formatting (HFS Plus) avoids reusing space from deleted files as much as possible, to avoid prematurely filling small areas of recently-freed space.
  • Mac OS X 10.2 and later includes delayed allocation for Mac OS X Extended-formatted volumes. This allows a number of small allocations to be combined into a single large allocation in one area of the disk.
  • Fragmentation was often caused by continually appending data to existing files, especially with resource forks. With faster hard drives and better caching, as well as the new application packaging format, many applications simply rewrite the entire file each time. Mac OS X 10.3 Panther can also automatically defragment such slow-growing files. This process is sometimes known as "Hot-File-Adaptive-Clustering."
  • Aggressive read-ahead and write-behind caching means that minor fragmentation has less effect on perceived system performance.
For these reasons, there is little benefit to defragmenting."
So who knows for sure. :confused:
 
He's right about it defragging files under 20 mb.

Fortunately, Mac OS X's HFS+ filesystem has some safeguards against avoidable fragmentation. First, the filesystem avoids using space recently freed by recently deleted files whenever possible, looking instead to potentially larger, already free portions of the disk first. Second, Mac OS X 10.2 has a routine that clumps smaller portions of disk space into larger portions on the fly. Finally, Mac OS X 10.3.x can automatically defragment some files through a process called "Hot-File-Adaptive-Clustering." Though these routines have undoubtedly have made consequential fragmentation a less common occurence, their efficacy is not beyond question. First of all, though they can reduce fragmentation of extant files, they can also cause remaining free portions on the disk to become smaller in size, potentially leading to more fragmentation down the road as new files are written. Second, the automatic defragmentation routines will not work on certain files -- specifically those above 20 MB nor those fragmented into 8 or fewer segments.

link
 
Of course iDefrag's site says it's necessary. They're just trying to sell their product. A few members here actually tested the benefits of defragging out a little while ago and some found it to actually slow a system down. I can't find the thread at the moment, but I'm sure it'll pop up. Just trust OSX when it comes to maintenance. Let it do its own thing. :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.