Microsoft is packing Windows Vista with all sorts of new
performance enhancement features. However, it has finally improved one of the
old performance enhancement features–Disk Defragmenter. Let’s take a closer look.

The story of disk fragmentation

As a seasoned IT professional, you know that disk
fragmentation is a normal occurrence that happens over time as you use your
hard disk. Chances are that you also know that disk fragmentation can be the
source of huge performance degradation if left unchecked. But a little
refresher course never hurts.

On the hard disk, a cluster is the smallest unit of disk
space that the operating system can address and as such is the smallest amount
of space that can be allocated to hold a file. On a standard hard disk
formatted with NTFS in Windows XP, the maximum default cluster size is 4 KB or
4,096 bytes.

Now, each time you copy new files to and delete old files
from your hard disk, as well as when you add information to existing files,
chances are good that your hard disk is becoming more and more fragmented with
each operation you perform. For example, when you copy a file to your hard
disk, the operating system attempts to place the file into the first available cluster
that it finds on the hard disk. If the file is larger than that cluster, the
operating system breaks the file into pieces and attempts to place the rest of
the file in the next available cluster. If this second cluster is not located
right next to the first one, the file is fragmented.

Fragmentation also occurs when you add information to an
existing data file. If the file that you’re working on outgrows its original
cluster, the operating system will place the rest of the file in the next
available cluster. Again the file becomes fragmented when the next available
cluster isn’t located right next to the first one. Furthermore, each time you
delete files from your hard disk, you create available clusters, thus increasing
the chances for future file fragmentation–especially if the files you delete
are themselves fragmented.

Over time, fragmentation can become a big problem if left
unchecked. As pieces of files become spread out, the hard disk’s read/write
heads have to do more work to locate and transfer files to memory. The more the
read/write heads move, the longer it takes to access files. Consequently, hard
disk performance suffers.

It gets even worse because the effects of fragmentation can
cause overall performance degradation, long boot-times, random crashes, as well
as unexplained lock-ups. In fact, an extremely fragmented hard disk can even prevent
a system from booting up at all.

Disk Defragmenter to the rescue

The most current version of Disk Defragmenter, which is licensed
from Executive Software and included in Windows 2000 and Windows XP, is a
utility that is designed to defragment your hard disk
by gathering up all of the pieces that make up a file and placing them in
contiguous clusters at the beginning of the disk. In the process, Disk
Defragmenter moves all of the available clusters towards the end of the disk.
Once the disk is defragmented and all of the files
are in contiguous clusters, performance will increase as the read/write heads
have less distance to travel to access any one file.

The problem

Even though Disk Defragmenter is fully capable of enhancing
performance, you have to manually run it–and you have to remember to run it on
a regular basis. Of course, the obvious solution would be to schedule Disk
Defragmenter to run automatically.

Unfortunately, Disk Defragmenter isn’t designed for
automation. In fact, it’s actually a dumbed-down
version of Executive Software’s Diskeeper, and the
scheduling features weren’t included on purpose in order to get you to purchase
the full-blown Diskeeper package, which of course
includes a SmartScheduling technology that
automatically sets a defragmentation schedule based
on how much you use your hard disk.

The solution

In Windows Vista, Microsoft finally added scheduling
capability to Disk Defragmenter. In fact, right out of the box, Disk
Defragmenter is scheduled to defragment your hard
disk once a day.

When I first installed build 5308 of Windows Vista, I wasn’t
aware of this feature and would hear this awful racket coming from the hard
disk–akin to the disk thrashing I used to regularly hear back in the Windows
3.x days when the operating system was struggling to keep the swap file in line—and
initially wrote it off as an odd glitch in the beta software. But when I
noticed it occurring on a regular basis, I investigated Task Manager and saw
that Disk Defragmenter was running in the background. There wasn’t any icon or
interface to indicate that it was running.

However, when I found the icon on the Start menu and
launched it, the scaled down UI appeared and indicated that Disk Defragmenter
was indeed running, as shown in Figure A.
As you can see, the schedule is indicated in the window, and when you click the
Modify Schedule button, you can adjust the schedule to your liking.

Figure A

By default, Disk Defragmenter is scheduled to automatically defragment your
hard disk.

Having Disk Defragmenter running on a regular schedule will
be a great performance enhancement as this means that the hard disk will never
become so defragmented as to degrade performance.
When you add this feature to the other performance enhancing features such as ReadyBoost, ReadyDrive, and SuperFetch, you begin to see that Microsoft is really
putting some effort into keeping the Windows Vista in tip top shape so that it
can deliver the best possible user experience despite the heavy load imposed by
the enhanced graphical UI and the other power-hungry features built into the
operating system.


Microsoft is not only adding new performance enhancement
tools, such as ReadyBoost, ReadyDrive,
and SuperFetch into Windows Vista, it is also working
on improving one of the oldest performance enhancement tools–Disk Defragmenter.
However, keep in mind that since the official release date of Windows Vista has
been pushed into 2007, that some of the information presented here may change
between now and the official release date. As always, if you have comments or
information to share about the Disk Defragmenter’s automatic scheduling, please
take a moment to drop by the Discussion area and let us hear.