Does Mac OS X Defragment itself?

Discussion in 'macOS' started by n459umb4786ers, Sep 9, 2009.

  1. n459umb4786ers macrumors regular

    Aug 9, 2009
  2. cameronfield macrumors member

    Aug 11, 2009
  3. Amdahl macrumors 65816

    Jul 28, 2004
    It defragments files smaller than 20MB. It doesn't defragment the whole drive, which means free space can fragment up. iDefrag is a program that can defrag HFS drives.
  4. n459umb4786ers thread starter macrumors regular

    Aug 9, 2009
  5. MisterMe macrumors G4


    Jul 17, 2002
  6. cawesjmu macrumors 6502

    Apr 4, 2004
    Richmond, VA
  7. borcanm macrumors regular

    Nov 4, 2008
    Yes. I recommend using Drive Genius. Works well for me.
  8. sammich macrumors 601


    Sep 26, 2006
    HFS+ defragments the most commonly used files less than 20MB. It doesn't do a full typical defragment where all the bits are neatly stacked together because it's a huge waste of time.

    Really, there isn't much benefit to defragmenting, not on HFS+ volumes where capacity has never exceeded 90%, at least. Personally, I believe the benefit is there, but it's either small, or fades away so fast from files being moved/enlarged that you can easily attribute it to a placebo effect.
  9. Thomas Harte macrumors 6502

    Nov 30, 2005
    Further to this, it defragments sufficiently large files when you open them if it considers that there is sufficiently much free space that it can afford to do a defragment without temporarily consuming bytes you may be relying on being available.

    The various strategies for initial file placement also act to reduce fragmentation when compared to older filing systems.

    So, it'll defrag things automatically but only if you actually use them and only if your drive isn't too full. It's the latter condition that often leads to the advice that OS X users should keep at least 10% of disk space free for optimal performance.

    Given the various conditions applied, it is not unlikely that a program like iDefrag will be able to find files that exist in multiple fragments and to correct the fragmentation and for the whole process to have no effect on system performance.
  10. Bostonaholic macrumors 6502


    Aug 21, 2009
    Columbus, Ohio
    With the "is a defrag needed on OS X" aside...

    How would defrag on a conventional disk differ from defrag on a solid state drive?
  11. Bill Gates macrumors 68020

    Bill Gates

    Jun 21, 2006
    You wouldn't and shouldn't defragment an SSD.
  12. Amdahl macrumors 65816

    Jul 28, 2004
    Nope, only files up to 20MB.

    The free-space rule applies to every OS with intelligent placement algorithms, which is all of them these days.

    HFS is a B-tree based system, and the only way the B-trees get cleaned up is with a full defrag. If Defrag didn't have such an impact, you wouldn't see such a fascination with 'clean installs' of OSX.

Share This Page