Defragmenting macs

Discussion in 'macOS' started by mcguin2000, Jul 5, 2006.

  1. mcguin2000 macrumors member

    Joined:
    Mar 1, 2006
    #1
    Just wondering, you sometimes have to use that defragmentation program in windows on a PC. Is the a Mac equivalent or don't they need it?
     
  2. Makosuke macrumors 603

    Joined:
    Aug 15, 2001
    Location:
    The Cool Part of CA, USA
    #2
    Defragmentation of smallish (under 20MB) files is handled automatically by the OS in the background, and in my personal experience, the modern MacOS is somewhat more resistant to fragmentation than Windows, so for most people (particulalry if you have a good chunk of your drive free) it's just not an issue.

    But, in the event you frequently work with large files (say, a lot of video scratch files), then you could buy a 3rd party utility to defragment. To be honest, I haven't used one in years (nor needed to), but they do exist.
     
  3. mcguin2000 thread starter macrumors member

    Joined:
    Mar 1, 2006
    #3
    Thanks, very helpful. Looks like I don't need to bother.
     
  4. WildCowboy Administrator/Editor

    WildCowboy

    Staff Member

    Joined:
    Jan 20, 2005
  5. WillMak macrumors 6502a

    Joined:
    Jul 29, 2005
    #5
    Haven't needed to defrag ever since I've switched. I love it! Haven't needed to constantly virus updates or do adware scans either! I love apple!
     
  6. evangelion-01 macrumors regular

    Joined:
    Jul 6, 2006
  7. bousozoku Moderator emeritus

    Joined:
    Jun 25, 2002
    Location:
    Gone but not forgotten.
    #7
    Early Mac OS (1985) was more resistant than Windows is now.

    I've got 3rd party utilities and the wait while defragmenting isn't worth the speedup or the danger of a power outage.
     
  8. yadmonkey macrumors 65816

    yadmonkey

    Joined:
    Aug 13, 2002
    Location:
    Western Spiral
    #8
    I'm not so sure about that automatic defragging. I've had clients with severely fragmented hard drives which consisted mostly of smaller, yet significant files, like photos and iTunes libraries. I've seen 40 GB hard drives with 8 GB free space and not a significant chunk of that free space contiguous.

    That said, I don't recommend defragging to most people, as there are all sorts of problems which can occur, but if you do choose to use a utility, make sure your hard drive is in good shape first - no bad blocks, clean directory, no errors in the file system. Too risky otherwise.

    I think the best means to defrag is by cleaning up your disk, copying it to a second drive or disk image and then cloning it back to the original drive. Again, making sure the drive is healthy first - Disk Warrior is a good cleaner for the directory. For a significantly fragmented drive, this can be much quicker and safer than using a utility, since you're creating a backup in the process.
     
  9. wmmk macrumors 68020

    wmmk

    Joined:
    Mar 28, 2006
    Location:
    The Library.
    #9
    hmmmm.....
    didn't know that defragging causes power outages!:confused:
     
  10. Killyp macrumors 68040

    Killyp

    Joined:
    Jun 14, 2006
    #10
    No, what bousozoku means is that if there's a power shortage half way through Windows defragging, or you pull the plug on the computer, it will corrupt the hard disk.

    We once had some work going on at our house (we have this quite often, but this was a while ago so I'll talk asthough it's very rare) and I decided (cleverly) to defrag my PC while the work was going on. Being a musician and wanting to work on all my music, I went ahead and started defragging. It got about 75% there, and then the workmen tripped a fuse. Obviously the computer went dead, but this was no problem. However, when I started it back up, it couldn't get into Windows. To cut a long story short, I lost everything on the computer!!!!!!

    Now with Macs.... it's a bit different!
     
  11. bousozoku Moderator emeritus

    Joined:
    Jun 25, 2002
    Location:
    Gone but not forgotten.
    #11
    Yes, you lose everything on Macs, too. That's extremely different. I've had luck with it and recovered a volume but lost a number of files.

    Depending on where it is in the process, it's more critical that the power stay on with the Mac because of the more sophisticated directory structure. FAT is reasonably simple to reconstruct.
     
  12. MisterMe macrumors G4

    MisterMe

    Joined:
    Jul 17, 2002
    Location:
    USA
    #12
    When in doubt, accept Apple's word. Afterall, it made the computers.
    Disk Warrior does not clean directories, it repairs them.
     
  13. wmmk macrumors 68020

    wmmk

    Joined:
    Mar 28, 2006
    Location:
    The Library.
    #13
    Yikes. I defragged my PC a lot back in the days before I had a nice UPS. Good thing I never lost data from that!
     
  14. howesey macrumors 6502a

    Joined:
    Dec 3, 2005
    #14
    You will not loose data even if the power goes. Most, if not all apps copy the data, once it has been copied and verified, it deletes the old data.

    How often do you get a power outage, every 3, 4, 5 or more years?

    If you do loose data, it can be recovered and fixed. You do not loose all your data. Oh no, you did manage to loose data, however you may have lost a chunk that stores two fonts, not the end of the world is it?

    I'd love to work out the odds of while defragmenting, having a power cut and then loosing some data. It may have more odds of myself winning the lottery and then getting run over by a rhino.
     
  15. bousozoku Moderator emeritus

    Joined:
    Jun 25, 2002
    Location:
    Gone but not forgotten.
    #15
    Are you sure about any of that?

    Here in Central Floriduh, the power interruptions are quite frequent every day because of a cheap power grid that hasn't been upgraded properly, which is now serving millions more than originally intended. It's also been patched after various hurricanes.

    It's one thing to have the power go out when it's writing the data to a few files. It's another thing when it's working on the catalog/directory structure. Suddenly, the data, while still there, is completely unknown and unattached and can't be recovered unless the catalog can be recovered.

    With the FAT system, it's so brainless that it's easy to protect. It's also for that reason that it should be de-fragmented weekly on a busy system. Mac HFS and HFS+ use binary trees to speed up file lookup and that resists a slowdown when the drive becomes very cluttered.

    So, it's not as clear as you apparently think it is.
     
  16. Eraserhead macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #16
    But they are a total waste of money, if you need to run them (eg because you free space is all fragmented) it is quicker to backup your data, reformat and reinstall the OS X. Especially as OS X doesn't require your to reinstall your applications afterwards (you can just copy them back) it's relitavely painless...
     
  17. sushi Moderator emeritus

    sushi

    Joined:
    Jul 19, 2002
    Location:
    キャンプスワ&#
    #17
    Even better...try using CCC.
     
  18. Eraserhead macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #18
    Nice tip, CCC is only $5 too!

    SuperDuper! looks pretty good too. (but its $27 for some extra advanced features)
     
  19. Makosuke macrumors 603

    Joined:
    Aug 15, 2001
    Location:
    The Cool Part of CA, USA
    #19
    Must be nice to live places like New York where a 4-hour blackout makes the national news, and you think power outages only occurr every few years.

    My power was out for THREE DAYS after a storm this January, and it was a week before my parents house a few miles away got power. Then there was a two week blackout about eight years ago. And it isn't just storms--ignoring the occasional rolling blackout during the summer, the power flicks out for no reason whatsoever several times a year when somebody at PG&E falls asleep on a switch or something.

    Not saying that there's a high chance of the grid going down while defragging, and I have a UPS personally, but it's not a "once in a blue moon" sort of thing, and there are those with far worse power grids than I have.
     
  20. yadmonkey macrumors 65816

    yadmonkey

    Joined:
    Aug 13, 2002
    Location:
    Western Spiral
    #20
    SuperDuper is great and copies metadata which CCC misses - specifically the creation date and maybe something else.
     
  21. yadmonkey macrumors 65816

    yadmonkey

    Joined:
    Aug 13, 2002
    Location:
    Western Spiral
    #21
    Are you being sarcastic? OS X does not defrag in the background, contrary to popular myth. Read the official Apple article. They don't claim anything about automatic defragging, keeping in mind that "Hot-File-Adaptive-Clustering" doesn't apply to files which don't "grow". They caution against it, which I think is wise on their part.

    Not sure why you're getting into semantics. No, it does not clean a directory. Yes, it repairs them when possible. However, I fail to see why using the word clean warranted correction.
     
  22. WildCowboy Administrator/Editor

    WildCowboy

    Staff Member

    Joined:
    Jan 20, 2005
    #22
    Apple seems to say otherwise.

     
  23. yadmonkey macrumors 65816

    yadmonkey

    Joined:
    Aug 13, 2002
    Location:
    Western Spiral
    #23
    Right, but this still isn't the same as "defragging in the background". This hot-adaptive thingy happens when you access files and won't defrag fragmented files which aren't being accessed.

    Regardless, my only and original point was that it is not always sufficient. I've seen plenty of severely fragmented drives running OS X with as much as 20% free disk space.
     
  24. Val-kyrie macrumors 65816

    Joined:
    Feb 13, 2005
    #24
    Won't cloning and restoring a fragmented drive result in a fragmented drive? Or perhaps I don't understand what you mean by "cleaning up your disk." By "clean," do you mean "defrag"?
     
  25. Makosuke macrumors 603

    Joined:
    Aug 15, 2001
    Location:
    The Cool Part of CA, USA
    #25
    No. The clone operation copies the files one at a time, which in turn defragments them if the destination drive is empty to start with. Cloning back and forth has always been the most "surefire" way of defragging a drive (though it technically doesn't allow you to put the most heavily accessed files in the fastest portion of the disk... but as said, if they're small, the MacOS does that for you anyway). It's also a moderate hassle, and if you're cloning a boot partition, it can cause annoyances when you have to reset a couple of things depending on how you clone.

    That is, however, why I keep most of my "heavy use" data on a seperate partition from my OS--that way when I repeatedly create and delete huge scratch files, if I'm fragmenting the drive at least it's not my OS partition so it won't affect the speed of anything but those files. Also makes bootable backup clones easier, since there isn't as much data to clone.
     

Share This Page