iDefrag: Should You Defrag Your Mac’s Hard Drive?

When you own a PC, you need to pay attention to things like defragmenting your hard-drives, installing and updating antivirus, antivandal and firewall software. If you switch to a Mac, you need worry a lot less about such things. I’m not saying you should be complacent, but things generally just work much more easily and straightforwardly.

Your Mac has built-in maintenance routines that run periodically, and – for the most part – you will have a simpler computing experience that requires you to spend much less time under the hood tweaking things.

If you’ve made the switch from a PC, one thing that you might find yourself wondering about is defragmenting your hard-drive. Today we’re delving into that topic, and taking a look at iDefrag. After the jump, I’ll walk you through the app, and conclude with some reflections on whether or not you need it.

The Defrag Dilemma

Most PC users know that it’s a good idea to defrag your PC’s drive every few months. It used to be, back in the early days of Windows, that using the built-in defragging software took several hours to process even the smallest disk. How many times did I sit, despairing, as the process began all over again because, in my impatience, I had tried to do something else before the defragging had finished?!)

Newcomers to the Mac platform might wonder whether they need to, and how they can, defragment their new machine’s hard-drives.

The answer that you will find in most places is ‘No, you don’t need to do this.’ But now and then you’ll come across guidance on how to do it if you really want to, even within Apple’s own support material.

iDefrag has been around for a little while, and back in March, Coriolis Systems released a major update of the app, iDefrag 2.

Getting Going

You can download a trial version of iDefrag from the developer’s site. This demo is severely limited in what it can actually do, but at least you will be able to take a look at the app. Once you’ve downloaded and installed it, this is what you will see:

Launching iDefrag

Launching iDefrag

A list of available volumes in the left panel, and a warning on the right that you can’t make any changes until you have entered your Administrator password.

Click on the lock icon to authenticate, and iDefrag will then start scanning your drive, filling up the right-hand panel with a visualisation of your drive’s contents:

Your Visualised Drive

Your Visualised Drive

You’ll note from the the linear graphic at the bottom of that panel that my drive currently looks in pretty good shape, all the files compacted into a more or less contiguous block. The screenshot above is taken after a full defrag – here’s what it looked like before:

Before a Defrag

Before a Defrag

Apparently, my files have been shifted about a whole lot during the defrag process, and the blocks of fragmented files visible here have all been sorted out – so, theoretically, my system should now run a bit more quickly. I’ll come back to assessing whether this is the case in my conclusions.

To get started, you need to select which of the five available defragmentation Algorithms is to be used. You choose from the pulldown menu in the toolbar, selecting from: Compact, Metadata, Optimize, Quick (on-line), or Full Defrag.

Remember: you’re working with your data at a pretty deep level in this process – files that are currently split across different locations on your drive are going to be moved about.

Things can go wrong. Power cuts happen, for one thing. Your files could get borked. And so it’s very important that you make a full backup of your information. Bad things happen, so do the best you can to insulate yourself from those things, and run a Time Machine backup right now – better yet, do that, and also make a SuperDuper! or Carbon Copy Cloner image of your hard-drive.

iDefrag in Action

If it’s your Startup volume you’re defragmenting, your Mac will need to restart in order to complete all but the Quick (on-line) algorithm.

Requesting a Restart

Requesting a Restart

The differences between these algorithms are explained in the Quick Start Guide that is accessible from iDefrag’s Help menu.

In brief, a Full Defrag is the most straightforward path to follow: it combines the Metadata and Optimize algorithms. The Quick Start Guide more or less discourages using the Metadata or Optimize algorithms separately, though they are available from the menu.

For further information about these options, the Guide refers you to the Help menu, which explains that the Metadata algorithm ‘Focuses on the volume metadata and the adaptive hot file clustering system’, and the Optimize algorithm ‘Runs iDefrag’s disk optimization algorithm, which rearranges files on the disk under the control of the selected class set.’

Maybe that means more to you than it does to me? Knowing that the Full Defrag combines the benefits of these two algorithms, I’ve been happy to choose it and allow iDefrag to get on with its work. No doubt, a more technically savvy person might want to think through these options in more depth, and will be pleased that iDefrag allows you some more granular control of your defragmentation job.

There’s not actually anything much to see while iDefrag is working – and anyway, because the app boots your machine into a special mode, it’s not possible to take screenshots of the process in operation.

A Quick (on-line) defragmentation looks much the same as the screenshots above, except that you’ll see bits and pieces of files being moved and re-written as it works through your drive.

Additional Features

iDefrag monitors your drive temperature (on drives that have these sensors, as most modern Macs do), and will take steps to protect the drive if it starts to overheat – pausing until it cools enough for the process to safely continue. This is a reassuring feature – it’s nice to know your drive is not going to go into meltdown!

OS X apparently places files that are most frequently used into a special area of your hard drive, known as the Hot Zone. iDefrag works with the operating system and knows which files need to be placed here.

You could, if you chose, use iDefrag to defragment a Time Machine backup – I’m not sure what the point of this would be, but if you want to do so, iDefrag can help.

So, Defragment or Not?

I’m inclined to accept Apple’s guidance and conclude that there’s not really a need to defragment my Macbook’s drive. But I probably will continue to do so anyway – not often, but maybe three or four times per year. Running a Full Defragmentation does seem to have made things a little snappier – not as much as I know reinstalling OS X would do, but on the whole apps and documents do seem to open more quickly.

What I want to come back to is the need to take very good care of your data. Backup, backup, backup. I had some problems with Disk Permissions the first time I ran a Full Defragmentation, and iDefrag froze on me (I left it running at bedtime, and in the morning it was frozen about three quarters of the way through).

This time I used Disk Utility to Repair Permissions before running iDefrag, and the process ran to completion, and the machine turned itself off with no problems.

Returning to my opening paragraphs comparing PCs and Macs: yes, your Mac should just work, but it’s worthwhile giving it some help every now and then by making sure that it’s running the built-in maintenance scripts.

There are several apps available that will help you do this (Cocktail and Onyx are two of the best known). Or you can simply open the Terminal and type: ‘sudo periodic daily weekly monthly’ followed by Return, enter your Administrator password, and OS X will take care of things for you. If your Mac is left on all the time, then the operating system will run these processes automatically in the early hours of the morning.

I know very well that this topic is likely to be controversial. There will be people who know a lot more than me about how OS X accesses your machine’s hard drives who will have strong opinions. I hope you will voice these in the comments!


iDefrag is a powerful, customizable, disk optimization tool. It provides a wealth of options for defragmenting your hard drive, and might speed up the performance of your Mac.



Add Yours
  • The options to me seem to be: trust your Mac to take care of itself using the built-in functionality / trigger the built-in functionality yourself through Terminal or a free app / pay up to $30 or more for an app to do something similar which might freeze on you, or might speed up your Mac a bit, no guarantee either way. Caveat emptor.

  • Sometimes you need to Defrag on the Mac to accomplish certain things.

    For instance if you want to split a partition using Disk Utility and preserve the data. If there is a lot of fragmentation on the drive the live partitioning will fail. I’ve used iDefrag for this exact purpose and it works well.

  • Quoting from above: “Bad things happen, so do the best you can to insulate yourself from those things, and run a Time Machine backup right now – better yet, do that, and also make a SuperDuper! or Carbon Copy Cloner image of your hard-drive.”

    And here you have a built-in solution for defragging without spending more money. Once you’ve cloned your drive with SD! or CCC, you can now reverse the direction and overwrite your original disk. Things get put back not where they were but rather where they would wind up when doing a defrag. Takes less time as well since there isn’t the need to write some blocks temporarily over there, then erase, then copy some blocks where you erased, then move some more to make space for the next bunch of blocks, and on and on and on. What a lot of disk overhead.

    @ mingistech: You do make a backup of your drive before trying to partition it, right? So if you’ve made a backup, why go to the trouble of a live partition when you can use Disk Utility to create your partitions and then do a reverse backup. In addition to getting your new partitions, you’ve defragged your data at the same time. (I personally don’t trust live partitioning, but that’s just me.)

    A question: can you or should you “defrag” an SSD?

    • Yes you should also defrag SSD drives. My systems use SSD only, and iDefrag2 makes a massive amount of difference on them. From ‘unuseable’ back to ‘as new’.

      • Here is the official statement from Coriolis (maker of iDefrag):

        “For avoidance of doubt, we strongly recommend that you don’t try to defragment your SSD-based volumes. The fragmentation issue on SSDs is internal to their implementation, and defragmenting the filesystem would only make matters worse.”


    • No, you should NOT defrag SSDs. SSDs not only don’t benefit from defrag, the SSD controller intentionally spreads data around for even wearing which will extend the life of the SSD. Data written and erased from the same data blocks over and over again will shorten the life of the drive.

      While there may be some unadvertised aspect to iDefrag that changes used blocks back to “new” (I can’t find any mention of such a feature), a Coriolis blog post from last year explicitly recommended against using iDefrag on SSDs.

    • A block level copy “clone” of a HDD will not defrag for you. It will produce as exact copy space included.

      File level copy is just too slow to make a backup. So yes, a defrag is the best option.

      • @mingistech Beg to differ: I recently used SuperDuper! to clone my internal HD onto a newly formatted external HDD (right out of the package). When it was finished, I checked it with idefrag and found that there were no split files – everything was copied over as files, not blocks.

  • Reversing a cloning doesn’t quite produce the results of an iDefrag ‘Full Defrag’ but as good as most people would notice.

    Where defrag does make a difference is with computers dealing with large amounts of audio data or video data. I’ve quite simply had a Logic song that wouldn’t play before defrag and would afterwards. Simple proof there’s a difference in some cases. I’ve had iDefrag for years (and iPartition) and they are very good utilities. Never let me down, or trashed a single file yet.

    • @webkarnage: Great point and one that I hadn’t even considered. My file sizes are much more modest. :-)

    • +1 on the audio and video front. Computer has been running on ~5gb space for about a year.. I use it for Logic and Final Cut a lot and have a lot of large files. iDefrag took my startup time from five minutes down to about one and a half, and it wasn’t even able to do a very good job with so little space. Feels like it did when it was new again..

  • Am I the only one who finds this “Defrag Dilemma” stupid? In laymans terms Defragging gathers your files and groups them together, so instead of having a file split up all over the allocation table, it’s all central in one place. Meaning reading the file will speed up. It will also increase your disk space if you have a majorly fragged hard drive.

  • Defragmenting makes a massive difference, if you have heavily fragmented free space, and want to work with large files. MacOSX does NOT defragment free space!!!

    I had about 30 gigabytes of free space left, but it waass all fragmented in tiny pieces of max a few megabytes each. So when I was dealing with large files (5 GB a piece) the system got excruciatingly slow.

    After buying iDefrag2 and letting it run, the system got so much faster it felt like skipping to the future. I now use it atleast once a month to keep things smooth.

  • After I run 2-3 times Idefrag, the system gets very slowly and I have to reinstall Snow Leopard.

  • I’ve personally never needed to do a proper defragment on any of my Macs. The only time when a defrag might help is when you’ve been almost out of space for some time on the system volume, which has forced OSX to fragment files against it’s will. Generally when I’ve gotten to that point, it’s been so long since I reinstalled OSX from scratch, that the system in general isn’t in a great shape, and I’ve just gone ahead to reinstall the system instead of defragmenting the disk.

    If you want detailed info about the many technical reasons and features Mac OS X uses to avoid creating fragmented files, check this page:

  • Thanks, this might be a good alternative to DiskWarrior which claims to be Snow Leopard compatible, but does not support the iMac quad-core model. Wup-wah.

  • This article has been written by a biased bigot in favor of MACs.

    • Above comment by a biased bigot in favor of anything but a mac.

      • Above comment by a biased bigot not in favour of biased bigots.

  • I did
    “open the Terminal and type: ’sudo periodic daily weekly monthly’ followed by Return”
    and got this message

    Searched on the net for it with no result. Good or bad???

    Nice article. Interesting debate. :D

  • Well, after 2+ years of 8 hrs of work per day on my MacBook Pro 15″, I happened to notice over the last couple months things aren’t as quick as they used to be. When I saw this blog post in my RSS reader, I couldn’t help but wonder if defrag could be a problem. After noticing how bad things were via the demo app, I decided to invest the $30 to defrag.

    So, I took the leap and 14 hours later (200 GB) to get the job done, I can immediately tell a difference.

    For someone that works in design and video production and speed is crucial, this app saved the day!

  • “…theoretically, my system should now run a bit more quickly…”

    I think that people expecting a speed increase may be disappointed by iDefrag. I’m sure it saves seconds (or fractions of a second) when starting up or when launching applications, but at least for me that’s not the goal.
    As mentioned above, iDefrag makes it possible to work with large files (e.g., audio, video) that otherwise are practically unusable.
    Another advantage is that it defragments free space. Other defragmenters do not do this. iDefrag also utilizes the Hot Zone or Hot Band, placing files in specific areas of the hard drive.
    So while I may not notice a huge speed increase, I do notice that my hard drives work less. They become very quiet after a defragmentation. At the same time, I’m able to work with large files after defragmentation. I’m sure that the life of my drives is extended just from using iDefrag a few times a year.

    “the first time I ran a Full Defragmentation, and iDefrag froze on me…This time I used Disk Utility to Repair Permissions before running iDefrag, and the process ran to completion, and the machine turned itself off with no problems.”

    As they mention in the Quick Start Guide, this step should be done before defragmenting:
    “You should also check your Filesystem for errors. To do this, you can either select Check for Errors from the Defragment menu, or you can use Disk Utility; they both perform exactly the same checks.”

    Without a doubt it’s the BEST defragmenting utility for the Mac. This becomes more evident when dealing with hard drives that are almost full and/or when dealing with large files, not to mention free space fragmentation. Better than OS X’s limited approach. Better than other defragmenters which usually only defragment files. Better than cloning since iDefrag recognizes the Hot Band. I would rate it a 10 out of 10.
    Their customer support is also quite good, BTW.

  • Over a year on a Snow Leopard iMac and working on it 20 hrs a day, handling large files all the time (design) I have to say, my Mac is working just as good and fast as when it was new.

    Reminds me a bit on my old days when other photographers, carrying their Super-light Hasselblad cameras, laughed at me – carrying the super-weight camera Mamyia.

    Well their camera slipped out of their hands onto a cushion and crazed, my one fell on a concrete floor, I picked it up and kept taking shots. Not sure why they started crying?

    All I do is make sure my trash-can gets secure emptied all the time. That keeps my Mac quiet and happy.

    As they say, a blow of a wind may safe you running to the doctors ;-)

  • Here is the deal, OSX’s built in maintenance routine that defragments your hard drive only defragments files up to 20 MB in size. Which is all the average user needs but, if you do a lot of encoding with video or audio or anything for that matter that creates files larger than 20 MB you should not rely on OSX’s built in Defragger. In other words get a 3rd party defragger, it will help your machine perform optimally.

  • Whenever I purchase a new mac, I always buy a second HD for all of my files. (art files that can be quite large) That way my HD with the OS is pretty much left untouched except for any scratch disc memory PS might be writing and reading, but the OS is pretty much left untouched. And since the HS with OS has a very small % filled up, it seems to run much smoother…(than my imac at work where I use the 1 internal HD for everything)

  • I have been a Mac user since 1994. In the old days we used to run Norton Utilities, and that was a very good, effective disk optimization/defrag application indeed. Having been through the trauma of transition to OS X around 2004, I can say iDefrag really IS the cream of the OS X defrag utilities, because among other things it is the only single-purpose defrag tool out there, and unlike the other products available, is a true disk optimizer, so it not only puts all those file fragments back in a contiguous block, it optimizes file placement for faster boots, app launches, and files open and save quicker. iDefrag just does one thing (unlike Techtool Pro, Drive Genius, Speed Tools, which are part of a suite of utils), very well, and allows a technically proficient user to control the process, while remaining appropriate for mainstream users. The gist of it anyway is that on 3 Intel Macs since 2006, iDefrag has never failed me, and never caused anything more than very minor problems. Twice a year I run it on all three machines, and I always see a noticeable improvement (and it should be mentioned that a defragged disk is MUCH less likely to become corrupted or to lose data than a badly fragmented disk is)

    As far as whether OS X and your Intel Mac need defragging, or will benefit from it, consider this: the claims Apple makes for OS X having built in defragmentation and for it running on the fly are half-truths, at best. First, the defragmentation routine frequently gets deferred and sometimes gets “turned off” by the system altogether. It has no log and there is no command line interface to it, so it can’t be monitored or changed. Second, and more important, defragmentation is ONLY run on files less than 20 MB in size. Everything bigger is left untouched. That means that many apps, games, documents, photos, video, and even some audio files are NEVER defragged. Nothing. So a tool like iDefrag is very useful, especially if you are like me and download several gigs of various stuff every day, and move things around, edit movies in FCP and Premiere, docs and photos in Photoshop, Lightroom, InDesign, and Illustrator, to begin with.

    I do recommend defragging and disk optimization. And so far, I recommend iDefrag. I wish there was at least ONE other such tool, as Coriolus, the company that makes iDefrag, can be a pain to deal with. Coriolus is militantly anti-piracy, and in an attempt to prevent (at all costs) their products from becoming illegally copied and used, they have implemented procedures in iDefrag that have twice left me high and dry. If the license info the app uses each time it runs gets moved or corrupted, you have to reconnect to their servers and re-validate your copy of the program. As less and less common as it has become, their are times when I am not connectable to the internet (always at the worst time, right?) And the registration interface is picky, and totally suspicious (Coriolus REALLY, REALLY hate pirates, don’t even THINK of trying to use this thing without paying for it).

  • One HIDDEN, MAJOR problem with defragging Mac (HFS+) drives is that it may mess with the RARELY KNOWN file but cool new compression feature of HFS+ (since 10.5). (You can google ‘hfsCompression’ to learn about it.) I don’t know how Disk Utility or iDefrag work on such files, but generally, when a Squeeze-compressed file is copied, the copy is NOT compressed (unless steps are taken to make it stay or be compressed). Needs to be looked into/tested, but I’m not able to do so right now. Anyone?

  • Good article, but you should not defragment SSD drives. This was taken from’s Intel’s website.
    “Do I need to defragment my Intel® Mainstream Solid-State Drive (using Windows* Disk Defragmenter* or similar program)?
    No. SSD devices, unlike traditional HDDs, see no performance benefit from traditional HDD defragmentation tools. Disable any automatic or scheduled defragmentation utilities for your Intel SSD. Using these tools simply adds unnecessary wear to the SSD.”

    Tom’s Hardware Guide, and others say the same thing. Flash has a limit on how many writes before it fails. I was told that the life expectancy on the first USB flash drives and camera flash, was about 100,000 writes. So if you want to but new SSD drives more often then you need to, please defragment, but make sure you keep back up copies in case it ever fails.

  • Currently running a fill de Graff, although the progress screen has disappeared and I now have a blanc grey screen with the little loading logo running! Its been like this for a good while now! Is this normal?

  • Read lots about using iDefrag 2; a little sceptical but a little fed up with my super fast Mac now not being so super fast and having to listen to the hard drive clicking and whirring almost continuously. I use CleanMyMac every day and don’t have many start up programs running but I also use Photoshop, Lightroom and work with large RAW files every day too. Coupled to this, I have lots of large video files and several thousand songs in iTunes. I have had my Mac for eighteen months. Took the plunge, bought and used iDefrag, my hard drive looked an absolute mess. It’s now in terrific shape, is back to being fast and most importantly, the hard drive is just being used for reading and writing and isn’t churning away continuously like before. I understand why some people who may be using their Macs lightly are not getting the benefits and saying defragging is a waste of time, but for me, in my particular situation, I would say that it makes a massive difference. I don’t normally have the time to write reviews but made the time as I felt this needed saying to help others.

    • Your problem sounds more to me like a RAM issue. Use Activity Monitor (System Memory tab) to check out the state of your memory. RAM is inexpensive and is the best performance enhancer for any machine, irrespective of OS.

      I’m currently running my usual set of applications and, while I’m reporting very little free of my 8GB of RAM, there’s no paging going on and my machine is as fast and responsive as it was when I got it.

  • YES, FLASH DRIVES – I think people have forgotten about the flash drives (Macbook Air). I use iDefrag…no problems…obviously one needs to defrag on a Mac if someone actually went ahead and developed a software for it. I’ve noticed that when it comes to the topic of defragging, flash drives are always excluded.

  • I just defragged my 2TB iMac and it took 80 hours to complete. Is this normal!? I had iDefrag in “Optimize” mode.

    • Dean Riggott,

      It’s true that the process of defragmentation takes longer to finish. The reason behind this is keeping fragmented data together in memory location is not easy process, there are some defrag mac tools available which is faster like product of Stellar.

  • Hmm, isn’t a Mac a PC? Yes, of course it is. In the case of defrag, Mac OS X will handle things on its own.

  • Very good review about a software that defragments mac files and hard drive. hope it will clean my mac.

  • iDefrag is very famous tool for Mac defragmentation but there are many other tools which has similar features. One of my friends suggested me to use Defrag tool of stellar , I have used it and found very easy to use.