1000/1000
Hot
Most Recent
Disk Defragmenter is a utility in Microsoft Windows designed to increase access speed by rearranging files stored on a disk to occupy contiguous storage locations, a technique called defragmentation. Defragmenting a disk minimizes head travel, which reduces the time it takes to read files from and write files to the disk. Beginning with Windows XP, Disk Defragmenter also reduces system startup times. From Windows 8, the program was renamed to Defragment and Optimize Drives.
As early as the end of 1982, the IBM PC DOS operating system that shipped with early IBM Personal Computers included a Disk Volume Organization Optimizer to defragment the 5¼-inch floppy disks that those machines used. Microsoft's MS-DOS did not defragment hard disks. Several third party software developers marketed defragmenters to fill this gap. MS-DOS 6.0 introduced Defrag. Windows NT, however, did not offer a Defrag utility, and Symantec was suggested by others as a possible alternative for the utility.[1]
Initial releases of Windows NT lacked a defragmentation tool. Versions through Windows NT 3.51 did not have an application programming interface for moving data clusters on hard disks.[2] Executive Software, later renamed Diskeeper Corporation, released Diskeeper defragmentation software for Windows NT 3.51,[2] which shipped with a customized version of the NT kernel and file system drivers that could move clusters.
Microsoft included file system control (FSCTL) commands to move clusters in the Windows NT 4.0 kernel,[2] which worked for both NTFS and FAT32 partitions. However, Windows NT 4.0 did not provide a graphical or command-line user interface.[2]
Disk Defragmenter also shipped as part of Windows 95, Windows 98 and Windows Me. It could be scheduled using a Maintenance Wizard and supported command line switches.[3] This version had the limitation that if the contents of the drive changed during defragmentation, it rescanned the drive and restarted the process from where it left off.[4]
The Disk Defragmenter in Windows 2000 was a stripped-down licensed version of Diskeeper, licensed from Diskeeper Corporation. It uses the following techniques:[2]
In Windows 2000 and later operating systems, Disk Defragmenter has the following limitations:
In addition, the Windows 2000 version has the following limitations which were removed in Windows XP:[6]
Windows Disk Defragmenter was updated to alleviate some restrictions.[7] It no longer relies on the Windows NT Cache Manager, which prevented the defragmenter from moving pieces of a file that cross a 256KB boundary within the file. NTFS metadata files can also be defragmented. A command-line tool, defrag.exe, has been included,[8] providing access to the defragmenter from cmd.exe and Task Scheduler. In Windows XP, if the Master File Table (MFT) is spread into multiple fragments, defrag.exe and the GUI version can combine the MFT fragments during defragmentation.[9]
In Windows Vista, Disk Defragmenter includes an option to automatically run at scheduled times using Task Scheduler and uses low CPU priority and the newly introduced low priority I/O algorithm so that it can continue to defrag using reduced resources (less CPU and disk read/write activity) when the computer is in use. The user interface has been simplified, with the color graph, progress indicator, disk analysis and fragmentation information being removed entirely.
If the fragments of a file are over 64 MB in size, the file is not defragmented if using the GUI; Microsoft has stated that this is because there is no discernible performance benefit since the time seeking such large chunks of data is negligible compared to the time required to read them.[10] The result, however, is that Disk Defragmenter does not require a certain amount of free space in order to successfully defrag a volume, unlike performing a full defragmentation which requires at least 15% of free space on the volume. The command line utility, Defrag.exe, offers more control over the defragmentation process, such as performing a full defragmentation by consolidating all file fragments regardless of size.[11] This utility can be used to defragment specific volumes or to just analyze volumes as the defragmenter would in Windows XP.
Disk Defragmenter is maintained by Microsoft's Core File Services. The Windows Vista version has been updated in Windows Vista SP1 to include the improvements made in Windows Server 2008. The most notable of these improvements is that the ability to select which volumes are to be defragmented has been added back.[12] Notably, the Windows Vista defragmenter is much more effective than the version included with XP.[13]
Windows 7 reintroduces the analyze function and showing percent complete of the defragmentation, both of which were removed in Windows Vista. It can also defragment multiple volumes simultaneously.
According to Scott Hanselman of Microsoft, Windows 7 and later do defragment a solid-state disk (SSD) but in a completely different way. There is less incentive for defragmentation of SSDs because file fragmentation has less performance impact on them and they handle a finite number of storage cycles before their lifespan expires. However, file systems cannot support infinite file fragmentation as they reach their metadata limit. In addition, Disk Defragmenter is also responsible for performing the TRIM command on SSDs.[14]