Disk defragmentation seems relatively unimportant compared with other systems management tasks, but fragmentation of files and free space can substantially degrade system performance and increase backup times on heavily used servers. Disk fragmentation is inevitable: Updated files that increase in size without having sufficient adjacent free space become fragmented, files that are deleted create free space between other files, and new files that are larger than available contiguous free space are spread over noncontiguous locations.
Although Windows 2000's disk defragmenter can reassemble your server's fragmented data files and consolidate much of your storage array's free space, it lacks a scheduling mechanism to help you manage the process efficiently on large numbers of servers. Manual defragmentation is cheap, but that benefit evaporates when you need to defragment drives overnight so that users won't experience degradation in server performance. Several third-party disk defragmentation tools for Windows servers offer scheduling features. These products include Executive Software's Diskeeper Server 7.0, O&O Software's O&O Defrag V4 Server Edition, Raxco Software's PerfectDisk 2000, and Winternals Software's Defrag Manager 2.0.
Benefits of the API
Like Win2K's built-in defragmentation utility (which is a basic version of Diskeeper), the third party products rely on Microsoft's FSCTL_MOVE_FILE API to safely move files while the OS is active. Microsoft originally implemented this API in Windows NT 4.0, then enhanced it in Windows XP and Win2K. The benefits of using the API include reduced risk of data loss or corruption and ensured compatibility with future Windows service packs and patches.
But the API also has its limitations. In NT 4.0, the API doesn't permit online defragmentation—defragmentation of the pagefile, the Master File Table (MFT), NTFS directories, or files used exclusively by the OS while it's running. Microsoft recommends that you defragment these files at boot time (a process known as offline defragmentation). In addition, the NT API limits online defragmentation of NTFS clusters to those that are 4KB or smaller. Win2K's enhanced API permits online defragmentation of NTFS directories.
With the introduction of XP (and in the forthcoming Windows .NET Server—Win.NET Server), Microsoft added API support for online defragmentation of the MFT and registry, placement of files in the MFT Zone (i.e., the disk space that NTFS usually reserves for MFT growth) when free space is very limited, and defragmentation of clusters larger than 4KB. However, you still need to defragment the pagefile offline. Some organizations forgo defragmenting system files—and the resulting performance improvement—so that they can keep servers online as much as possible. However, the pagefile is extremely large and can fragment into many smaller pieces, dividing the partition's free space to such an extent that other files are split around the pieces of the pagefile. Because XP's and Win.NET Server's built-in defragmentation utility doesn't support offline pagefile defragmentation or scheduling features, you still need a third-party program to maximize your Win.NET Server systems' performance.
When the Windows & .NET Magazine Lab tested enterprise defragmentation utilities (Tom Iwanski, "Enterprise Defragmentation Utilities," February 2001, InstantDoc ID 16442), we found one product, Symantec's Speed Disk 5.1, that circumvented the FSCTL_MOVE_FILE API and could defragment system files online. However, Symantec has since withdrawn the server version of that product from the market.
Surveying the Field
All the products I investigated let you install the defragmentation engine on the server and provide a management console from which the administrator can create defragmentation schedules for groups of servers. PerfectDisk 2000 provides a separate management console; the other products supply a Microsoft Management Console (MMC) snap-in.
Some applications are particularly sensitive to the server's software configuration. For enterprises that use such applications, Defrag Manager lets you distribute the 120KB defragmentation engine package to the server at the scheduled runtime, then removes it when defragmentation is complete so that the defragmentation software doesn't reside on the server permanently.
At $1194 for a 100-server license, Defrag Manager was the least expensive server defragmentation product I found. The Defrag Manager CD-ROM includes PageDefrag 2.2, a freeware product by Sysinternals, Winternals' sister company, that defragments your server's pagefile and registry at boot time. However, PageDefrag defragments only your pagefile and registry, not other system files.
After you install the software, all the products let you define groups of servers and schedule defragmentation runs as often as your servers require. Defrag Manager's administrative console, which Figure 1 shows, lets you define a schedule for particular Active Directory (AD) organizational units (OUs). Figure 2 shows the results of a PerfectDisk 2000 network query, which summarizes the schedules you've defined for particular servers or groups. At the scheduled time, the products typically analyze the partition to determine its level of fragmentation. All the products I investigated except Defrag Manager let the systems administrator set a fragmentation threshold below which the scheduled defragmentation run won't occur. Diskeeper Server ($11,200 for a 100-server license) also offers a feature called Smart Scheduling that lets Diskeeper Server establish a unique defragmentation schedule for each server based on how quickly the server reaches a fragmentation level that the software determines. Figure 3 shows Diskeeper Server's Smart Scheduling feature interface.