Does OSX Defragment itself?

Discussion in 'Mac Help/Tips' started by beatle888, Oct 24, 2002.

  1. beatle888 macrumors 68000

    beatle888

    Joined:
    Feb 3, 2002
    #1
    Hello MacRumors people,

    I was wondering if MacOSX defrags itself. I
    thought it did but other people are saying it
    doesn't. I think IM right :) but wanted to be
    sure by asking you guys....

    ddtml what do you think?


    Also if OSX defrags itself then is it necessary
    for people doing video on there mac to
    defrag after every project? Or is OSX defrag
    feature good enough to make this not neccesary


    Thank you for your input
     
  2. Nipsy macrumors 65816

    Nipsy

    Joined:
    Jan 19, 2002
    #2
    OSX does not defragment itself.

    OSX installed on HFS+ is suceptible to some slowdowns from fragmentation, but it is usually unnecessary to defragment it, as speed gains are small, and risks are large.

    OSX installed on UFS is not suceptible to ill effects from fragmentation.
     
  3. beatle888 thread starter macrumors 68000

    beatle888

    Joined:
    Feb 3, 2002
    #3
    so people working with video should have a
    seperate partition for each job? i hear that
    when you work in video you should defrag
    or erase your working disk after each project.
     
  4. Nipsy macrumors 65816

    Nipsy

    Joined:
    Jan 19, 2002
    #4
    The quickest way to ensure you're working with clean disk space is to have a dedicated partition which you can wipe at will.

    Additionally, RAID, U160 SCSI, and good disks do a lot.
     
  5. evildead macrumors 65816

    evildead

    Joined:
    Jun 18, 2001
    Location:
    WestCost, USA
    #5

    any drive is suceptible to disk fragmentation... doesnt matter the format.
     
  6. cb911 macrumors 601

    cb911

    Joined:
    Mar 12, 2002
    Location:
    BrisVegas, Australia
    #6
    so really defragmentation is not a problem that you really have to worry about?
     
  7. Nipsy macrumors 65816

    Nipsy

    Joined:
    Jan 19, 2002
    #7
    Yes, but it is my understanding that UFS effectively prevents any ill effects caused by fragmentation.

    Therefore the OS & apps are not suceptible to problems caused by fragmentation.
     
  8. Nipsy macrumors 65816

    Nipsy

    Joined:
    Jan 19, 2002
    #8
    Well, I've experienced panicked emails from people who've destroyed their drives attempting to defragment, but none from people who said 'my disk is working too hard, how do I defragment'.

    Therefore, I would recommend avoiding defragmentation utilities until one comes out which is proven to succeed with OSX volumes.

    I would also recommend staying far away from Norton for OSX and Drive 10, and using Norton from OS9 only as a very last resort. Both are the cause of many headaches documented all over the web. Use Disk First Aid, fsck -y, repair permissions, then Disk Warrior from 9 in that order for the safest (and likely most successful) OSX maintainence.
     
  9. beatle888 thread starter macrumors 68000

    beatle888

    Joined:
    Feb 3, 2002
  10. zimv20 macrumors 601

    zimv20

    Joined:
    Jul 18, 2002
    Location:
    toronto
    #10
    huh?

    please explain that to me.

    here's my understanding: (file) fragmentation is the scattering of a single file to multiple sections of a drive. when the file is needed, those parts must be reassembled.

    the drive head MUST move to each of those sections. however quickly that head moves, it takes time. w/ badly fragmented drives, that time adds up.

    also consider the additional amount of time it takes the OS to write a file to fragemented drive -- it must go out and find enough chunks (using whatever optimization scheme is built in) so that file can be saved.

    i defrag often -- several times a month. i use TechTools Pro and have never had a problem.

    my advice is to defrag.
     
  11. cb911 macrumors 601

    cb911

    Joined:
    Mar 12, 2002
    Location:
    BrisVegas, Australia
    #11
    so it's better not to worry about any defragmentation programs? sounds good to me. i only use fsck -y whenever i have problems.


    and i'm guessing that any slowness in my HD is not from defragmentation, but only because it's a 4200RPM?:p :)
     
  12. Nipsy macrumors 65816

    Nipsy

    Joined:
    Jan 19, 2002
    #12
    Re: huh?

    Well, I can't expain it, as I'm going off of what I've been told, and read, which has lacked in technical details. However, If you'd like to google it, I would suggest searching for 'unix defragmentation tools', 'ufs fragmentation', etc.

    Let us know what you discover!

    It could be that UFS habitually cleans its mess in the background, it could have to do with write allocation methodologies, but whatever causes it, I'm pretty sure that defragmentation is just not part of the UNIX world. I have a friend who runs a large number of Solaris boxes, and has for over 10 years, and has never once defragged them (although he does his Windows box religiously). Much of this has to do with file system type (hfs+, NTFS, UFS, ext2, reiser, etc.) as well as the OS, and I do not think the research regarding OSX is really in yet.

    Additionally, I'd be very wary of the current tools for OSX. Many of them have been kludged together quickly in order to retain mindshare/market-share, and as such, are notoriuosly dangerous (google a few searches and you'll see what I mean!).

    If you're having good luck, and seeing a speed up, more power to you, but I'm going to wait until I feel a defrag is necessary (if ever), before risking one.

    To cb911: doing video on a laptop drive is often going to choke things, as the OS, the video, and the swap, are all on the same logical device. If you're concerned, I'd say your better off buying a FireWire external than a bunch of immature sw tools.


    [edit]
    Finding links, of which there are few:
    http://cbbrowne.com/info/defrag.html
    http://www.macslash.org/articles/02/08/01/1829246.shtml (loadsa of good info here, but you must read it ALL)
    http://www.applelinks.com/articles/2002/04/20020402131036.shtml
    http://www.macintouch.com/fragmentation.html

    It appears that:
    UFS defrags itself
    ext2, ext2fs, and reiser do not suffer measurable slowdowns from fragmentation
    HFS+ is suceptible to fragmentation, but under OSX appears to be resiliant to it, and success/failures based on defragging are 50%/50%
    HFS+ under OS9 is likely to benefit from defragmentation
    NTFS, FAT32, and FAT show great benefits from defragging
    [/edit]
     
  13. cb911 macrumors 601

    cb911

    Joined:
    Mar 12, 2002
    Location:
    BrisVegas, Australia
    #13
    thanks for the info and help, i've got things clearer in my mind now.:D
     
  14. zarathustra macrumors 6502a

    zarathustra

    Joined:
    Jul 16, 2002
    Location:
    Philadelphia, PA
    #14
    Re: Re: huh?

    To Nipsy:

    Thanks!

    I think MR needs more posts/posters like you. Yours was the most concise explanation to a very mundane but still important question!
     
  15. zimv20 macrumors 601

    zimv20

    Joined:
    Jul 18, 2002
    Location:
    toronto
    #15
    Re: Re: huh?

    from what i saw in those links, there is a BSD utility called tunefs that makes smarter write calls. iow, it does dynamic defragging. fragging is still part of the unix world, but it can be handled differently. i'm guessing there's a pretty stiff performance penalty w/ such writes.




    i know people who haven't brushed their teeth in 10 years :)

    seriously, maybe he's running tunefs.



    your point is well taken, but it's also needlessly scaring people off.

    again, i use TechtoolPro for defrags and it works fine (must do it from os9, btw, until they release their osx version -- it defrags the whole drive, regardless of which os the file belongs to).

    your assertion is rooted in truth. there are dodgy tools, i'm sure. much of it has to do w/ the methodology.

    TechtoolPro uses system calls to do the work. that means it makes full use of the os file system protections. it also doesn't delete the file it's copying until the copy is done (that is safe).

    other tools bypass the file system. though they run much faster, there's a danger of losing data should there be a power failure or crash in the middle of an operation.

    the same is true of backup programs. they're either fast or safe.

    i'm not sure where you're getting that info. the mere act of installing osx badly fragments the drive. i checked after i installed it onto a zeroed drive.

    HERE'S MY ASSERTION:
    reading fragged files and writing to a fragged drive take EXTRA TIME. i don't care what the OS is.

    note that, if unix systems behave as nipsy claims, the above is still true -- but the os is taking steps to limit the fragged conditions.

    again: my recommendation is to defrag
     

Share This Page