Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Exceptions to HFS not needing defrag?

Yes, I have read the official Apple Support document about why I don't need to defragment my Mac (http://support.apple.com/kb/HT1375). I've also read many third party articles about this. I get it, yet I think I may have a case for an exception:


I work with lots of virtual machines. Now, unless I want to waste time pre-allocating disk space then I have to use dynamically sized disks of 32 or more GB. One of the things that HT1375 says is this:


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."


First of all, I have read that "Hot-File-Adaptive-Clustering" went away in 10.6. Secondly, "simply [rewriting] the entire file each time" isn't going to be a viable option for files that are dozens of GB in size. I also understand that OSX compensates for fragmentation in other ways, such as "read-ahead and write-behind caching". The problem is that the virtual OS does not. I can defragment its virtual hard drive, but that dosn't do a lot of good when the file that *is* the virtual hard drive itself is fragmented.


So let's have it: are there exceptions to the standard answer to defragging a Mac? If so, then can it be done without great difficulty?

MacBook Pro, OS X Mountain Lion (10.8.2)

Posted on Dec 5, 2012 4:43 PM

Reply
11 replies

Dec 5, 2012 5:11 PM in response to steve359

Yes. Time-consuming. Listen (I don't want to sound abrasive, but I must establish my credentials):


1) I have no problem re-installing from scratch at a whim. Anything that I need to keep is either in the cloud or on my employer's backed-up servers (all of which I'm the sysadmin of).


2) I do have the skill. In addition to Time Machine backup/reset/restores, I've worked with Clonezilla, Symantic Ghost, Altiris (before it was Symantec), DiskImage, DriveImageXML, ImgMaker, dd, raw2write, and Disk Nibbler (for those pesky DRM'd Commodore 64 games on 5.25" floppies).


Is there or is there not a Mac or BSD utility/procedure that defragments HFS+ (even if I have to compile it from source, or use DarwinPorts/Fink/Homebrew, or read a man page, or some other such thing)?

Dec 5, 2012 5:14 PM in response to R. Toby Richards

R. Toby Richards wrote:


Yes. Time-consuming. Listen (I don't want to sound abrasive, but I must establish my credentials):


1) I have no problem re-installing from scratch at a whim. Anything that I need to keep is either in the cloud or on my employer's backed-up servers (all of which I'm the sysadmin of).


2) I do have the skill. In addition to Time Machine backup/reset/restores, I've worked with Clonezilla, Symantic Ghost, Altiris (before it was Symantec), DiskImage, DriveImageXML, ImgMaker, dd, raw2write, and Disk Nibbler (for those pesky DRM'd Commodore 64 games on 5.25" floppies).


Is there or is there not a Mac or BSD utility/procedure that defragments HFS+ (even if I have to compile it from source, or use DarwinPorts/Fink/Homebrew, or read a man page, or some other such thing)?

30 minutes to reinstall, maybe 35, that's too long for you .....


Buy iDefrag, like other Mac defrag utilities it is useless, but it's fast at being useless.

Dec 5, 2012 7:55 PM in response to R. Toby Richards

There are no build-in defragmentation utilities. I have read about some 3rd party defragmentation utilities, but I have zero experience with them (try google "Mac defrag"). And because generally Mac OS X general masses do not need, I do not see much discussion about these 3rd party utilities.


The Virtual Machine container file is a good example of where a contiguous file would be beneficial. So are situations were video streaming (or audio) if enough of it is being done, can benefit from contiguous storage. However, these are not really the typical "Mom, Dad, Timmy and Sue" consumer Apple markets to.


There are always exceptions to anything. Apple just tries to make the majority of their users not need to worry about the exceptions.

Dec 5, 2012 8:06 PM in response to R. Toby Richards

Did you save any virgin snapshots of the original VM installs?


Because you can always dump your files off out of the fragmented VM and then revert to one of the earlier snapshots and update it/whatnot and return the files.


User files is what's the bug culprit for deoptimization/framentation on hard drives, because when they are in the way, OS updates and program installs go further down on the drive were the performance suffers more.


Then when that's complete to the clone reverse clone method, yes I know you've heard this one before 😉


It really works and it's effortless if your off doing something else for instance, plus you always have a bootable backup.


How to safely defrag a Mac's hard drive

Exceptions to HFS not needing defrag?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.