How and Why to Defragment Your Mac’s Hard Drive

| MGG Answers

Question:

Stephen writes: I have a 2011 Mac mini with a traditional hard drive that’s starting to slow down. I’d like to try defragmenting the drive. What’s the best option to do this in OS X?

Answer:

Mac OS X Drive DefragmentationFirst, it’s important to note that this answer applies only to traditional mechanical hard drives and not to solid state drives. Never perform a defragmentation operation an SSD as doing so not only provides no performance benefit, but it will also add excessive wear to the drive’s limited lifespan.

Second, any discussion about “moving” or “relocating” files in this article relates to a file’s location on the hard drive platters, and not a file’s logical location in OS X’s file system. If you save a file to your Documents folder, for example, and then defragment your hard drive, the file will still be found in the Documents folder, but the bits of data that contain the file’s information may have been physically moved to a different location on the hard drive. Those unfamiliar with the concept of disk fragmentation can read more about this common issue.

With that in mind, OS X includes an “always active” defragmenter. This process, called “hot file adaptive clustering,” automatically takes small, regularly used files and moves them to the portion of the drive that the system can access most quickly. The relocation of these files necessarily results in defragmentation, as they are stacked next to each other on the drive's "hot zone." This process happens regularly in the background with no user intervention required.

But Apple’s built-in OS X approach will only take you so far. For highly fragmented drives, which for most users is a drive that has been in regular use for longer than 18 months, a full defragmentation that addresses all data on the hard drive is likely to result in perceivable performance improvements. OS X does not include any built-in tools that allow a user to perform a full defragmentation, but there are several third party software applications on the market that handle this very task.

One of the best is Prosoft’s Drive Genius, which performs a variety of disk and system maintenance functions in addition to drive defragmentation. At US$99, it’s not cheap, but the TMO staff has found the software to be invaluable on a number of occasions. A cheaper option is iDefrag (US$30.95) which, as its name suggests, is a utility that focuses exclusively on disk defragmentation.

Prosoft Drive Genius Mac Defrag

Each application will have its own method and instructions, but in every case a defragmentation means that data will be moving around on your hard drive, slightly increasing the risk of data loss or corruption. Therefore, make sure that you perform a full backup of your important data before performing a drive defragmentation (but you should have regular backups already, right?).

In the absence of specialized defragmentation software, users can still obtain the benefits of a defrag with a “nuke and pave” restore of their hard drive. Backing up your data to an external drive via a clone process, reformatting the Mac’s internal drive, and then cloning your data back to the original drive produces the same basic result as a full system defragmentation. This option may take longer than a defragmentation, but it’s a free alternative to expensive software.

A roughly annual defragmentation of a mechanical hard drive is, in general, a good idea and will often result in noticeable performance improvements. Just remember to back up your data first and, again, never perform a defrag on a solid state drive!

Featured image via Shutterstock.

This question was originally answered on MGG 469: Get Your Own Email Domain, Save a Headache

About MGG Answers:

Each week Dave Hamilton and John F. Braun provide some great troubleshooting advice to listeners of the Mac Geek Gab podcast. Here with MGG Answers we share some of those tips with the rest of the world!

Sign Up for the Newsletter

Join the TMO Express Daily Newsletter to get the latest Mac headlines in your e-mail every weekday.

Comments

iJack

Drive Genius does much more that defrag hard drives, of course, so while I think $99 is a lot, it is a very useful suite of tools.

“This option may take longer than a defragmentation, but it’s a free alternative to expensive software.”

Weeeel… My boot drive has only slightly more than 150GB of apps and files on it, and my most recent Drive Genius defrag took more than 10 hours to complete. Since you cannot defrag from the boot drive, that means hours and hours of lost productivity, so “nuke and pave” might well be quicker.

lonepalm

I’m shocked you did not mention Disk Warrior in your article as it has been the premier disk fragmentation utility for years. Comment ??

iJack

Disk Warrior does not de-fragment hard drives, and never has. It writes a new disk directory, based on where your data is on the disk, at that moment, whether your disk is fragmented or not.

It also has some data recovery tools, but that’s another story.

CudaBoy

I’ve always used Norton’s SystemWorks CD X mostly for SpeedDisk (de-frag) as well as the rarely used but wicked important Un-Erase and Volume Recover.

Graham McKay

Am interested to hear about how, or if, to defrag a “Fusion” drive. The clone/restore option would seem most likely to still achieve desired result but do the 3rd party tools have a “gotcha” in this case?

mike stecker

I recently replaced my laptop drive with a “Hybrid” drive from SeaGate. I know this has some flash memory on board, is it safe to defragment that?

Jim Tanous

I recently replaced my laptop drive with a “Hybrid” drive from SeaGate. I know this has some flash memory on board, is it safe to defragment that?

According to Seagate, you shouldn’t defrag hybrid drives. The primary benefit of a defrag is that it makes reading frequently accessed data faster because the drive head doesn’t need to jump all over the platter to read the bits. With hybrid drives, at least in theory, these frequently accessed files will be automatically moved to the solid state portion of the drive, limiting the benefit of a defrag.

Vishal Chaudhary

Allow me to share my view on defraging a Mac. I have been using Mini from last 2 years with large apps such as video editing software and my Mac does slow down inspite of 4gb ram + 500GB HDD. Even Apple suggests that Mac running heavy apps may develop fragments on HDD. The fragments will ultimately result inb slowing down the Mac system. But I have used Stellar Drive Defrag http://www.stellarinfo.com/mac-software/drive-defrag.php to defrag my HDD completely. This tool removed showed many fragments present on the applcations files (the one which I used for editing) & removed it. You can try out Stellar Drive Defrag to get rid of files & hdd fragments. It also optimized a HDD.

Donald Kepler

I was so irritated with my Slow Mac and I wanted to optimize sluggish Mac but I was a bit conscious for using any tool. I came to know about this drive defragmentation tool online and I firstly downloaded the free version online form stellardefragdrive.com. Then I bought online and I experienced this efficient software for defragmenting my large bulky volume. Now my old Mac has got a Rapid speed.

Log-in to comment