Disk defragmentation

when you install something big/important (software updates for 1 example), after it finishes, it says 'optimizing disk volume'. i assume this is it defragging automatically - i was impressed when i first saw this - solid apple ideas
 
When you open or save a fragmented file that is larger than 20 MB the OS tries to make it contiguous, but that's about all. No defragging of unused space, no relocation of files to optimize startup times or anything like that.

EDIT--- Made a couple of mistakes here, only files SMALLER than 20 MB are defragmented this way. Also, some relocation of files do occur on journalled disks (journalling is on by default for disks formatted in 10.2 or later). Files that are never written to, only read from, will be relocated to a "hot area" of the disk, if they are read often enough. ---/EDIT


The optimizing that occurs at the end of installations has to do with prebinding, most applications use several files (reminiscent to Windows DLL concept), and the system wants to know which ones to use at startup. That information is stored in a "database" of sorts, to speed up application launches. The optimisation is merely an update of that database, no files are moved in this process.

There are defragmentation applications available, and if you often run out of space, so you are deleting files to install or save new ones it might be a good idea to get one of those apps.

Me, I've never bothered, and I've been running the oldest of my systems for three years since I last formatted the drive (right after I bought it). I have no idea how fragmented my drive is, but it doesn't run slower than the second oldest that I reformatted last week (same CPU and disk combination). My guess is that you will loose all the time you gain from a defragmented disk during defragmentation, i.e. it will take as long or longer to defragment your disk as the time you are likely to save from faster disk operations until the next defragmentation session...

In short: don't bother.
 
Great, thanks for the replies guys.

Think i will leave the standalone defrag app and let OSX do its tang :D
 
Techtool Pro 4 will defrag/optimize. It's also a disk repair app.

Diskwarrior is also helpful to have from what I've heard. It's a disk repair program, no defrag, but it is unique in that it can rebuild a drive's directory structure.

Doug
 
Lt Major Burns said:
when you install something big/important (software updates for 1 example), after it finishes, it says 'optimizing disk volume'. i assume this is it defragging automatically - i was impressed when i first saw this - solid apple ideas
We all know what happens when we assume don't we? :D Well the term optimize is used in several very different contexts within OS X. In this particular case it refers to the Unix process more properly called "pre-binding." This is a process where all of the resources used by an application are identified and links created to them. This binding takes place every time you launch an application, unless the application has be pre-bound and the links recorded. It has nothing to do with defragmentation, but it does speed up application launch time.

There is a limited automatic file defragmentation and system optimization built into OS X when journaling is enabled. For a good description of OS X's automatic optimization processes, see this MacInTouch thread. Unfortunately the price of limited automatic file optimization (defragmenting) is increased disk fragmentation.

Personally I use TechTool Pro 4's optimization (defragmentation) function and more recently I have used iDefrag when my drives get heavily fragmented. I can't tell much difference between these two in speed and performance except iDefrag has more options.
 
iDefrag seems to be a lot cheaper than TechTool Pro. If they provide the same functionality when defragging, that makes iDefrag a cool tool. Of course, you don't really need to defrag an OS X drive.
 
Viro said:
iDefrag seems to be a lot cheaper than TechTool Pro. If they provide the same functionality when defragging, that makes iDefrag a cool tool. Of course, you don't really need to defrag an OS X drive.
Yes, but TechTool Pro does a whole lot more than drive defragmentation so you cannot compare the prices directly. Defragmentation is less than 10% of TechTool Pro's functionality.

Your second statement is debatable. Take a look at this MacFixit thread on that subject.
 
Back
Top