Can I defrag a Mac?

Discussion in 'iMac' started by vim147, Mar 5, 2014.

  1. vim147 macrumors regular

    Joined:
    Nov 14, 2011
    #1
    I have a Mac mini 2012 with 1tb HHD. I've been sorting out some files and deleting some under wanted software/apps and transferring to an external drive.

    I have freed up 500gb of space. Just wanted is there a program like on windows to defrag so that the hdd with perform quicker ?
     
  2. xraydoc macrumors 604

    xraydoc

    Joined:
    Oct 9, 2005
    Location:
    192.168.1.1
    #2
    Unnecessary. OSX will move files around automatically as needed.
     
  3. Fatboy71 macrumors 65816

    Fatboy71

    Joined:
    Dec 21, 2010
    Location:
    UK
    #3
    It's not needed on a Mac :)

    Thing I noticed when I moved from Windows to Mac was that I can spend more time using my Mac, rather than performing system maintenance like defraging, scanning for virus, spyware, and also bombarded with Windows updates.

    Just enjoy using your Mac vim147 and let it look after itself as and when it needs too :)
     
  4. lamerica80 macrumors 6502a

    lamerica80

    Joined:
    May 22, 2008
    #4
    Amen to that. :apple::D
     
  5. Fishrrman macrumors G4

    Fishrrman

    Joined:
    Feb 20, 2009
    #5
    Yes, you can and SHOULD defrag a Mac periodically.

    Ignore what others say.

    OS X can automatically defragment -some- files, but what it does is limited.

    One thing OS X -CANNOT- do is compact and optimize file distribution on a HDD. That is, over time the free space on a volume will become fragmented. If the drive gets towards full, there won't be enough "contiguous free space" for the OS to handle the VM swap files (and other temp files) without a lot of disk activity.

    A drive could report "XXgb free", but that alone is misleading. What the report doesn't tell you is whether the free space is fragmented, or not.

    Running a defragmentation/optimization utility will clean out the thousands of fragments of "free space", and concactenate them at the "end" of the drive, where they should be.

    I've kept 9-year-old drives running quick 'n' smooth this way...
     
  6. Big Ron macrumors 6502

    Big Ron

    Joined:
    Dec 7, 2012
    Location:
    United Kingdom
    #6
    All very good Fishrrman but would you care to tell us all what program you use to defrag?:D
     
  7. Old Muley macrumors 6502a

    Old Muley

    Joined:
    Jan 6, 2009
    Location:
    Titletown USA
    #8
    iDefrag is one option. I purchased this application years ago before realizing defragmentation probably wasn't necessary on OSX.
     
  8. Big Ron macrumors 6502

    Big Ron

    Joined:
    Dec 7, 2012
    Location:
    United Kingdom
    #9
    :(You see this is the problem with this Thread:mad:

    Someone asks a perfectly resonable question. Its followed buy a robust statement saying its not necessary, followed by a helpful Apple support link.

    Totally contradictionary advice which doesn't help the Thread starter at all.

    Fishrrman has obviously carried out a defragging regime for years and it works for him - Apple says "NO"

    The bottom line to all this is - Were all still no clearer :(:(

    We could conclude 90% of these Threads with "Its your choice":(
     
  9. Georgio macrumors 6502

    Georgio

    Joined:
    Apr 30, 2008
    Location:
    Essex, UK
    #10
    You do not need to defrag a Mac disk as the OS sorts out the tracking in the background automatically.
    Might be worth verifying the disk every couple of years but unless there are obvious problems it's best to let the OS do what it's best at.
     
  10. keysofanxiety macrumors 604

    keysofanxiety

    Joined:
    Nov 23, 2011
    #11
    No, it's not a problem with this thread. It's a problem with people giving bad advice. Apple have said you don't need to do anything, and still people choose to.

    Even now, there's an subconscious element of uncertainty and distrust of computers. Perhaps it's innate, social, or simply old habits from ex-Windows users, but it seems a lot of people feel they have to do something on their computer to make sure it's still running well.

    Check the oil in your car, and check the tyre pressures. Check all the lights are off before you go to bed. Check the calories in the food you eat. In almost all elements of life, people want to feel like they're in control. People don't want to just use their computer and leave it, without personally feeling they're contributing to its well-being.

    Here's the thing: OS X looks after itself. Apple have said it, and most people know it. For any software problems, OS X has everything you need. Run a Disk Utility verification every now and then, or a permissions repair where necessary.

    For hardware issues, check things like the hard-drive SMART data, or run a MemTest if you're getting kernel panics.

    Even if Jony Ive himself said this, people who suggest things like defragging will never listen.

    OP: You will do more harm than good if you do things like this. Just use your computer and don't worry.
     
  11. Kayan macrumors 6502

    Joined:
    Jul 7, 2010
    Location:
    CA
    #12
    An alternative

    My personal favorite way of keeping a quick computer is once every 1-2 years, I triple check that I have good Time Machine backups that are current, as well as Dropbox backups of smaller important files, then I completely wipe my hard drive of everything and reinstall a clean copy of the newest OS. After this, I reinstall only software that is necessary at the time and leave all the old software behind that I don't use anymore. Lastly, I do NOT restore from my Time machine backup! What I do is only bring back the important folders that I know I will need, and then everything else I bring back one file at a time only on an as needed basis.

    This process deletes lots of old, unused files and keeps my system optimized. My 5 year old MBP is still running strong. This whole process doesn't take too long especially since I have a routine now, like starting it before I go to bed, then finishing it before I leave for school the following morning, and it's ready for me when I get home later on. With a cloud storage backup, like Dropbox, this process is mostly automated.
     
  12. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #13
    Count me in the camp that states defragging is unnecessary. OSX can defrag small files as needed. They also locate heavily used files to certain hotband areas for quick access. degragging will impact that performance, so you'll actually slow things down.

    I think only for certain narrow tasks where data has to be contiguous, like video or audio editing, you'll need to defrag but for general usage, most modern file systems can adept and deal with fragmented files better then a stand alone application.
     
  13. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #14
    I never bother to defrag, but I suspect some of the differences of opinion arise from this archived KB article from Apple and the quote below.

    I do recall from previous threads on this topic HFS+ does not defrag files larger than 20MB, so this is likely where the "large files" issue comes in. I have no idea if this 20MB file size issue has changed with more recent OS X versions.
     
  14. Big Ron macrumors 6502

    Big Ron

    Joined:
    Dec 7, 2012
    Location:
    United Kingdom
    #15
    A Moderator has spoken, that's good enough fo rme.:)
     
  15. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #16
    I am not the end all and be all of knowledge and there are plenty of smarter folks here on the forum. I just added my opinion as a member not in any official status :)
     
  16. Hirakata macrumors 6502

    Hirakata

    Joined:
    Mar 17, 2011
    Location:
    Burbank, CA
    #17
    Here is my $.02. Do not defrag an SSD.

    As far as HDDs are concerned, OS X handles "file" fragmentation well, so files are not spread all over the drive. OS X does not do "drive" fragmentation and is susceptible to large amounts of free space fragmentation. As long as there isn't much "drive" fragmentation, there won't be a performance hit. It becomes a problem when there are no longer any large areas of contiguous space on the drive for OS X to use virtual memory, swap files, save files, etc. That's when things will slow down and you should use iDefrag or something similar. With the size of HDDs these days though, (and the number of external drives people use) it shouldn't be often. (I'm pretty much strictly SSD now but in the past, I would use iDefrag on my main HDD once a year.)

    Read this for a better explanation:
    http://www.macobserver.com/tmo/answers/how-and-why-to-defragment-your-macs-hard-drive

    As far as people saying Apple says you don't need to, well technically you don't, but in time you will take a performance hit. For example, Apple also says 16GB is the max RAM my 2011 iMac can take. I have 32GB in it. Apple is just trying to make it easier for people.

    Bottom line: Can you? Yes. You won't damage anything. Should you? It's your call.
     
  17. Fishrrman macrumors G4

    Fishrrman

    Joined:
    Feb 20, 2009
    #18
    [[ OP: You will do more harm than good if you do things like this. Just use your computer and don't worry. ]]

    Nonsense.

    There are good reasons to do routine maintenance on Macs.

    One reason you see so many posts on this forum (and on others) to the effect, "my Mac is running SO SLOW -- what can I do?"

    Cleaning up the HDD is one way to get some of that speed back. A fragmented hard drive, straining to keep up with the demands of VM, Time Machine, Spotlight, etc. is going to slow the Mac down.

    If you examine Apple's documentation, it makes no claims that the OS will defragment all files. OS X can re-concactenate -some- files of certain sizes. But not all. And the OS does nothing to re-concactenate all the "free space between files" that builds up over time from usage.

    Use a utility like Drive Genius or iDefrag to examine a Mac drive that has been in use for a while. It's an eye-opener...

    As the post just above stated, the SSD changes everything. No platters, no moving parts, no need to defrag.
     
  18. n-evo macrumors 65816

    n-evo

    Joined:
    Aug 9, 2013
    Location:
    Amsterdam
    #19
    Back in 2007 I checked once what the status of my eMac was after 1,5 year without formatting. Fragmentation turned out to be less than 1%. If you feel your drive is fragmented, it's in most cases faster to format en reinstall than to actually defragment a 1 TB drive using whatever utility.
     
  19. scaredpoet, Mar 9, 2014
    Last edited: Mar 9, 2014

    scaredpoet macrumors 604

    scaredpoet

    Joined:
    Apr 6, 2007
    #20
    This is actually quite true. You'll be done faster doing a restore from a Time Machine backup, erasing your hard drive and re-writing your files from scratch, than the successive data reads, moves and rewrites required in a defragment operation.

    That said, count me in as being in the camp that says defragmenting is no longer needed. Back before multi-hundred-gigabyte drives (let alone multi-terabyte ones), storage space was tighter and file systems were a lot less sophisticated. And at that time, contiguous space was harder to come by.

    But now, this is rarely the case. The only time fragmentation may become a real problem is when your hard drive is more than 95% full... and at that point, you have two realities:

    1. Defragging a 90%+ full drive that's a several hundred gigabytes or more is either not going to take very long at all (because there's no fragmentation) OR it's going to take a VERY long time (because the fragmentation will be very high and available space will be very low).

    If it's the latter, you're probably looking at multiple hours, if not days, to defragment... time you won't be able to use your Mac. It'll take definitely take longer than the time "wasted" by just leaving the drive the way it is and continuing to use it. And definitely longer than wiping and restoring from a Time Machine backup.

    2. Even if you DO defrag such a drive, you're only masking the real problem here: you're running out of space and you need a bigger drive. The drive will either fragment itself again pretty quickly, OR you'll run out of space, be forced to upgrade, and all that time spent defragmenting will be wasted for nothing.


    As for Macs running slow: most of the time, such problems can be traced to lack of RAM, not defragmentation. If you're paging out constantly and the hard drive is slowing you down because of it, then the problem isn't the hard drive. It's that you're out of RAM.

    As for Time Machine: that's mainly a read operation on your boot disk, and a straight write operation to an external drive. If you're not meddling with your Time machine disk, nearly all of those write operations should be contiguous. Spotlight is very similar. Both resources will at worst slow you down only for a short time after the initial OS install (when the hard drive is going to be its least fragmented anyway).

    Defragmenting used to have its use, back in the day (though I think even back then, people probably did it more often than was useful). But now, doing a defrag on a traditional hard drive is mostly a placebo, and a waste of time. If you insist that I'm wrong, fine. Waste your time if it makes you feel better.

    But whatever you: Do not defrag an SSD. Doing so will absolutely have no benefit, and will actually shorten the life of the drive.
     
  20. Big Ron macrumors 6502

    Big Ron

    Joined:
    Dec 7, 2012
    Location:
    United Kingdom
    #21
    Well thats it:

    Totally confusing and contradictionary advice.

    Anyone care to opine a definitive answer?

    Though not:cool:
     
  21. phrehdd macrumors 68040

    phrehdd

    Joined:
    Oct 25, 2008
    #22
    Simple answer - yes you can defrag.

    1) use a defrag program
    2) back up your drive and install the backup (use the proper software to do this)

    What is missing from this equation are all the other facets of drive clean up related to how OSX uses database structures and more. i-defrag handles some of these items, Onyx did as well and a few others.

    OSX has built in features that work on their own but do far less. This is not an opinion but simply the facts. Whether one is happy with minimal "clean up" by OSX is to each their own.
     
  22. T'hain Esh Kelch macrumors 601

    T'hain Esh Kelch

    Joined:
    Aug 5, 2001
    Location:
    Denmark
    #23
    Several people have given their definitive answer.

    Personally, I go with Apples recommendations. I believe they know more about their hardware than RandomDude1 on RandomInternetForum2.
     
  23. Gav2k macrumors G3

    Gav2k

    Joined:
    Jul 24, 2009
    #24
    Op the definitive answer is....

    No you don't need to. Simple as that.
     
  24. phrehdd macrumors 68040

    phrehdd

    Joined:
    Oct 25, 2008
    #25
    Interesting - Microsoft said original their system didn't need defragging. IBM said similar with OS/2 yet both* over time came to the conclusion to defrag is a viable and useful tool. Microsoft used for years a crippled version of Executive Software's "Diskeeper." IBM opted for 3rd party solutions. Apple tells us lots of things and woe to those who take them at face value. This is not about "their" hardware but about file structures on a drive and the inherent placement of data and removal.

    Having used defrag tools on a Mac drive I can say it definitely showed challenges with fragmentation. As I also stated, one can simply back up a drive with the right software and re-install the backup to remove most fragmentation. The latter works for Windows as well.

    As well, various storage type network servers of the past were said to not need any optimizing tools and that too proved incorrect. Just because a maker boasts it doesn't "need" it doesn't make it gospel.

    Last - as another poster said, SSD requires special consideration and I would not suggest using a defrag tool. (Fusion for that matter has its own issues as well).
     

Share This Page