Disk Optimization

bobw

The Late: SuperMacMod
A new Apple Knowledge Base article says:


"Disk optimization is a process in which the physical locations of files on a volume are "streamlined." Files and metadata are re-arranged in order to improve data access times and minimize time moving a hard drive's head.

"Files can become "fragmented" over time as they are changed and saved and as the volume is filled, with different parts of a single file stored in different locations on a volume. The process of collecting file fragments and putting them "back together" is known as optimization. However, if a failure occurs during optimization, such as power loss, files could become damaged and need to be restored from a backup copy."

However:

"You probably won't need to optimize at all if you use Mac OS X. Here's why:

° Hard disk capacity is generally much greater now than a few years ago. With more free space available, the file system doesn't need to fill up every "nook and cranny." Mac OS Extended formatting (HFS Plus) avoids reusing space from deleted files as much as possible, to avoid prematurely filling small areas of recently-freed space.

° Mac OS X 10.2 and later includes delayed allocation for Mac OS X Extended-formatted volumes. This allows a number of small allocations to be combined into a single large allocation in one area of the disk.

° Fragmentation was often caused by continually appending data to existing files, especially with resource forks. With faster hard drives and better caching, as well as the new application packaging format, many applications simply rewrite the entire file each time. Mac OS X 10.3 Panther can also automatically defragment such slow-growing files. This process is sometimes known as "Hot-File-Adaptive-Clustering."

° Aggressive read-ahead and write-behind caching means that minor fragmentation has less effect on perceived system performance.

"For these reasons, there is little benefit to defragmenting.

"Mac OS X systems have hundreds of thousands of small files, most of which are rarely accessed. Optimizing them is a major effort for very little practical gain. There is also the a chance that one of the files placed in the "hot band" for rapid reads during system startup might be moved during defragmentation, which would actually decrease performance.

"If you think you might need to defragment, try restarting first."


You can check it out at:
http://docs.info.apple.com/article.html?artnum=25668
 
De-fragmenting a hard drive was a nice little os9 trick wasn't it? It's like cleaning out the fridge...
 
i think the keys here are "Hard disk capacity is generally much greater now than a few years ago" and "With faster hard drives and better caching". plus factors like amount of ram and processing speed. before i upgraded to a new 7200 40 gb hd, i found defragmenting to be very useful on the original 10 gb drive thqt came with my imac. since the upgrade i haven't noticed any need for this yet. so i would now say that the money spent on getting a defragmenting utility might be better spent in replacing an older undersized hd. however tools like techtool pro, drive 10 and diskwarrior are still helpful in maintaining other aspects of the filesystem and fixing problems as they arise.
 
I defrag my non-system partitions after i archive data. And I do that whenever i get enough data that can be archived onto a DVD, about every 3 months on average with no video work.
 
I loved to watch my defrag tool on dos. It tend to visualise the cleaning process of those unbound file clusters... It made me even watch the whole process which sometimes even took few hours ;)
 
Sorry to wake up this old thread, but what about Final Cut Pro users anybody? Many of the FCP books and even the Apple FCP manual warns not to use your boot drive to store all your render files since they will fragment your drive, but also says there is a risk of fragmenting any drive storing/writing all those large digital FCP files. I use a seperate drive for my FCP files, but I know a few people who are using just one drive. In either case, it seems defragmenting might be a good idea - if so, just what is the best tool out there these days?
 
Viro said:
But... defragmenting my drives gives me that warm fuzzy feeling...

the need for that warm fuzzy feeling could possibly mess up an osx install. defrag is totally unnecessary in osx and any sw company that knows whats up would not even code a defrag tool for osx.

the best thing you can do to osx is leave it alone. remember, macs are now part of the unix world where the water is cleaner and the sky is bluer. :)
 
karavite said:
In either case, it seems defragmenting might be a good idea - if so, just what is the best tool out there these days?

Copying data off of the drive, then erasing the drive and copying the data back defragments the drive, since the data being written back onto the drive is done file-by-file and therefore defragments the files (files will be written in contiguous blocks).
 
I still use Norton on my non system partitions. Works fine, never had a problem. None of my work is on my system partitions. I have 2 other hard drives for my work, one for work and the other to backup that work. I have my render locations set to non system partitions, except the backup drive.

I used one drive for everything when i was on OS 9, and needless to say i had frequent crashes, but X is more stable, but I still believe the amount of work i creayed just ate away at that drive. And that same drive is my backup drive today, and it works fine.
 
Thanks fort all the advice - I like Eldiablo's suggestion the best and it seems easy enough and logical, but none of these address the point that is made by Apple itself - FCP and large video files will fragment any drive. If Apple warns you about fragmenting, then it would seem they want you to defrag. Also, a drive just used for video files would not be running OS X - so why can't you defrag a drive like that?
 
You might want to take a look at this MacFixit thread on why defragment. And for the full story on what Panther's automatic optimization does and does not do, take a look at this MacInTouch discussion.
 
All good points, but as he said, he's not interested in defragging/optimizing the boot drive -- OS X will only defragment files on the boot drive, I believe, and if it does defragment files on other drives, it would only be applications that get the defrag.

Norton's disk defrag/optimize would be just fine to use on a non-boot drive, since it's just a regular HFS+ drive with data on it.
 
So, for someone who wants to defragment a NON OS X disk (just file storage), what tool should I use. Please not a Symantic tool - I just have a thing with them!
 
Does Onyx do disk defragmentation? I seem to see the option for optimizing my system. Anyone know what that actually does?
 
in osx terminology "optimizing" means prebinding which in the simplest terms makes apps open faster and makes the drive a bit more efficient in general. it is in no way de-fragmentation. defrag should never be done on an osx boot volume, only on data/storage drives.
 
I beg to differ with Blue&WhiteMan about optimizing (defragmenting) drives in OS X. First for the complete scoop on Panther's automatic optimization and what it does and does not do, see this MacInTouch post. Then check out this MacFixit thread on why defragment.

As I see it, defragmentation does not yield big improvements in performance, but...
  • When you have lots of big files such as AV projects
  • Your drive is approaching 15% free space or less (never let it fall below 15% free space)
  • The files are extremely fragmented
  • The drive is extremely fragmented
Then defragmentation is a good idea and will help protect the file system from the dreaded overlapped extents allocation error.

At the present time there are only two tools available for optimizing (defragmenting) the files and drives in OS X; Micromat's TechTool Pro 4 and Micromat's Drive 10. Of the two TechTool Pro has lots more features and the most recent defragmentation algorithms, but both do a good job of defragmentation. You can still buy Norton Utilities for Macintosh that has SpeedDisk, but I do not recommend it because among many other reasons, Symantec has dropped all development of the Mac tools.
 
Back
Top