Defragmenting a Mac Hard Drive: Is It Necessary?
Many Mac users who come to the platform from the world of Windows have become accustomed to defragging their PC hard drives from time to time, and thus the inevitable question arrises: do you need to defragment a Macs hard drive? The answer is usually no, you don’t need to defrag a Mac as part of a maintenance routine. We’ll explain why that is the case, but there are exceptions to this and we’ll discuss those too for users who may benefit from defragging.
What is disk defragging anyway?
If you’re confused already, here’s some quick background; disk fragmentation is the gradual inability of a file system to keep related data together, which results in increased hard drive activity as the drive has to seek out related data more often. The result is most often felt as decreased performance of the computer, and the resolution is a process called defragmentation, which basically just reorganizes the data so that related bits are grouped together.
Fragmentation in Windows vs OS X
Fragmentation is so common in the Windows world that the Windows operating system includes built-in defragmenting utilities, which has become a part of the typical maintenance scheme of most PC owners. Newer versions of Windows have generally improved on file fragmentation, but many longtime users continue to perform a regular defrag even if it has turned into a hocus-pocus maintenance routine, and the defrag ability remains intact in the newest versions of Windows, renamed from “Disk Defragmenter” to now be labeled as a more generic “Optimize Drives” function.
On the other hand, Mac OS X includes no such defragging tools or general drive optimizations (no, Repair Disk is not the same thing). One would assume that if Apple felt defragmenting a Mac drive was important enough, it would have included such a feature in the Disk Utility app of OS X, right? But it didn’t, and no such defrag option exists, which should give a pretty clear indicator that for the vast majority of Mac users, defragging an OS X drive simply isn’t a necessary task. There are several reasons for this, one being that the Mac OS X HFS Plus file system automatically defragments files on its own, in a process known as Hot File Adaptive Clustering (HFC). Additionally, many modern Macs ship with SSD, or Flash Storage drives, which don’t ever need to be defragged in general because they have their own maintenance process known as TRIM.
What about the exceptions? What Macs need to be defragged?
Generally, it’s a small cohort of Mac users who may potentially benefit from using manual disk defragmentation tools in OS X. In my many years of Mac experience, the most common user profile who could theoretically benefit from an occasional disk defrag are multimedia creators who have tons of enormous files scattered around an old hard drive. This means things like hundreds if not thousands of 1GB or greater movie files, thousands of huge audio files, or thousands of enormous creative documents, which is usually pro users of tools like Adobe Premier, Logic Pro, Final Cut, Photoshop, or similar apps that create many large multimedia files. Notice I mentioned old hard drive too, because with how OS X works it takes a very long time for file fragmentation to occur, and users who have new drives or who upgrade drives periodically probably won’t ever experience any file fragmentation at all.
If you fit into that limited user sample and have a 2008 Mac Pro with the original hard drive loaded up with thousands of movie files that are 10GB each, you may have a case where defragging could help. There are a variety of apps to use to defrag a Mac drive, but perhaps the most commonly trusted is a utility called iDefrag, which costs about $32 and has a free demo version available. Remember, defrag apps are third party utilities and aren’t supported by Apple, and defrag tools should never be run on SSD flash storage drives.
Another alternative to defragmenting which would have the same end effect is to back up the drive, format the disk, then reinstall OS X and restore from the backup.
OK I don’t need to defrag, but my Mac feels sluggish so now what?
If your Mac feels like it’s running slow, you can usually resolve the issue with a few simple tricks:
- Quit open apps to free up memory, most slow downs are due to RAM constraints and increased virtual memory usage (you can even build your own Quit Everything app if you want)
- Reboot the Mac, this clears caches, frees up memory, and allows you to install core system updates
- Update OS X software, newer versions tend to perform better than previous versions, and some system updates include performance and bug fixes
- Insure the Mac has at least 5-10% of total drive capacity available at all times to adequately provide room for temporary files, caches, virtual memory, swap, and sleep files
- Check for a failing drive with Disk Utility’s “Verify Disk” functionality, if the drive won’t repair and is failing, you can use this simple guide to recover data before it’s too late
You can also follow some specific guidance on what to do if a Mac is running slow, take some additional measures to speed up older Macs that have become sluggish over time, and also get in the habit of performing some general system maintenance to keep things running well over the life of a Mac.
Any questions or comments? Let us know!
Glad i came accroos this article I think i will give idefrag a go.
Defragmenting Mac drive enhances the speed of sluggish Mac. Apart from this (iDefrag) efficient tool, there are other efficient utilities like Stellar Drive Defrag with good customer support and free demo version available.
If Mac OS X was so good at keeping its storage clean then iDefrag will have nothing to show you, right?
The most common (and practically exclusive) reason for computers to get slow is that rotational hard drives ARE slow — and degrade in performance over time.
Use Blackmagic Disk Test: If you’re getting less than 60MB/s your drive is certainly not great — and less than 50MB/s is time to replace or at the very least, keep backed up. New 7200 RPM get around 125MB/s (same as Gig-E), and 5400 RPM get around 90MB/s.
Conventional drives slow down around 10% of original speed per year (in a crude acumen assertion). People think they’re computers have gone bad — when really, it’s just the consumables; hard drives and batteries.
Note: If your battery is bad, many macs will underclock.
There’s no need to keep an arbitrary percent of GB free as 10% may be too little and 5% may be more than enough.
Each time your computer goes to sleep it needs to be able to write out the entirety of it’s RAM data to disk. So if you have a 750GB drive, 5% is more than necessary (though certainly not ideal to keep drives full for other reasons). If you have an 60GB SSD and 10% available yet 8GB of RAM to write out, you’ll be shy.
At the extreme, if you have less than a GB free your computer may refuse to start altogether.
For more information or help call us.
Truman W.
ReaniMac
424 888 3622
About SSD, they do not need defrag not because of TRIM, but because of their physical nature. On a SSD, access time do not depends on the physical distance between two pieces of logically contiguous piece of data.
Of course, they have their specific properties and maintenance, and TRIM is part of it, but nothing to do with defragmentation.
So, never, ever, defrag an SSD. It is completely useless.
I’ll try iDefrag – thanks for the tips
Let the idiots alone to their sluggish HDs. I use iDefrag and am able to watch files optimize and defrag on screen in real time. My HD runs smooth as silk. I used to use DiskWarrior but have not needed it in at least two years. Of course I would never defrag/optimize a SSD, but HDs still need defragging and optimizing because they are read mechanically.
But let the idiots alone to their sluggish drives.
I’m graphic designer with a 2010 macbook pro. I don’t not have thousands of 1 gb files on this mac, but have had more than a few to be sure. I have upgraded the OS on this machine 3 times now. (which I think is partially the problem) Things were horribly sluggish. I ran disk utility and did all the normal things to check for disk problems. It wasn’t until I defragged last night that this mac was working well again. Apps that 12 hours ago opened on 12 bounces now open on 2.
My point is its not a myth nor is is it limited to 5 year old hard drives with thousands of 1Gb files on them.
I find this topic to be unnecessarily controversial and wonder what is really going on. Some kind of a fear that Mac OS X may not be all that perfect, perhaps?
The demo version of iDefrag will show you the fragmentation level of your HDD partitions, allocation maps, catalogs, extents as well as that of individual files and forks. If Mac OS X was so good at keeping its storage clean then iDefrag will have nothing to show you, right?
Alas it does, and I have used it rather successfully on my 3.5 year old MBP. And if you worry about the health of your HDDs, may I recommend using a monitoring utility such as DriveDX
iDefrag nearly killed my Mac! Beware,I used iDefrag once,a few years ago,and I had so many problems afterwards,including the computer failing to restart on many attempts. I ignored many internet comments saying defragging a Mac was not necessary. I should have heeded the advice!
And I have used iDefrag successfully for at least three years and will not be caught without it. You probably did not back up your drive, nor use iDefrag properly.
If I recall a long time ago I read something that Defragging (At least on Windows) puts a ton of stress on the hard drive and can shorten its life significantly.
When my trusty iMac7.1 gets slow and sluggish after e.g. a year of daily use, I just boot into Recovery Mode, format my internal drive and restore everything using Timemachine. Untill now this always worked for me and my iMac feels and operates like brandnew again.
The best solution I found was to replace my sluggish 1TB HDD by a 960 GB SSD. Performance is ~3 times better and I no longer hear the disk head moving all the time. My 4 years old iMac now feels like brand new.
Can this work on my iPaD?
Yes Shilo, but only yours. It’s your secret so don’t tell anyone.
Your iPad only needs either a restart or a hard restart, PERIOD. Read the instruction book on how to do either.
I use a tool called DiskWarrior, they reorder/compress directories, not the actual files. This does give you a performance bump.
… Jeff
PS They fix corrupted directories as well. I’ve saved drives Apple repair can’t even mount.
I was an Apple-authorized service provider and I use a combination of iDefrag and Onyx to service machines. While it IS accurate that Macs don’t need defragmenting as often as other systems, machines do respond positively to maintenance whether they’re OS X or Classic. iDefrag has not given me a moment’s trouble and I can say the same for Onyx.
“…Mac OS X HFS Plus file system automatically defragments files on it’s own…”
Seriously? Did you go to elementary school? It’s is a contraction for “it is.” The possessive form “its” does not have an apostrophe. You may know about fragging, but not fundamental English grammar.
Who needs school or an editor when you have Pablo correcting every typo for you?
Good call, Pablo. I’m sick to death of this illiteracy.
Thanks for catching the typos, sometimes they slip through the cracks due to autocorrect. It has been fixed!
Don’t forget that hard drives are equipped with multiple read write heads and distribution of file clusters in such a way minimize head movement is significantly better at improving speed than one large sequential contiguous file.
It’s better to let OS X manage fragmentation. The best thing you can do is to keep available space as hi as practical.
Robert says:
“Does this also apply to external drives attached to a Mac, i.e., defragging is not necessary, or only to internal drives that contain OSX?”
Robert, it applies to all drives and partitions, whether internal or external. Your Mac makes no distinction how the drive is attached. You can clone your internal startup drive to an empty external drive of the same or larger size and your Mac will happily boot from the external as if it was internal.
Unless you are the type of user mentioned in the article who does very large audio or video projects, it is very unlikely that defragmenting will have a significant effect. And if you are that type of person, then you are likely using large external RAID arrays on Thunderbolt and have specific procedures to maintain your RAID for best performance.
defragments files on it’s own – it is “its”
Those tricky, tricky “apostrophe’s”! I can teach a fourth grader when to use apostrophes and when not to, in about 15 minutes, so most adults should be able to get it in 30.
The first cardinal rule is: NOT EVERY TERMINAL “s” IN A WORD GETS AN APOSTROPHE BEFORE IT!!!
Having learned that, you can Google the rest.
Also, phrase “it’s a small cohort of Mac users who may potentially benefit” above suffers from the fact that “cohort” makes no sense, because it’s the wrong word. “Cohort” means “accomplice”… so you said, “it’s a small accomplice of Mac users who may potentially benefit”. Unless all Mac users have the same midget who benefits them.
Not sure exactly what word you intended. Perhaps, “coterie”, meaning “a small group of people (not “a group of small people”) with shared interests or tastes.”
Thank you, William Burke! I Love it!
A lot of sound and fury over one dropped apostrophe, especially taking into consideration the fact that the author used it’s properly elsewhere.
Additionally, the use of cohort in this piece is appropriate: https://en.wikipedia.org/wiki/Cohort_(statistics). We should make sure we are correct before installing ourselves as de facto grammar police.
Mister Smarty, you are wrong about cohort. The dictionary on your mac will tell you:
treated as singular or plural] a group of people banded together or treated as a group: a cohort of civil servants patiently drafting legislation.
• a group of people with a common statistical characteristic: the 1940–44 birth cohort of women.
Does this also apply to external drives attached to a Mac, i.e., defragging is not necessary, or only to internal drives that contain OSX?
Don’t do that!! Once I run this iDefrag app and after defragmentation process my Mac was dead! Somehow this app just make mess with system files that kill my Mac. OS X don’t need defragmentation, please don’t kill your Mac hard drive by iDefrag.
The best way to achieve speed on Mac is switch from HDD to SSD. My Mac take ~60 sec on clear startup, but on SSD I have only 7! Apps runs much faster too.
I’m a mac tech and use idefrag since many years on many macs and didn’t had any problem. I know problems can happen if you use idefrag on a hard drive with bad sector, or if you use a old incompatible idefrag version with a newer system.
If you have a half full hard drive and not a lot of big file, defrag is not necessary. But I know many client that saw a improvement, especially when using nearly full hd and big files. Automatic HFS+ defrag work only with less than 20MB files, and only if you have enough continuous free space.
Going to SSD is a good idea for a startup disk, but not if you need TB of storage for media creation. In this case, you want to defrag your file, especially when your 400MB .mov file is split in 1472 fragments. (Yes, I saw that !)
I use iDefrag and find that the application is very well done, very informative both in presentation and help resources, and so far very safe. I keep a lot of free space and do not handle large multimedia files, but do have a few large (15+ GB) Parallels VM files, and doing a full defrag once a month on the system drive helps. I have also defragmented the external backup drive which gets a lot more full and fragmented, but that matters a bit less.
I purchased iDefrag, but was so utterly disgusted by the activation scheme that it uses (basically hidden until after the purchase, and defended by such presumptive, trollish rhetoric about piracy) that I have determined never to use it again. My advice: save the money, and just prepare disks from scratch when you need the speed or cleanup. Having said that, slower media that you’ve prepared, or disk images intended for writing to a CD or DVD, probably benefit from the defrag most if you’re consistently updating the same disk image.
You may want to check back. The iDefrag activation scheme has been completely redone, as is the easiest I’ve ever encountered. Just a drag and a click, and you’re done. And the product can help, if you’ve an old Mac like I do (2009).