How and Why to Defragment Your Mac's Hard Drive

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.