Do you have to defrag a Mac?

Discussion in 'macOS' started by z400central, Jun 24, 2007.

  1. z400central macrumors regular

    Joined:
    Nov 8, 2006
    #1
    Just did it to my Windows machine, and was wondering if I have to do it to my mac as well?

    Thanks!
     
  2. janey macrumors 603

    janey

    Joined:
    Dec 20, 2002
    Location:
    sunny los angeles
    #2
    all files under a certain size are automatically defragged.

    otherwise, no. there are other things you can do to speed things up, and defragging on a mac isn't one of them.
     
  3. petvas macrumors 601

    petvas

    Joined:
    Jul 20, 2006
    Location:
    Mannheim, Germany
    #3
    The short answer is no. As long as your Mac has 20% free available Hard disk space, it will automatically defragment the Hard Drive (in the background)
     
  4. sfisher macrumors regular

    Joined:
    Jun 20, 2007
    Location:
    Albuquerque, NM USA
    #4
    No need on the Mac OS X :D

    (I'm sure someone will disagree with me though since there are defragmentation programs for Mac OS X)
     
  5. Sbrocket macrumors 65816

    Sbrocket

    Joined:
    Jun 3, 2007
    Location:
    /dev/null
    #5
    Short Answer: No

    Long Answer: Mac OS X, or more specifically the filesystem (HFS+), is such that your traditional defragmentation is unnecessary. First of all, the system automatically tries to keep (at least small to medium) files from fragmenting in the first place. Second, the ordering of data on the disk is optimized by the system to speed up your system. Someone a bit more fluent in the actual working of "why" might want to clarify what I'm trying to say, but suffice it to say that, while you can if you want, defragmenting may actually slow down your machine rather than speed it up.

    In other words...: Mac OS X is not designed to be defragmented by the user but rather to handle such things for itself. User intervention that reorders files on the disk screws with OSX's way of doing things and potentially slows it down. You certainly aren't barred from defragmenting your drive, but Apple discourages it and it likely won't help you at all.
     
  6. codo macrumors 6502

    Joined:
    May 17, 2006
    Location:
    England, United Kingdom
    #6
    I defrag my Mac once a month with TechTool Pro 4, and it speeds it up no end. OS X only defragments small files, below 20MB I believe.

    I notice a speed difference in booting, launching applications and working with large video files etc.

    Read about it here.
     
  7. janey macrumors 603

    janey

    Joined:
    Dec 20, 2002
    Location:
    sunny los angeles
    #7
    Meanwhile, it's not actually doing anything.

    Every single technical and statistical analysis of HFS+ and fragmentation has shown that defragmenting is not even worth the time to perform.
     
  8. rpp3po macrumors regular

    Joined:
    Aug 16, 2003
    Location:
    Germany
    #8
    That's only true for drives with more than 20% free space. When you approach 10% and only files below 20MB get automatically defragmented its physically impossible to avoid fragmentation.

    For example, the letters are data on a disk, '____' is free space:

    aaaabbbbbbbb__cccccccdd_eeeeeeeeffffggg_____

    Now erase 'dd' and write 'hhhhhhhhh' being larger than 20MB.

    You get something like:

    aaaabbbbbbbbhhhccccccchhheeeeeeeeffffggghhh__

    'hhhhhhhhh' just got fragmented and even the best filesystem in the world couldn't avoid that without manual defragmentation or automatic inclusion of files >20MB.

    Now delete 'ffff' write 'iiiii' and so on. HFS+ not needing fragmentation is a plain fanboy myth. As soon as you fill up your disk up to 10-20% free space for a month or so, then do some heavy downloading, copying some movies, etc., your disk performance is going to suffer severly. HFS+ isn't superior in any way to NTFS, but for the latter you get excellent defragmenters at least (FAT is different, that really IS a crappy filesystem).

    It's correct if Apple says don't worry about fragmentation on OS-X. It's true, but they should tell you that this only applies to disks with enough free space. As soon as you miss on that you're in a dead end. Your disk isn't going to magically defragment again when you erase enough to have room again. Without a good defragmenter, and I only know crap for OS-X, disc performance will suffer from now on till reinstallation or deletion of the fragmented files.
     
  9. janey macrumors 603

    janey

    Joined:
    Dec 20, 2002
    Location:
    sunny los angeles
    #9
    I understand and agree with the situation you're talking about, and perhaps there is a need for a good defragmenter but as it stands now there are no good ones and for the people who really seem to care about fragmentation-related declines in performance for a full-capacity drive, maybe it's time to deal with it (reinstall...cleanup...get a bigger drive...)

    I know that's a really bad answer, but there really isn't much to do if you honestly care about it. Plus at 80-90% capacity that doesn't give much room for any defragmenter to defrag to begin with.
     
  10. Bern macrumors 68000

    Bern

    Joined:
    Nov 10, 2004
    Location:
    Australia
    #10
    In all the years of owning Macs (since to early 90's) I have never once defragged any HDD's. It's a Windows myth.
     
  11. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #11
    Tiger gets so bitchy with a drive that full, that I don't think it's worth defragging just to be able to get away with that. I don't let drives get below 20% free....It needs the space to be comfortable with its index files, virtual memory, etc, etc. As well as its ability to auto defrag.
     
  12. Sherman Homan macrumors 6502

    Joined:
    Oct 27, 2006
    #12
    Defragging and optimizing are two different animals. The Mac auto-defrags, there is nothing to be gained by trying to run a utility to defrag again. However, optimizing involves placing all those defragged files in order. The big benefit there is that blank space is one big contiguous block. Makes for a much happier Mac.
    Just to add to mkrishnan's point about defragging a drive with less than 20 percent free space. Tiger is bitchy about using blank space, defragging a full drive isn't going to help, you need a bigger drive!
     
  13. codo macrumors 6502

    Joined:
    May 17, 2006
    Location:
    England, United Kingdom
    #13
    Couldn't disagree more. Just think LOGICALLY. If a 5 GB file is scatted all over a hard drive, it is going to take LONGER to read than if its in one piece.

    It is not a Windows myth. I would reccomend defragmenting to anyone that works with large files without a shadow of a doubt. People here claiming otherwise are simply wrong.
     
  14. aristobrat macrumors G4

    Joined:
    Oct 14, 2005
    #14
    I thought that most of the pro apps that created large files typically used something called a scratch drive and took care of managing that nonsense for the user?
     
  15. iShak macrumors 6502

    Joined:
    Dec 26, 2006
    #15
    I defrag my drive every 4 months (10.4.9) and it does make a difference .. I would say .. mac becomes 20% more responsive.

    It was when partitioning my hard drive using bootcamp for xp that I got an error that this disk cannot be partitioned . .googled for a solution and read some guy saying that you should defragment the drive .. I did and it worked! . .also I noticed a markable incerease in performance... so I defrag often now.
     
  16. PimpDaddy macrumors 6502

    Joined:
    May 9, 2007
    #16
    Which tool do you use to defrag?
     
  17. iShak macrumors 6502

    Joined:
    Dec 26, 2006
    #17
    I am using 'drive genius' ... its an expensive software though.
     
  18. one1 macrumors 65816

    Joined:
    Jun 17, 2007
    Location:
    Chattanooga, TN
    #18
    The best thing you can do for your MAC is to download the free program OnyX.
     
  19. scaredpoet macrumors 604

    scaredpoet

    Joined:
    Apr 6, 2007
    #19
    Honestly, if defragmentation were required on a regular basis, don't you think it would be part of the disk utility? OS X is a mature operatin system that has been around for a few years now. I'm pretty sure Apple would have figured out what tools were needed for basic routine maintenance and included them by now.

    On Windows machines pre-NTFS, you did need to defrag your drive from time to time for optimum performance. That's why defrag ended up being an included tool.

    Unfortunately, a lot of software vendors out there create these tools as snakeoil, and spread myths that you need to run this program to keep your system running optimally. And those who fall victim unfortunately feel the need to justify the money they've wasted by perpetuating the myth.

    Bottom line is you should follow the posted Apple guidelines. Most people just plain don't need to defrag.
     
  20. Bern macrumors 68000

    Bern

    Joined:
    Nov 10, 2004
    Location:
    Australia
    #20
    That's your opinion and not fact :rolleyes:

    Like someone already stated, if defragging your disk were necessary Apple would have included it as standard in Disk Utility just as Microsoft have it. In my opinion you are wrong.
     
  21. janey macrumors 603

    janey

    Joined:
    Dec 20, 2002
    Location:
    sunny los angeles
    #21
    Actually the explanation was logical and somewhat of a common theory.

    However, in real life implementation, it doesn't really matter, hence there isn't a defragger included with macosx.
     
  22. mad jew Moderator emeritus

    mad jew

    Joined:
    Apr 3, 2004
    Location:
    Adelaide, Australia
    #22
    Line up folks. Everyone who agrees we don't need to defrag our OSX drives, start bangin' your heads here. It'll do more use than any rational argument could ever possibly achieve.


    [​IMG]
     
  23. MisterMe macrumors G4

    MisterMe

    Joined:
    Jul 17, 2002
    Location:
    USA
    #23
    "Logical" conclusions drawn from a set of false premises and incomplete information are wrong.

    Defragging and optimizing hard drives in MS-DOS and Windows are necessary because Microsoft's file systems do a really bad job of indexing their data. Slow seek times and lost and cross-linked clusters result. Most other file systems including those from Apple are much better designed. Ask your engineering friends how often they defrag or optimize the hard drives of their Sun or SGI workstations.

    As a Mac user since 1989, I can't recall ever seeing a cluster lost or cross-linked. Having defragged and optimized Mac hard drives for technophobe employees for the first time after years of use, I have seen no measureable increase in performance. OTOH, defragging and optimizing a Windows hard drive results in dramatic improvements in performance even after a few months of use.
     
  24. basicfiend macrumors member

    Joined:
    Jun 13, 2007
    #24
    HFS+ is a log based file system (see Wikipedia :) ), but here's how it works a nut shell:

    First imagine the disk as continuous set of blocks that are circular --- the last block maps around to the first block. Then there are three regions on a log based file system:
    1. Unused but not reclaimed
    2. Currently used blocks
    3. Free blocks

    - All new files are added to free region. File creation is very quick...no mucking around trying to find free inodes and build an inode table. Just start writing to the known block where the free space begins. Oh, and all files are automatically contiguous.

    - Edited files are actually written as diffs to the free space region. In the background, the OS rewrites the file.

    - In the background, the OS reclaims space from deleted files.

    - The log file system circle of life: free blocks become in-use blocks, which become unused, which become free blocks.
     
  25. peejack macrumors 6502a

    Joined:
    Aug 7, 2007
    #25
    LOL, how did you measure that then?
     

Share This Page