Disk fragmentation in OS X?

alra111

Registered
Greetings,

I'm wondering if disk fragmentation also happens on Mac OS X? If so, what is the best utility for defragging the disk?

Thanks,

Alra111
 
I'm wondering if disk fragmentation also happens on Mac OS X? If so, what is the best utility for defragging the disk?

There is quite a bit of mythology surrounding this topic, and a lot of varying opinions.

You can read about it in depth, with lots of citations to refer to, at:

http://www.macattorney.com/ts.html
Item #6 and note #1

The short answer is that if you have lots of free space left on your hard drive, and you don't need the very last bit of performance from your Mac, and you don't do something like edit video, you probably don't even need to think about defragmenting your hard drive. In fact, OS X does a certain amount of defragmenting automatically. But those are a lot of "ifs".

You can view the amount of fragmentation your drive currently has using the free demo of iDefrag:
http://www.coriolis-systems.com/iDefrag.php
(though the demo version of iDefrag cannot defragment your drive)
 
Glad i read this post. i just downloaded the iDefrag Demo. I am a Storage Engineer who mainly does large Unix systems - wish I had a tool like iDefrag.

So, quick answer; all disks (filesystems actually) get fragmented. If you logically model your disk as a 2-D circle viewed from the top, the outer portion of the disk (tracks) have the lower-numbered addresses & get used first by the O/S Filesystem. Compared to the inner tracks, data access is about 25% faster on the outer versus inner tracks. If you delete some files on these outer tracks, this coveted disk real estate will get used to create new files.

I have a 4 year old Mac mini that is 41% full. iDefrag said 527 out of 372K files are fragmented(.1%; not much). About 50% of my fragmented files have 3 or less fragments. The top 3 fragmented files at 672, 440, & 416 fragments (pretty darn fragmented in my opinion) and are the Safari SafeBrowsing.db files for the 3 accounts on the system.

If you are concerned about issues such as this you should consider a disk defrag tool.

Be careful. The doc's for iDefrag caution that you should backup your computer before using.

If you are serious about your data you should place your applications ie the /Applications directory and your data ie the /Users directory on separate filesystems & only defrag the data. That way if defrag breaks your filesystem, you only break /Users & you still have an O/S for recovery instead of installing/configuring the whole system from scratch.
 
I have defragged plenty of systems the homemade way by making a disk image of the drive in question. Zeroing out the drive in question. Load a clean OS. Created a dummy user and ran all needed updates. Then migrate the data form the .dmg back onto the hard drive. As far as I'm concerned thats gotta be about close to the best defrag tool there is.
 
Actually, simply copying the data to a disk image, then copying the data back (as long as it isn't a block-level copy) is an easy way to "defrag" a drive. No matter what fragmented condition the data copied off was in, copying it back writes it sequentially and without fragments.
 
Be careful. The doc's for iDefrag caution that you should backup your computer before using.

I think that all disk utilities suggest that somewhere. I even recommend it on my Routine Maintenance Web site. It's a CYA thing. But, of course, everyone should have a backup in any case.

For what its worth, I've communicated with hundreds of folks who have used iDefrag. And my Routine Maintenance Web site has over 3/4 of a million hits. No one has ever related that they had a single problem while using iDefrag. It is a very safe to use utility.
 
Back
Top