The Macintosh Guy || MacTips || Email Lists || My Blog


MacTip #32, Fragmentation Part 2.


The primary consideration most people think about when looking at fragmentation is performance. It is easy to tell how fragmentation can reduce the performance of your Macintosh. Imagine that every time you open a particular file, instead of having to simply go to one location on your hard drive it must go to many different locations. And if the fragmented files happen to be a System file like the Finder or a particular extension, every single thing you do may require jumping to many different physical locations on your hard drive just to read information from one file. Imagine the difference between having to load five different files that are each separated into 100 different pieces scattered all over your hard drive and the same five files all lined up in single contiguous pieces right next to each other. The latter would certainly require less work on the part of your hard drive and get the information to your computer in a manner that would cause them to load as fast as possible.

One of the times when this situation may be most noticeable is when you are waiting for your computer to start up. This is particularly noticeable on slower Macintoshes. I've seen situations where starting from a fragmented hard drive took a couple minutes of constant hard drive activity. After optimization (the process of eliminating fragmentation) the computer would boot significantly faster with only minimal access to the hard drive. Not only does this save time but is also kinder to your drive, not making it work so hard for the information and thus making you it last longer.

A report on Mac Speed Zone shows an example where a fragmented hard drive reduced performance by more than 10% over a drive with no fragmentation.



Fragmentation can also play a part in the stability of your Mac. Although fragmentation is the cause of a very small percent of Macintosh trouble it can be to blame for various types of trouble with your hard drive. The reason for these problems comes from your Mac having too much to keep track of.

Imagine that before you could read the morning paper you had to go to hundreds of places to gather portions of each page and assemble them to form a complete paper. Really problems with fragmentation aren't much different than those that you would run into in the example of the morning newspaper. Sure if you only had a few pieces to put together you wouldn't have much trouble at all, but as the number of pieces increased and their size decreased the odds of loosing something or getting something in the wrong place is greater. If even a small part of a file gets lost, that file may be a little problematic or if the file happens to be one that is essential for the operation of your computer it could keep your Mac from starting up with that terrible flashing question mark.


Ease of Error Recovery

Keeping fragmentation to a minimum not only can increase performance and help with stability, it can be an advantage if you do run into trouble. Many times after a serious software corruption problem or if you do run into a hardware problem the next question is going to be "How can I get my data back?". If you do find yourself in the unfortunate position of needing to recover a hard drive, one with less fragmentation will generally be easier to recover and have less effected files.

Generally when a hard drive goes bad it will only be a portion of the drive that is effected. Think of it like a music CD (I was going to say LP but I didn't want to have the burden of explaining what one was!) with a scratch on it. The only songs that would be unplayable are the ones that are where the scratch was. Similarly on your hard drive, the only files that wouldn't be recoverable are the ones in the affected area. On a fragmented drive it is more likely that there will be more files that are in the bad area because there are more parts of each file spread over different parts of the hard drive. A drive with little fragmentation is more likely to have complete files unaffected by the problem area.


Areas of Excessive Fragmentation.

When thinking about fragmentation there are certain types of files that tend to easily become fragmented. Above we discussed a journal that is added to every day. Files that are frequently added to or significantly edited are more susceptible to fragmentation. Files like this are usually either databases that a company will use for tracking information like customers or products. Probably one of the most common among internet users are the files that contain your email. Each and every time you download your email, you are adding information to the files on your hard drive similarly to the journal we talked about earlier. Other files that are likely to get fragmented are ones that are automatically created or added to for you like log files that track events like accesses to a web site.

Other trouble areas are where a specific application may write files out to your hard drive and leave them there for a limited period of time. A classic example of this is the cache file for your web browser. Every graphic or page of text you view over the internet is copied over the internet to your hard drive. These files are stored on your hard drive in case you need to have access to them in the future (like if you hit the 'Back' button). As these items get out of date they are deleted to make room for more current files. All this writing and deleting of files tends to, over time, increase fragmentation because the files that are being deleted leave empty spots and the newer files don't always fit exactly into the spaces that are left.

Another area where fragmentation is apt to occur is when you are frequently copying files to and from your hard drive. If you are in a role where you receive files from others and load them to your hard drive and then move them to another place later you may be tangling yourself a twisted web of files. This is even more true when receiving or downloading files over the internet. Usually when you download a file from the internet it is both compressed and encoded to make it transfer faster and safely over the net. Once a file is downloaded it will converted to a un-encoded version and then decompressed. So in effect, this single file you download will actually be three files (usually a HQX or BIN, then an SEA or SIT, and then the actual file) before it is finished. Once again, all this converting and deleting of files over time can lead to increased fragmentation.

One final thing that can cause fragmentation is one of the least expected. Installing system updates can cause fragmentation. Especially if your hard drive is near capacity, it may be forced to install the software of the update where ever it can find room. In looking at my Duo after installing Mac OS 8.1, the System file was fragmented into 147 pieces. Given that every time I needed to access the system file, my computer would need to piece together all 147 pieces. I'm sure there was a negative impact on performance. After defragmenting, the time it takes to startup that Mac was reduced by 12 seconds.


Once you can identify the areas that are more likely to be fragmented you can see how important it is to make dealing with fragmentation a regular part of your hard drive maintenance. Now continue on to part 3 and see what to do about fragmentation.


The Macintosh Guy || MacTips || Email Lists || My Blog

This site, its source code, and the MacTips logo ©1996-2016 Eric Prentice. All other names, logos and images are copyright their respective owners.