question about defragging

Discussion in 'macOS' started by okrelayer, Sep 12, 2009.

  1. okrelayer macrumors 6502a

    Joined:
    May 25, 2008
    #1
    I understand that mac osx automatically defrags files that are 20mb or less. I come into contact with many files that are over 20mb,and i regularly delete them. Would it be best to run a defragging application every so often?
     
  2. TuffLuffJimmy macrumors G3

    TuffLuffJimmy

    Joined:
    Apr 6, 2007
    Location:
    Portland, OR
    #2
    No. There's no reason to defrag OS X, unless you're getting errors when you try and partition your disk. OS X doesn't work the same way as Windows, it runs better with some level of fragmentation.
     
  3. okrelayer thread starter macrumors 6502a

    Joined:
    May 25, 2008
    #3
    yeah its just a question i was wondering. Because i download/delete larger video files (like 300 mb- 1 gig) or so, then i delete them after i use them. Just to free my mind a little bit. I've used Mac off an on my entire life. First computer in 1995 or so was a mac ect, just something to make me not worry i guess hah.
     
  4. SimonTheSoundMa macrumors 6502a

    Joined:
    Aug 6, 2006
    Location:
    Birmingham, UK
    #4
    It's highly unlikely files on a HFS+ hard drive will become fragmented. There are programs such as iDefrag which can defrag larger files, however this can have a negative impact on performance, and currently does not support Snow Leopard.
     
  5. TuffLuffJimmy macrumors G3

    TuffLuffJimmy

    Joined:
    Apr 6, 2007
    Location:
    Portland, OR
    #5
    I don't think you understand how hard disks work. It's not unlikely that files will become fragmented on HFS+, to some extent all files more than a block are fragmented. :confused:
     
  6. StanD macrumors member

    Joined:
    Oct 15, 2008
    Location:
    Raleigh, NC
    #6
    Hi there,

    Wanted to jump in here and dispel the partial "OS X can't get fragmented" blather that I see repeated over and over. HFS+ is just a File system built around B-Tree inode indexing and as such will only partially re-balance itself for files < 20MB or so (if me memory serves me right). The fact of the matter is that with files LARGER then that nothing happens and fragmentation will happen.

    This OS is not magical or anything people, really. It's just a File system, albeit not as shoddy as NTFS, it still can benefit from a good full FS de-fragment ever now and then (read: several months apart).

    For all you naysayers who believe otherwise: Good for you. For those looking for some information for their brain to chew on: I hope my post was of merit to you.

    As always, just my 0.02,


    - Stan
     
  7. chameleon81 macrumors 6502

    Joined:
    May 16, 2006
  8. occamsrazor macrumors 6502

    occamsrazor

    Joined:
    Feb 25, 2007
    #8
    One other thing to mention... most defrag programs have the option to consolidate free space, which tidies up all your files putting them nearer the first parts of the disk, which for a spinning hard disk (not SSD) is faster, quite a lot faster...
     
  9. Morod macrumors 68000

    Morod

    Joined:
    Jan 1, 2008
    Location:
    On The Nickel, over there....
    #9
    I think I have an Onyx disk or a Tech Tool disk around here somewhere. Doe either of these have a defrag tool/option on them?
     
  10. Amdahl macrumors 65816

    Joined:
    Jul 28, 2004
    #10
    +1 to Stan.

    OS X does not include Steve's Magic Pixie Dust. Only iPhone has that.

    I recommend iDefrag.
     
  11. sammich macrumors 601

    sammich

    Joined:
    Sep 26, 2006
    Location:
    Sarcasmville.
    #11
    If you have never filled your drive to over 85-90% since it's last format then any benefit of a full defragmentation will be lost, any perceived benefit you feel can easily be attributed to the placebo effect. So yes, HFS+ does not defrag files above 20MB...so what? Do you seriously want the OS to be constantly moving and rearranging these files when they get fragmented? How many files are larger than 20MB that aren't media files? Media files are streamed and not read in as an entire chunk where fragmentations will affect speeds. Other files such as databases are constantly being updated, enlarged/shrunk and the once off defrag of that file will be need to be done again.

    If you run a defrag on a drive over 85-90% then any benefit gained will be lost in mere moments as soon as you start using the computer.

    I was once an advocate of third party defragmentation on OS X but if you read up on how HFS+ works it's magic (I'll have to dig up that extremely good page) then you'll too realise that it's pretty much a waste of time. I did say 'pretty much' because a partial b-tree and hotfile defrag takes only moments and brings the most speed up.
     
  12. Amdahl macrumors 65816

    Joined:
    Jul 28, 2004
    #12
    SQLite. Apple is using it for storage in Mail, Safari's cache, and other places. Once they go over 20MB, these files can fragment with each item added or removed, and it is not pretty. This is why I recommend everyone defragment their Safari cache once. You can do it manually, yourself, with no special tools. Once it is done, it doesn't have to be done again unless you Reset/Empty the cache.

    There is a similar process to defrag your Mail database, and I think iPhoto as well.

    Actually, a drive that is this full is going to see the biggest benefit from the defrag. But yes, problems will reappear faster on this drive as well. Solution is more space.

    There is nothing magical about OSX. Nor Vista. But Vista happens to do automatic full defrag.

    Yes, this is precisely what I do most. I only do the full defrag once, or if something has happened to justify it. OSX does seem to show a faster boot after a good defrag, because it uses so many caches, and those greatly benefit from good placement and contiguous file location.
     
  13. okrelayer thread starter macrumors 6502a

    Joined:
    May 25, 2008
    #13
    all of the files i deal with that are over 20mb are media files, and if its true that those wont cause harm to the machine, i guess defragging is not an issue. I also have used cocktail in the past, as well as onyx.
     
  14. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #14
    Well, if they are deleted, they can't be fragmented anymore, right?

    It doesn't hurt you when one of these files is fragmented. If you download a video file and play it, it takes an hour to play it. Each "fragment" costs you maybe ten milliseconds, most likely less, when reading the file. So if you had 100 fragments, which is a ridiculously large number, that would add one second to the cost of reading the whole file. One second out of an hour. Defragmenting the file would involve reading all its data and writing it to another place; at 60 MB/sec reading and writing a 1 GB file would cost more than 30 seconds.
     
  15. Gregg2 macrumors 603

    Joined:
    May 22, 2008
    Location:
    Milwaukee, WI
    #15
    TechTool Pro has an Optimization routine, yes.
     

Share This Page