Defragging OS X El Capitan partition?

Discussion in 'Mac Apps and Mac App Store' started by Glassed Silver, Jun 11, 2016.

Tags:
  1. Glassed Silver, Jun 11, 2016
    Last edited: Jun 12, 2016

    Glassed Silver macrumors 68000

    Glassed Silver

    Joined:
    Mar 10, 2007
    Location:
    Kassel, Germany
    #1
    Hey guys,

    I've tried to get some best practices (/programs) for defragging my Mac, or more specifically, my El Cap partition (shared with a Bootcamp partition hosting Windows 7 and of course the usual recovery partition for OS X).

    I've tried Drive Genius 3 once, but it caused problems. Well that or another event that occurred at the same time maybe.
    To be frank, I don't really remember it too well, because right around that time my Mac failed anyways and I had to get my GPU replaced through Apple.
    Maybe that's what I remember.

    Anyhow, I'd love to hear what everyone considers to be a safe approach to defragging a Mac.
    I know OS X does a better job at this than Windows, but I really think it's time to do this.

    Glassed Silver:mac

    PS: defragging can be either live or offline (booted from a stick or DVD) - guess offline is better as it can move files a live defrag can't. :)
    PPS: no, I don't have an SSD, otherwise I wouldn't ask. :) Thank you for everyone who tried to stop me from unnecessarily wearing out a drive though. The least it's done is prevent a googler from doing this! :)
     
  2. gnasher729, Jun 11, 2016
    Last edited: Jun 11, 2016

    gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #2
    The safe and recommended approach is to delete the defragging software.

    As Les said: _Never_ on an SSD drive. With a HD drive, it isn't helpful. With an SSD drive, it will harm your drive.

    And if your HD is full, defragmentation will take ages. Much better to replace the hard drive with a bigger one.
     
  3. chscag macrumors 68000

    Joined:
    Feb 17, 2008
    Location:
    Fort Worth, Texas
    #3
    Most folks will tell you that defragging OS X is not necessary. And usually it isn't. It's only when you start to let your hard drive fill up that OS X will slow down considerably and that's when defragging may help. I purchased iDefrag a while back and have since updated it for El Capitan. It can do an off line defrag by booting from a flash drive. You can purchase a license for iDefrag for $39.95.
     
  4. Les Kern macrumors 68040

    Les Kern

    Joined:
    Apr 26, 2002
    Location:
    Alabama
    #4
    there is no need to defrag any more. And it should never be done on an SSD.
     
  5. mic j macrumors 68030

    Joined:
    Mar 15, 2012
    #5
    Please save your time and money and move on from those "PC" days. There is no need to degrag a Mac drive.
     
  6. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #6
    Since most Macs now have SSDs, I'd say to avoid defraggers like the plague, they cause the SSD to incur excessive write cycles for no good reason.

    OS X in general doesn't need to be defragged and performance with SSDs are such that you'll not likely see any improvements since there is no read/write had that has to move around to read the data blocks.
     
  7. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #7
    As others mentioned, it is not needed on an SSD. But if you have a hard drive, I'd say things are less clear. If you often work with a lot of large files, then the drive can become fragmented since OS X built in defrag routine only works with file sizes smaller than 20MB. So you may benefit from defragmentation. I have seen several posts in here from forum members that saw real disk speed increases after defragmentation.

    If you Google search "os x disk defragmentation", you can see some articles on this. I do see iDefrag mentioned a lot in the articles, but have no experience with it myself.
     
  8. Glassed Silver thread starter macrumors 68000

    Glassed Silver

    Joined:
    Mar 10, 2007
    Location:
    Kassel, Germany
    #8
    My Mac doesn't have an SSD and no, OS X on the fly defrag is not perfect.
    Also, my OS X install is already in the first 6/10 of the drive, so the faster part, but it's still unbearably slow sometimes.
    Why? Because my drive is almost always at 80-90% full, more leaning towards 90% most of the time, so especially when doing OS X updates and upgrades system files will fragment and not be placed in their best location on the disk fairly often.
    OS X may defrag on the fly, but it can't do wonders whilst at the same time trying to install in a timely manner.

    "PC days thinking"? If you understand how HDDs and fragmentation work and how OS X does NOT do a perfect job, how could it, you would know that yes, defragging is still needed in certain scenarios.

    Thanks. I've heard that Apple use Drive Genius themselves, so I thought I'd try that, but it's pretty costly and iDefrag sounds like a decent priced product.
    I'll look into it!

    I'll eventually upgrade to an SSD for OS X and make my HDD Windows-only on this Mac, but that's still some time away and in the meantime I'd love to have a better performing Mac.
    Thanks for 5400rpm, Apple. (and the cumbersome upgrade process... You're real champs! /s )

    Glassed Silver:mac
     
  9. whg macrumors regular

    whg

    Joined:
    Aug 2, 2012
    Location:
    Switzerland
    #9
    I have an iMac 27" mid 2011. I recommend using something like this:
    https://www.amazon.com/Transcend-512GB-Thunderbolt-StoreJet-TS512GSJM500/dp/B00NV9LSEE
    The internal HD is the weakest part of non SSD iMacs; and Apple's SSDs are too expensive.
     
  10. Big Bad D macrumors regular

    Joined:
    Jan 3, 2007
    Location:
    France
    #10
    Hard drives, even on Macs, when close to being full can benefit from very occasional defragmentation. I have been happy and without problems using iDefrag.
     
  11. Glassed Silver thread starter macrumors 68000

    Glassed Silver

    Joined:
    Mar 10, 2007
    Location:
    Kassel, Germany
    #11
    Well, I'd rather not get a Thunderbolt solution and have YET ANOTHER DRIVE sitting on my desk hehe. :)

    Thanks for the info that TB seems to be a reliable boot option though I guess?
    I had been wondering about just that a year or so ago.

    I'd rather really just mount it internally, even though I don't really fancy having to open a 2011er iMac, but I've worked on harder projects, so yeah.

    Guess what I really don't want to see happen is the SSD breaking down and then having to redo the whole process twice (removal, sending it in for replacement, reinserting).

    Are there any TB cases, just in case I change my mind again, that don't cost a lot?
    I'd prefer to chose the SSD itself freely, independent from the enclosure.

    Glassed Silver:mac
     
  12. grahamperrin, Jun 12, 2016
    Last edited: Jun 12, 2016

    grahamperrin macrumors 601

    grahamperrin

    Joined:
    Jun 8, 2007
    #12
    What about a solid state, solid state hybrid or hard disk drive where the HFS Plus catalog file is in hundreds or thousands of fragments?

    Postscripts

    @Glassed Silver Do I need to defrag external hard drive?

    From a Time Machine volume, in 2011 (not hundreds of fragments, but you get the idea):

    Screen Shot 2011-04-14 at 09.33.32.png Screen Shot 2011-04-14 at 09.35.34.png

    Also attached: a 2012 example of a startup volume with 36Gi free and a 1G swap file (swapfile8) in more than two thousand fragments. With compressed memory in more recent versions of the operating system, there's less likelihood of a use case requiring nine or more swap files but still, it's desirable to have reasonably good contiguous free spaces.
     

    Attached Files:

  13. Dopeyman macrumors 6502a

    Joined:
    Sep 5, 2005
    Location:
    Los Angeles!
    #13
    Drive Genius 3.2.5 is my personal preference to defrag my drive. I have a small 20GB hard drive in an external case with just the OS and DG on it. I use that to boot and to defrag my main drive. Defragging offline is much better (just like you said).
     
  14. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #14
    An SSD drive doesn't care about fragments. It _does_ care about tons of tiny files being moved around and doesn't like it at all.

    And your HFS Plus catalog file isn't read sequentially, it's read like a database. Piece by piece. And it gets cached in RAM.
     
  15. Glassed Silver thread starter macrumors 68000

    Glassed Silver

    Joined:
    Mar 10, 2007
    Location:
    Kassel, Germany
    #15
    Why 3.2.5 over 4.x?
    Upgrade cost or anything beyond that?

    I see I could get an older version for less and whilst I do suspect they didn't have to reinvent the wheel for newer versions of OS X they specifically do advertise usage of older versions for systems below Yosemite I think.

    Maybe it's more about the binary running smoothly and a bootable stick or DVD is independent from that, but I don't want to risk anything or have my system files arranged poorly, because an older version may not recognize everything correctly.

    Glassed Silver:mac
     
  16. whg macrumors regular

    whg

    Joined:
    Aug 2, 2012
    Location:
    Switzerland
    #16
    After using the quoted Transcend Thunderbolt-Drive to my satisfaction (I have installed the Bootcamp partition on it, by the way), I wanted to use a Samsung 850 1TB SSD in an external Thunderbolt case. For this I ordered this item:
    https://www.amazon.com/gp/product/B00G9TZM22/ref=od_aui_detailpages00?ie=UTF8&psc=1
    I should get it in about 2 weeks. From the comments at Amazon it should be possible to replace the conventional HD with an SSD drive and get reasonable performance. I'm too afraid of opening my 27" iMac and prefer the external solution. As there are no separate power supplies needed, this seems to be a viable solution to me.

    By the way, in the past I used Drive Genius 3 (installed on a USB stick with boot capability) to defragment the internal HD of my iMac. The performance gain was not really worth the cost and time spent, in my opinion. I think it is much better to try not filling up the disk too much. As long as about 30% of the HD is unused the performance is OK without using a defragmentation tool.
     
  17. grahamperrin macrumors 601

    grahamperrin

    Joined:
    Jun 8, 2007
    #17
    Impossible when, for example, that file alone is larger than the amount of installed memory.

    At http://apple.stackexchange.com/a/19358/8546 there's a 3.5 GB example; I have seen many that are far larger.

    That's not always true. In 2014 @AidenShaw drew attention to the following:

    Also:

     
  18. Miguel Cunha macrumors 6502

    Miguel Cunha

    Joined:
    Sep 14, 2012
    Location:
    Braga, Portugal
    #18
    I tried several programs, including Drive Genius and TechTool Pro which caused more problems than they solved

    I ended up selecting iDefrag which is, in my opinion, the best by far.

    Not only it defragments files, but it also optimizes and organizes them for better performance and checks your drive/partition for errors. You can also defragment individual files - very useful when your drive is not very fragmented, but some files are spanned across it.

    Note that in the case of files through RAID configurations (ex: video), you SHOULD NOT defragment, because that's the very purpose of working in RAID - to distribute files across drives, for speed and redundancy.
     
  19. Fishrrman macrumors G3

    Joined:
    Feb 20, 2009
    #19
    mic j posted common Mac misinformation above:
    "Please save your time and money and move on from those "PC" days. There is no need to degrag a Mac drive."

    There absolutely IS good reason to defrag a Mac drive in some situations.

    This is particularly so for those who work with audio or video, and do a lot of recording with same. Typically, audio or video apps need a large contiguous block of "free space" so that they can lay down a clean, continuous stream of data. Any fragmentation they encounter can interfere with this process. As a result, data may be lost.

    It's also true for drives that have been in use for some time.
    Over time, without defragging, the drive will acquire thousands of areas of "fragmented free space" between data files. This is immediately apparent if you "view" the platters of a drive with a defragging app that can show you each individual sector.

    This definitely slows a drive down when trying to find or write a file.

    Defragging will not only re-concactenate any fragmented files (the Mac OS can defrag -some- files, but not -all- of them), it will also re-group them "at the head end of the drive", leaving a contiguous block of free space "at the end".

    The same reasons that make defragging a good idea (periodically) on a Windows drive make doing so a good idea on a -Mac- drive, as well.
     
  20. G4DPII macrumors regular

    G4DPII

    Joined:
    Jun 8, 2015
    #20
    Drive Genius is what they use in the Apple Stores when they have a sluggish Mac with a spinner brought in. Saves so much time just running that before doing anything else.

    To say Mac OS X defragments as it goes is how it is supposed to happen, but it doesn't work like that sadly. As with any Spinner, cockups happen and the OS misses things.

    Thankfully as everything starts moving to SSD's this should become less of a problem as anything the OS misses TRIM should pick up.
     
  21. Tech198 macrumors G4

    Joined:
    Mar 21, 2011
    Location:
    Australia, Perth
    #21

    Fair enough, but even a spinning hard drive would sill need defrag...... The idea is not because u don't have enough space, but to speed up performance, since as files are written there scatted across the drive...

    It take time for the head to read each one and move, but once defrag, all files are contiguous.

    But not on ssd, because while SSD's write in blocks i guess not really needed.... how faster can u made an ssd ? its already faster than a spinning hard drive so is pointless to even defrag one.. and even if u did use one, the speed would still be limited to the interface.
     
  22. grahamperrin macrumors 601

    grahamperrin

    Joined:
    Jun 8, 2007
    #22
    A point: it's sometimes useful to defragment at least the metadata (the B-trees).

    @Glassed Silver if you purchase a product, go for one that can focus on optimising the metadata. iDefrag has that capability. (I also have Drive Genius but have not used it for a long time. I can't recall whether Drive Genius has that capability.)
     

Share This Page