Skip to main content
X

Send us a Topic or Tip

Have a suggestion for the blog? Perhaps a topic you'd like us to write about? If so, we'd love to hear from you! Fancy yourself a writer and have a tech tip, handy computer trick, or "how to" to share? Let us know what you'd like to contribute!

Thanks for reaching out!

Tech 101: Do Mac Hard Disk Drives Need to be ‘Defragged’?

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 - note that the current boot drive can't be defragged.
(Drive Genius 5 – note that the current boot drive can’t be defragged.)

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

Quitter's "Rules" for quitting or hiding apps automatically
(Quitter’s “Rules” for quitting or hiding apps automatically.)

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

Removing apps from the login items list
(Removing apps from the login items list.)

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.

Steve Sande
the authorSteve Sande
Contributing Author
Steve has been writing about Apple products since 1986, starting on a bulletin board system, creating the first of his many Apple-related websites in 1994, joining the staff of The Unofficial Apple Weblog in 2008, and founding Apple World Today in 2015. He’s semi-retired, loves to camp and take photos, and is an FAA-licensed drone pilot.
Be Sociable, Share This Post!

Leave a Reply

29 Comments

  • What about EHDs connected to a Mac? Do they need defragging? Does Hot File Adaptive Clustering (HFC) apply to the EHDs?

  • What about EHDs connected to a Mac? Do they need defragging? Does Hot File Adaptive Clustering (HFC) apply to the EHDs?

  • Interesting White Paper by the SuperDuper! folks. s3.amazonaws.com/com.shirtpocket/SuperDuper/Fragmentation.pdf

  • Anybody know anything about defragging an iPod? Needed? Software? Anything?

    Mine got weird when filled to max. Then when dumping a few things, space does not seem to be freed up as much as I thought it might. Would a defrag help? And can it even be done?

    • Unless it is an older iPod with a spinning drive, there is no reason to defrag flash memory and it actually hurts it as flash memory has a finite number of writes so defraging it will not make it any faster and will kill it quicker. I have never tried to defrag my older 80GB 5th gen so don’t know if it can be done.

      • Thanks for posting. Ended up not defragging, per your suggestion. But instead reset the 16GB 4th gen Nano back to factory specs and started from scratch. Then loaded less data (no longer trying to fit entire music library) and now the Nano works as good as new. Love this little thing. Hope it lasts forever. Thanks all, for the education on SSDs.

    • Yes, you can usually defrag iPods Classic with spinning drives by mounting them to the Finder as a disk. The other method, of course, is to erase the drive and refill it; it takes some time, but is often worth the effort.

  • What about speed tools pro as a utility to defragment hard drive just fine?

    • I have never used it. If you’re gonna spend $30 , might as well spend $79 and get TechTools Pro. It checks ram, video ram, HD and SSD SMART status, can defrag, and run run many other scans. It is the only program I know for MAC that can do a SMART check on USB. It also does surface scan for spinning drives. The Apple diagnostic disk is better for some things but I can test all the sensors and the readings with TTP9. ( it is 10 or 11 now ) It also shows all the voltages for all the parts where there is a sensor. It does 95% of what the Apple disc will do but the Apple disc isn’t available to regular people. ( even I only have Late 2010 and older versions and I work on them, not a certified repair center though )

  • Another source of slowdown is application and data updates. For an example I will use the game World of Warcraft. Applications actually contain many files in their .app package, as updates are performed the contents of the application package may spread onto distant portions of the hard drive, this seriously slows down application load times on a HDD. To solves this I will copy an application to a new folder and then back again. When WoW is loading, I will watch the progress bar for pauses, I rarely see these pauses on an SSD.

  • If you use a cloning app like SuperDuper, back up and then go back and a rewrite the HD, won’t it defrag as it rewrites?

    • A clone does not defrag as it writes. It is a clone. It writes data back, block by block, how the original was. I use Carbon Copy Cloner and it does the same, as any Cloner program would. They are block level copies, no defrag is done.

    • Apparently it depends on the backup utility. I cannot comment on other backup software, but I use Synchronize!Pro X, which backs up files, not blocks. When I create a brand new bootable backup (aka “clone”) from a fragmented primary drive, there is zero fragmentation on the backup. Every time.

      NOTE: SyncProX does not make bootable backups of macOS High Sierra volumes, but it will make a backup of any OS X 10.4 through macOS 10.12 volume.

      • Considering how much you pay for that software I would hope it would defrag on the fly. CCC is free ( or the 3.? version I have is ) and works up to 10.12. Version 4 probably works with 10.13 but I don’t use it so don’t need ver 4. I read several complaints about your software , mostly cost, but some of problems that the maker refused to address. Either way the 2 free Cloning Programs I know of clone as the drive is , fragmented and all. Really that is what you want. If you have a corrupted file you want your program to make an EXACT copy of the data to facilitate file recovery. Block level copy does that. If it doesn’t copy at the block level then any file you deleted by mistake will have no way to be recovered, with block level, as long as the block has not been overwritten, the file can be recovered. ( On spinning drives, not usually on Flash or SSD’s )

        • Actually CCC is not at Version 5 and is capable of converting back and forth between APFS and HPF+. Check out the site. There is a whole page discussing options with APFS, etc.. CCC is not free.

          • CCC is free up to version 3.4.5. That is the version I use. I said the newer version are paid versions now. I prefer cloning to just backing up. I realize your software makes a bootable backup but that is different than a pure clone. I can retrieve deleted or corrupt files with a clone, I cannot do that with a backup as the backup only copies the known data. Clones go HD block by block ( even SSD’s have blocks ) so everything is copied as an exact duplicate of the original, in its original state. That just has more value to me as a tech then a backup program.

  • Directory fragmentation can cause slowdown. Disk Warrior has been a stellar utility for years.

  • You know what’s fun? Accidentally launching the DG5 defrag against a SoftRaid volume. Woops!

    • Who is this comment meant for ? I don’t see any comments from the Author so not sure what your “contradicted” comment means. Please explain. I am not the Author, I am a computer guy who works on macs of all ages back to G3’s. ( I don’t mess with anything older than that ) I am also a security pen tester and Cisco Network Engineer.

  • What causes slow shut downs with the finder quit? I quit all running apps before shuting down!

    I also have some hackers triying to hack the eathernet port? Can this be part of the. Slow shut down?

    • How do you know someone was trying to ” hack ” you ? I highly doubt anyone would come after YOU specifically. You might have allowed malware to install , thus allowing someone else to access your machine. I am a Pen tester, no one would target you specifically unless they knew you. The money comes from Businesses ( large ) and not individual people. Please explain why you think you were being hacked.

      • It is known problem that many of the older machines have with this new file system. Just Google the slowdown issue especially on the Apple developer site. This file system is really not ready for primetime on anything but the newest apple machines.

        • He doesn’t mention running the newest OS or his System year, just that shutdown is slow and he thought he was being “hacked” on his Ethernet port. My reply was about that. You assume things not in evidence. You could be correct but his statement doesn’t give enough info to know. I was curious about the ‘hacking” comment, thus my reply.

  • I work on Macs every day. The only time they slow down is after 3-6 years and they need the HDD defragged, or they are almost out of HDD space. The system needs around 10GB of free space to function properly. (more to also save files ) I use TechTools Pro myself. As you said, never Defrag a SSD as SSD’s have Finite Read/Write numbers and Defragging will reduce that number.( for no gain in speed )

  • You state: — the new file system will provide automatic defragmentation in background when your Mac is idle. APFS may be expanded to HDDs in 2018. You have not described how this takes place and that is dependent on the modified firmware in Apple drives so they are properly recognized by the OS as such, any 3rd party drive not recognized by the OS as an Apple drive, in this case SSD’s, will not work properly with the NEW file system at this time. Further, there are issues with trim enabled.