Even though workstation administration is a never-ending task for support technicians, you can find software out there that will reduce the amount of time you spend doing monotonous tasks such as defragmenting a hard disk. Two such programs designed specifically for defragmentation are the Windows Disk Defragmenter and Executive Software's Diskeeper 6.0. In this Daily Drill Down, I’ll give you an overview of disk fragmentation, teach you how to use both utilities, and present a brief comparison of the two programs.
An overview of disk fragmentation
When data is written to a newly formatted disk, it’s written contiguously; the data is written in either a single or consecutive cluster(s) on the disk. The read/write head on the disk can then access the data with one movement and not be forced to move to several places on the drive to retrieve the same data. You get an efficient computer system and faster access times.
Over time, though, files will be erased, moved, or modified, or new files will be written to the disk, causing fragmentation. In fact, a newly formatted drive with Windows 2000 freshly installed will have minor fragmentation because temporary files were written to, and then erased from, the disk while the operating system was being installed.
Fragmentation occurs when a file is erased and the clusters become free space. This free space is then used randomly when new data is written to the disk. The chances are slim that the new files will be written to the disk contiguously. Instead, the file is broken into pieces, or fragmented, and written to several places on the disk. Thus, you’ll have areas of free space located randomly across the disk, as well as pieces of files that have been spread out among several clusters. System performance degrades because the disk’s read heads must move to several locations to retrieve the data. This not only takes extra time for the drive to move from place to place, but it also takes more time to locate all of the clusters where the data is being stored.
When fragmentation occurs, it can be one of several types:
- File fragmentation happens when a file is written to the disk in several, noncontiguous places. A disk that has a large amount of file fragmentation will experience much longer read times and take longer to reboot.
- Free-space fragmentation occurs when the free space is broken up into small, scattered segments on the disk. A disk that has heavily fragmented free space will take longer for the read head to move to several places on the disk to write the data.
- The Master File Table (MFT) is an index file that keeps track of everything stored on the disk. The MFT of a disk that has been formatted using NTFS has an entry for each file, as well as an entry for the MFT file itself. Each MFT entry contains the size, time stamp, date stamp, security attributes, and the location of each piece of data that makes up the file. The MFT also becomes fragmented over time, resulting in longer read times and performance degradation of the computer system.
- The Windows 2000 paging file (called the swap file in previous versions of Windows) stores data from RAM when the system’s memory requirements are exceeded. When the data is needed by the computer system, it’s moved back into memory and other data is moved from RAM to the paging file. When the Windows 2000 paging file becomes fragmented, the computer system suffers from abnormally long disk access times.
- The hibernate file is used to store data on the hard disk when the computer is powered off and is then used to restore the system to its previous condition when the computer is turned back on. If the hibernate file is heavily fragmented, the restoration process will take much longer than necessary.
- Files are stored in directories, which can also become fragmented, resulting in longer file-access times.
To keep your computer system running at an optimum level, you should not only routinely defragment the hard disk, but also the MFT, paging file, hibernate file, and the directories used to store these files. Some of these components can be defragmented using the Windows 2000 defragmenter utility, while others require a third-party defragmentation utility such as Diskeeper.
How defragmentation works
The defragmentation routine is a relatively straightforward process. Whatever utility you’re using will locate fragments of each file on the disk and then copy them to a location where they can be stored contiguously, verifying that the data hasn’t been changed during the move. The MFT will then be updated with the new location of the file, and finally, the clusters that were previously used to store the data will be classified as free space. The result is that bigger areas of free space are opened up so that larger files can be written contiguously to the disk in the future.
When the defragmentation process is complete, the disk will have only a small amount of file fragmentation or free-space fragmentation. The areas reserved for the MFT, system files, paging file, and hibernate file cannot be moved during defragmentation, which could lead to slight fragmentation left on the disk.
Using Windows 2000 Disk Defragmenter
|The main window shows the volumes defined on the system and a graphical fragmentation analysis of the highlighted volume.|
The Windows 2000 Disk Defragmenter utility is built into Windows 2000 and must be run manually on the workstation by a user with Administrator rights. To access Disk Defragmenter, you can go to the Properties page of the drive or partition that you want to defragment and select the Tools tab, where you will find the utility. The main Disk Defragmenter screen is shown in Figure A.
The first step in defragmenting a volume is to analyze it and see if it needs to be defragmented. Highlight the volume and click on the Analyze button on the main Disk Defragmenter screen. Disk Defragmenter will analyze the drive and then recommend whether or not you should defragment the drive. You’ll also receive a visual analysis in the Analysis Display portion of the Disk Defragmenter window, as shown in Figure B.
Once the analysis is completed, if the volume needs to be defragmented, like the one shown in Figure B, you can simply highlight the volume and click on the Defragment button. Disk Defragmenter will begin to defragment the volume. The Defragmentation Display line shows you how the volume is being arranged during the defragmentation process, and a progress bar is displayed at the bottom of the Disk Defragmenter window.
Should you wish to stop or pause the defragmentation process, you can simply click on the appropriate button. You can also view and print the analysis report by clicking the View Report button once the analysis has been performed.
Using Diskeeper 6.0
Diskeeper 6.0 is a comprehensive, third-party defragmentation utility that will give you all the bells and whistles that aren’t present in Disk Defragmenter. However, before you write off Disk Defragmenter, you should realize that Microsoft and Executive Software collaborated on the development of Windows 2000 Disk Defragmenter, which is, in essence, a stripped-down version of Diskeeper 6.0. In fact, once you install Diskeeper, you’ll be unable to run Windows 2000 Disk Defragmenter. When you select Disk Defragmenter from the Start menu, it will launch Diskeeper instead.
If you’d like to give Diskeeper a try, you can download a trial version from the Diskeeper Web site. After downloading and installing the full-blown version of Diskeeper, you’ll have 30 days to give it a try before the software times out and becomes unusable.
|To manually defragment a volume, you can simply highlight it and click on the Defragment button.|
When you launch Diskeeper, you’ll notice that the window looks very familiar, as shown in Figure C. In fact, the basic operation of Diskeeper is the same as Disk Defragmenter.
Although the defragmentation process is very similar to Disk Defragmenter, Diskeeper’s Analysis Display gives you much more detail, including information about the paging file, directories, and reserved system space, as illustrated in Figure D.
Comparing Windows 2000 Disk Defragmenter and Diskeeper 6.0
The first difference I noticed was that you must be logged in as a user with administrative rights to use Disk Defragmenter. This means that for you to run the utility on a workstation in a remote location, you must either temporarily give a user these rights or get in your car and drive to the location. While remote control utilities make it possible to log in as yourself on a remote workstation, these tools might not always be available for your use.
Diskeeper, however, allows you to schedule the defragmentation of a volume. Once scheduled, the volume will be defragmented as a background service of the workstation, regardless of the user’s permissions. In addition, you can schedule the defragmentation of any number of workstations, allowing the volumes to be defragmented at a convenient time for the users, such as overnight. Disk Defragmenter, on the other hand, has no scheduling or automatic operation features and must be run manually. The time and cost savings alone make this a very valuable feature of Diskeeper. Also, Diskeeper allows you to defragment the MFT and paging files; Disk Defragmenter doesn’t.
Diskeeper is significantly faster at defragmenting drives than Disk Defragmenter. The National Software Testing Laboratories (NSTL) recently published a performance comparison between Windows 2000 Disk Defragmenter and Diskeeper 6.0. The NSTL test revealed that Diskeeper could be 300 to 500 percent faster than Disk Defragmenter. To verify this, I ran a test of my own on two identical systems and found that Disk Defragmenter took more than two hours to defragment a 9-GB partition, while Diskeeper defragmented a similar drive in just a few minutes. If you’d like to read a copy of the NSTL report, you can download it by clicking here.
In addition to performing faster, Diskeeper allows you to simultaneously defragment multiple volumes on the same computer because Diskeeper doesn’t lock the volume when defragmenting it. In fact, Diskeeper can defragment multiple volumes on the same machine with little user impact because it runs in the background as a low-priority process.
The software you decide to use is, of course, dependent on your needs. Obviously, Diskeeper 6.0 is superior to Windows 2000 Disk Defragmenter. The rich tool set, superior speed, and scheduling capabilities allow you to defragment numerous workstations on your network from the comfort of your chair. Starting at $49.95 for a single license, Diskeeper is a relative bargain when you consider the amount of time and money that it will save your organization.
If you work for a small company that has only a few workstations, Windows 2000 Disk Defragmenter will serve you well. Although you’ll need to manually perform the defragmentation routine, you get the same computer system performance increases you receive when using Diskeeper.