Problem solve Get help with specific problems with your technologies, process and projects.

Four steps to lessen the effect of fragmentation

Most strategies for ameliorating the effects of fragmentation involve making the best use of free space on the hard disk drive.

Fragmentation hasn't been completely eliminated as an issue, but, thanks to changes in file system and hard disk drive technologies, it affects us much less than it used to. Consequently, disk defragmentation — the cure for fragmentation— isn't needed as urgently as it used to be either, although it still plays a role for IT administrators.

An expert on this issue is Mike Kronenberg, author of a disk defragmentation tool that was part of a suite of utilities originally published by the PC Utilities Mijenix division of Ontrack Data International, but which is now owned by VCOM. Kronenberg takes issues with some of the claims made by current vendors of defragmentation software.

"I challenge any defrag company to prove that, on a modern 2006 large drive about 50% full, defragmenting files will increase performance in any way that will be sensed by a user," says Kronenberg, noting that users are unable to tell the difference between Word loading in 6 seconds or 6.2 seconds. "Basically, nowadays defragmenting files will only provide a moderate performance boost when a drive is relatively full. Modern computers come with 250GB and larger drives that most people will never fill up."

According to Kronenberg, the amount of available free space on the drive determines how effective disk defragmentation is. A disk defragmenter can only work when there is free space available to move things around. The less free space, the more hobbled the disk defragmenter will be at doing its job. In addition, more free space on a drive means that there is more room for the file system to write out files and directories without fragmentation in the first place.

How to lessen the effect of fragmentation

So what are the best things to do to ameliorate the effects of fragmentation? Since most of the problems with fragmentation, as it pertains to modern hard disk drives, revolve around the amount of free space available, most strategies involve managing or making the best use of free space. Here are four steps to follow:

1. Defragment early. When you set up a new hard disk drive, whether as a data drive or as a new system drive, defragment it as soon as the first wave of installing applications, copying data, etc. is done. This allows the defragmenter to do a fair amount of work while there is still plenty of free space on the drive for that work to be done.

It also allows for some key file system structures to be written out in contiguous order, such as the swap or paging file, or the file the system uses to hibernate the computer. (Note: These files can be deleted and recreated if needed, but few people are in the habit of checking to see if they need this done, or doing so.)

2. Free some free space, or add some. If you're using a hard disk drive that's more than 75% full and remains that way consistently, it will be that much harder to do anything about existing fragmentation. Either move some stuff offline or upgrade to a larger drive.

If the drive itself is more than a few years old, odds are you'll be able to upgrade to a model that has at least twice as much storage, a faster bus type, faster rotational velocity and bigger on-board cache—all at the same price you paid for the original (or even less). All these things help offset any degradation of performance due to fragmentation.

3. Add more physical memory. Adding memory to any computer improves its performance across the board, including how well it deals with fragmentation. In general, if there's more memory, the system can devote more memory to caching hard drive access, and the overall effects of fragmentation are further diminished. Memory is cheap enough now that it makes sense to add a fair amount to start with. I'll pay off one way or another.

4. Do defrag, but not to excess. Set up a disk defragmentation schedule, but do it only when the process of disk defragmentation is not going to hobble performance—i.e., when you're not actually at the computer (or server) in question, or during a period of low system activity. Defragging more than once a week is pointless; the time spent doing the defrag far outweighs the benefits gained, especially if you do it that obsessively.

When you think about it, the war against fragmentation is really more of a subset of the ongoing struggle most people have against running out of storage space. One of the corollaries of storage space is that if you have it, it will almost always manage to get filled with something. People who could never conceive of filling a 250GB drive are now finding a whole galaxy of things to put on it, including MP3s ripped from their CD library or downloaded from online music services, video torrents, and virtual hard disk drives for VMWare or Virtual PC. Now that the space is there, not only is cramming a hard drive with every form of digital debris is possible, it's a little too easy.

The good news is that storage is not only continually becoming cheaper and faster, but more sophisticated. Solid state storage, where all the blocks in a given file system are contiguous and can be accessed at the same speed, might be the final death knell for fragmentation. But many of the negative effects are already being offset by technological developments that have been unfolding for some time.

Disk Defragmentation Fast Guide

 Disk defragmentation: Performance-sapper or best practice?
 New hard disk drives reduce need for disk defragmentation
  Four steps to lessen the effect of fragmentation
 Flash memory drive defragmentation: Does it make sense?
  Three disk defragmentation issues defined

Dig Deeper on Microsoft Hyper-V management