Macs are more popular than ever, thanks to a “halo effect” from buyers of iPhones and iPads who decide to make the switch from Windows to macOS. Like all computers, Macs tend to slow down a bit after a few years of usage, and those readers who are new to the Mac might think that the old Windows solution of “defragging the hard disk drive” (HDD) might help. In this article, we’ll discuss why defragging Mac HDDs is usually unnecessary and how to do it if you’re one of the few users who may actually benefit from the process.
What is Defragging, Anyway?
Defragging is a slang term for “defragmentation”, which is the process of organizing files on a HDD to optimize how it accesses those files. HDDs use a magnetic read/write head to access rotating round platters that usually spin at either 5,400 or 7,200 revolutions per minute (see image above right).
New data is generally written to the outside of the platters, with the read/write heads moving in toward the center as more data is stored. Data can’t automatically migrate itself to the outer edges of the platters to fill in available space, so after many read/write cycles have been completed, there are gaps where large files cannot be written. As a result, those files are stored in locations all over the drive platters and the moving read/write head must travel the complete width of the platter to load files. This slows down operation.
Defragmentation reads the files on the HDD platters, then rewrites them on the platters so single files are written contiguously and the drive head doesn’t need to move back and forth as much. The result? Faster loading of apps and data.
Why Macs Usually Don’t Need to be Defragged
Since the days of Mac OS X “Panther” (which shipped in 2003), Mac OS X and its successor macOS have used something called Hot File Adaptive Clustering (HFC) to automatically defragment files. Think of HFC as constantly performing defragmentation on hard disk drives, ensuring that the HDD is always as optimized as possible for reading and writing data. HFC works very well for most users and as a result, most users should never need to defrag a Mac hard drive.
The exception is for those Mac users who have hundreds or thousands of very large files (usually audio or video files) larger than 1GB in size. Generally, these people are creatives who use a lot of big files in their work. HFC still does a very good job of keeping the files unfragmented, but as time passes this type of user may see a performance hit.
What About SSDs and APFS?
More and more Macs are doing away with Hard Disk Drives and using solid-state drives — SSDs — for data storage. An SSD uses flash memory to store data rather than spinning mechanical platters. Defragging an SSD or Fusion Drive (which is a combination of an SSD and a HDD) can actually be dangerous to the drive and reduce its lifespan. Never defrag an SSD!
As of the release of macOS 10.13 High Sierra in September of 2017, some Macs now use a totally different file system called APFS (Apple File System) to replace the old HFS+ file system that had been in place for decades. For HDDs — which as of publication are currently not supported with APFS — the new file system will provide automatic defragmentation in background when your Mac is idle. APFS may be expanded to HDDs in 2018.
What If I Do Need to Defrag?
Those creatives we talked about earlier can regain performance by defragging those large HDDs filled with big files, but Apple does not build a defragging utility into macOS. The solution is to use Drive Genius 5 from Prosoft Engineering (see image below). Note that the utility does not work with APFS-formatted drives, but as noted in the previous section of this article, APFS includes an automatic defragging capability.
Drive Genius 5 is used by Apple employees at the Genius Bars and Genius Groves at Apple retail stores, so it’s highly regarded in the industry. It also has other uses like creating a secondary drive so that the main drive can be defragged and optimized, finding and eliminating duplicate files, performing secure erasure of drives, and cloning drives.
What Else Could Be Causing A Mac To Run Slowly?
While fragmented HDDs are often the cause of performance slowdowns on Macs, there are other reasons a Mac might be sluggish. If many applications are running at one time and you’re not using them all, consider quitting the unused apps. To see which apps are running, look for a dot below the app icon in the Dock. To quit those apps, just right-click the icon and select “Quit”.
I use a free utility from developer Marco Arment called “Quitter” to automatically shut down apps that I haven’t used in a certain amount of time. It works well, and is simple to customize by defining how many minutes of inactivity the Mac should wait for before quitting or hiding an app (see screenshot below).
Similarly, Mac users often like to launch many apps at startup so that they’re immediately available for use. If they run in background or are only visible in the menu bar, it may be difficult to know if they’re even running. To stop those apps from loading at startup, launch System Preferences, click on Users & Groups, then click the Login Items tab. Removing an unused app that loads during startup is as easy as clicking on it to select it, then clicking the minus sign below the list of login items (see image below).
Other reasons your Mac might be running slowly include having too much data on your HDD or not having enough memory (RAM). If less than 10 percent of the HDD space is free, the Mac can struggle finding the swap space it requires when the data and apps being used overwhelm its memory.
To fix this, there are three possible solutions:
- Delete unnecessary or outdated files from the Mac
- Install a larger HDD
- Install more RAM
The first solution is quite easy…and it’s made easier with Drive Genius 5 finding and removing duplicates automatically. For the second and third items on this short list, MacSales.com is the place to be. We’re the leader in do-it-yourself hard disk drive and memory upgrades, with well-respected instructional videos showing how to get the job done.