Do I need to defragment?

Discussion in 'MacBook Pro' started by holdmusic, Jun 8, 2011.

  1. holdmusic, Jun 8, 2011
    Last edited: Jun 8, 2011

    holdmusic macrumors newbie

    Jul 23, 2010
    Please excuse my noobidity.

    My Macbook OS 10.4 has been running very slowly. Free disk space is scarce, despite the fact that I have only 3 gigs of photos, very little music, and no movies. OmniDiskSweeper shows me that a lot of space is unaccounted for.

    My dad suggested I repair disk permissions, and then run DiskWarrior to fix the various problems afflicting my lappy. Permissions repair went fine, but I can't run DW. It says that it can't find even 288 megs of contiguous disk space to temporarily store everything on my hard drive while it writes and optimizes the new directories. I've read that this means the disk space is so terribly fragmented there's not even 288 megs of space anywhere that has not been broken up.

    I've asked my brother about this problem, and he says that macs don't fragment in the first place. He suggested that I back up everything and erase and reinstall the OS. But my dad calls that an extreme option and says a lot of things can go wrong in that process. ("Let's not kill the mosquito with a bazooka," he says.)

    I'm not sure what to do. Should I try defragmenting? If so, what program should I use? I don't want to zero out and reinstall unless it's my absolute last option. I'd like to hear about other, less risky options that will either fix my lappy and get me all my space back, or give me enough contiguous space to run DW.

    Thanks a lot.
  2. GGJstudios macrumors Westmere


    May 16, 2008
  3. DustinT macrumors 68000


    Feb 26, 2011
    You should probably find out why you have so little free space. I like Disk Inventory X. Its free and will help you sort out what is taking up your hard drive space.

    Do you know how big your hard drive is to begin with?
  4. GGJstudios macrumors Westmere


    May 16, 2008
  5. holdmusic thread starter macrumors newbie

    Jul 23, 2010
    Yes, I have done that. OmniDiskSweeper shows me what is taking up space. My hard drive is 96 gig. Disk Utility says that 85 gigs of that is being used, but OmniDiskSweeper shows me that there's only 64 gigs worth of stuff on my lappy. This means that there are 21 gigs of space missing somewhere, and I can't access it simply by deleting stuff.
  6. GGJstudios macrumors Westmere


    May 16, 2008
    Did you try Disk Inventory X or Grand Perspective to see how that space is being used?
  7. Mal, Jun 8, 2011
    Last edited: Jun 9, 2011

    Mal macrumors 603


    Jan 6, 2002
    OmniDiskSweeper works just as well and in the same way as those two programs. You posted the suggestion twice now after he said in the first post he'd already done that.

    OP, I'd get a copy of DiskWarrior, you probably have some directory corruption. It'll put you back $99, but it's well worth keeping around anyways.

  8. GGJstudios macrumors Westmere


    May 16, 2008
    I suggested it again, in case they showed different results.
  9. palpatine macrumors 68040

    May 3, 2011
    Try DaisyDisk.

    I had a weird problem a while back (long story) in which I had a couple hundred gigs of space being taken up by files that a program had squirreled away in a directory. Once I figured out what was going on it was relatively painless to clear up the mess. You probably won't have the same issue I did, but Daisy Disk is pretty helpful in identifying the contents of your drive, and you might find it effective.
  10. Mal macrumors 603


    Jan 6, 2002
    They won't. All of those types of utilities show the same thing, because they show what's actually there. You're being remarkably thick-headed about this one...

  11. Pentad macrumors 6502a


    Nov 26, 2003
    As a University Professor that teaches CS and File Systems let me separate fact from fiction:

    -The Mac File System sucks. HFS+ is not a very good FS compared to more modern FS on other platforms (Linux for example). You don't have to believe me, read some great articles by Linus Torvalds on the Mac FS.

    -The Mac FS does indeed do small bits of defragmentation but depending on your work with the computer this may or may not be sufficient.

    -Those who will tell you that you NEVER need to defragment your Mac without asking what kind of work you are doing are just ignorant about how the FS and defragmenting actually work. I'm not trying to be derogatory but rarely is NEVER an all in one solution without having more information.

    -We have a lab that processes large TIFF images in Photoshop with different users, projects, etc... We have had great success with iDefrag

    -I think the folks that make iDefrag are great programmers. We also use iPartition and their support is always the best.

    -I think the Mac FS does fragment when working with moderate to large files, applications that create their own 'VM' for internal processes (PS I'm looking in your direction), and if you have multiple users with multiple projects.

    In the end, I think that iDefrag does a great job of keeping performance up. While I haven't taken the time to scientifically test my hypothesis -and I run the risk of the placebo effect- I think that it increase overall performance.

    FS Fragmentation on a mechanical drive will always affect performance depending on what you are doing. If you think your FS is degrading then I would try iDefrag. It's fairly cheap and I think you will be surprised at the results.

    Lastly, I was at a lecture given by Linus and he spoke about the 'hate' mail he received after he called the Mac FS 'crap'. He also talked about the holy wars that are started by questioning the need to defragment the Mac FS. He commented it was like arguing with people who think we never went to the moon. Sadly, that is a pretty good analogy. It's a FS not a religion and fragmentation comes with the technology...

  12. SavMBP15 macrumors 6502

    Mar 26, 2010
    Buy a bigger hard drive. $60 for 500gb drive. Problem solved.
  13. mrwonkers macrumors 6502


    Oct 31, 2004

    An iAd for iDefrag how very subtle....
  14. squeakr macrumors 68000


    Apr 22, 2010
    +1. I have to agree. Anyone that starts out stating their credentials to sway the reader and proposes to clear fact from fiction, but then goes on to praise a product for performance without in their words, any scientific proof to back up their hypothesis and offers up no hard support for their claims, sounds exactly like an ad or salesman to me and not irrefutable proof.

    Don't misunderstand me, I am not saying that MAC FS doesn't causes fragmentation, it just isn't as necessary as one would believe. Even the makers of iDefrag offer a free scan tool to assess whether your system needs defragmenting (and claim that the majority of users never will). I am a heavy user and on my old system after 2 years of zero maintenance on my part, their tool only reported 2% fragmentation on my system. I would say that is pretty good, considering my same Windows systems are usually 5-10% fragmented within a 1-2 week period.
  15. toke lahti macrumors 68020

    Apr 23, 2007
    Helsinki, Finland
    What is the name of that tool and can you point a link to it?
  16. ooans macrumors 6502

    Jun 4, 2011
  17. beaulm macrumors newbie

    Jun 14, 2011
    The apple filesystem(HFS+) defragments files under 20MB. Large files like raw audio and video are usually over that limit. Virtual machines usually aren't defragged at all.

    I have scientifically tested this. You can see my results at the bottom of this page:

    If you don't feel like reading the article I'll give you the answers to the important points being discussed here:
    1. Does HFS+ get fragmented? Yes
    2. Will defragmenting speed up my computer? Temporarily
    3. Will defragmenting create more space? No

    This original thread wasn't just about defragmentation though. I agree with holdmusic that a complete re-install should be a last ditch effort--although I disagree that it's likely to cause any issues.

    Here's what I recommend holdmusic:
    1. Find the missing space
    2. Defragment your system
    3. Run diskwarrior
    4. Run some other "voodoo" maintenance

    I've had numerous occasions where tools like Disk Inventory X and OmniDiskSweeper couldn't find the unaccounted for space. How did I find the extra space? Good 'ole fashioned command line tools.

    Finding the missing space:
    Open up the terminal(Applications/Utilities/Terminal).
    Type sudo du -sh /*
    Enter your user password(it wont give you any indication that you actually typed anything) and hit return.
    It will then present you with a true high-level list of everything on your computer. Look over the list and find where all your space is going. Let's say it's going to the /System folder. Then next command you enter should look like:
    sudo du -sh /System/*
    Repeat this process until you find the missing space. At a certain point you're welcome to start exploring with the finder if you think you're on the trail.

    Defragmenting your system:
    I personally don't care for the developers of iDefrag but I think they make a great product. Another very good tool is DriveGenius.

    Running DiskWarrior:
    If your computer has a firewire port you could try finding someone else with a mac with a firewire port and then install DiskWarrior on his or her computer and boot yours into target disk mode and connect it to their computer and then run DiskWarrior.

    Voodoo troubleshooting:
    I would recommend installing Onyx then restarting your computer and immediately after you log in press and hold the shift key. Once the system is fully started you can release the shift key and open Onyx. Go through all the steps involved in actually getting to the program and then click on the "Automation" tab and select everything and hit "Execute". Wait and then restart when prompted.
    You can zap your PRAM as well if you really want.

    You might find this page helpful:
  18. arcite, Jun 14, 2011
    Last edited: Jun 14, 2011

    arcite macrumors 6502a


    Sep 6, 2009
    Cairo, trapped in a pyramid with my iphone
    Clear Safari CACHE.
    Clear Firefox CACHE
    Repair permissions.

    Also, backup a few gigs of large movie files you may have hanging around your drive. I deleted 20GIGs of movies I had accumulating on my disk and it improved performance noticeably. While researching, I read somewhere that those very large media files can slow things down if your drive gets near to full.

    I have a stock 250 gig drive on my macbook. I used to defrag every other day on a windows machine, I don't see the point on OSX. IMO buying a program to defrag OSX would be a waste of money. Much better to invest in a larger Harddrive, if you want to go that route. :)

    ---another thing Check your DOWNLOAD folder, you may have old Bittorrent files or other junk in there eating up space.
  19. squeakr macrumors 68000


    Apr 22, 2010
    This is both correct and incorrect. Will it free up more space, the answer is no, the same amount of free space will remain as did before the defrag. Although the caveat to that statement is that depending on the block sizing used during the storage operations, more storage space can be created once defragmenation has completed. As free data blocks are moved to more contiguous formatting and this can create larger block sizing and allow for more storage space (as in if you need 6KB block and only have (2) 5KB blocks open not enough storage space exists to store the data, once the blocks are consolidated one 10KB contiguous block is available now and thus can store the 6KB of data, so it has technically created more space. This can also happen to allow data to be moved to more completely fill partial data blocks within used storage areas).

Share This Page