Does OSX Defragment itself?

beatle888

macrumors 68000
Original poster
Feb 3, 2002
1,690
0
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
 

Nipsy

macrumors 65816
Jan 19, 2002
1,009
0
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.
 

beatle888

macrumors 68000
Original poster
Feb 3, 2002
1,690
0
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.
 

Nipsy

macrumors 65816
Jan 19, 2002
1,009
0
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.
 

evildead

macrumors 65816
Jun 18, 2001
1,275
0
WestCost, USA
Originally posted by Nipsy
OSX does not defragment itself.

OSX installed on HFS+ is suceptible to 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 fragmentation.

any drive is suceptible to disk fragmentation... doesnt matter the format.
 

Nipsy

macrumors 65816
Jan 19, 2002
1,009
0
Originally posted by evildead



any drive is suceptible to disk fragmentation... doesnt matter the format.
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.
 

Nipsy

macrumors 65816
Jan 19, 2002
1,009
0
Originally posted by cb911
so really defragmentation is not a problem that you really have to worry about?
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.
 

zimv20

macrumors 601
Jul 18, 2002
4,390
9
toronto
huh?

Originally posted by Nipsy


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.
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.
 

cb911

macrumors 601
Mar 12, 2002
4,122
3
BrisVegas, Australia
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 :)
 

Nipsy

macrumors 65816
Jan 19, 2002
1,009
0
Re: huh?

Originally posted by zimv20


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.
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]
 

zarathustra

macrumors 6502a
Jul 16, 2002
770
0
Philadelphia, PA
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!
 

zimv20

macrumors 601
Jul 18, 2002
4,390
9
toronto
Re: Re: huh?

Originally posted by Nipsy


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.
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 have a friend who runs a large number of Solaris boxes, and has for over 10 years, and has never once defragged them


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

seriously, maybe he's running tunefs.


Additionally, I'd be very wary of the current tools for OSX.


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.


It appears that:
OSX appears to be resiliant to it, and success/failures based on defragging are 50%/50%
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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.