Starting with Windows Vista, the Disk Defragmenting Utility has been much improved upon and is considered an improvement on its predecessor Windows XP. The defrag engine and the manageability of fragmentation has been improved.
The Disk Defragmenter runs as a low priority task in the background without affecting the performance of the computer. It runs only when the machine is idle ! It uses the Task Scheduler to automatically keep the hard disk defragmented. This automated defragmentation does not affect the performance of the Windows. What is sadly missed by most is the colorful display showing you the progress.
Now, by default, the defrag tool only defragments files smaller than 64 MB, for according to Microsoft’s benchmarks, fragments of this size, which already consist of at least 16000 contiguous clusters, have a negligible impact on performance. This means that games and large media files are effectively left as they are ! So if you still want to defrag files larger than 64 MB too, you need to use the -w parameter mentioned below to defragment files of all size.
The Disk Defragmenter process starts according to a schedule that you can adjust. You can view the current settings of the by clicking on All Programs > Accessories > System Tools > Disk Defragmenter Shortcut or by rt-clicking on a Drive’s icon.
Here, you can set or modify the schedule or choose to defragment “now’ ! There is NO option to choose a Drive here, however.
Some Points To Remember:
- Disk Defragmenter does not defragment files in the Recycle Bin. Best to run Disk Cleaner first and then empty the Recycle Bin, before defragmenting
- Disk Defragmenter will also not defragment files which are in use. Best to try and shut down as many processes as possible and then defragment.
- Disk Defragmenter does not defragment the following files:
Bootsect DOS, Safeboot fs, Safeboot csv, Safeboot rsv, Hiberfil sys, Memory dmp and the Windows page file. However using the -b parameter, as mentioned below, will optimize the boot files.
There are various options for you to exercise control over the defragmentation process.
To defrag a specific drive, say Drive C, type
You can use the following parameters or switches with the Defrag command to further fine-tune your control:
This is the default setting and defragments file fragments that less than 64 MB.
Analyze the selected drive / volume & display a summary report, consisting of analysis and defragmentation reports.
Defragments all volumes on the computer. Don’t specify a drive letter while using this.
Perform FULL defragmentation of files of ALL sizes.
Forced defragmentation even when there is less amount of free space on the drive being defragmented. A volume must have at least 15 % free space before Disk Defragmenter can completely defragment it.
This makes Defrag run in the background & operate only if the computer is idle, like when run as a scheduled task.
Displays complete reports.
It optimizes boot files and applications only.
The only indication you will get is a blinking cursor. This means that the process is going. To interrupt the defragmentation process, press Ctrl + C in the command window.
If you find that you are unable to defragment or cannot run the defragment utility in Vista or that a drive or volume has been marked by Vista as having errors, run chdsk by entering
at any command prompt; where c is the drive letter. You will be able to then run Defrag after Chkdsk has repaired the file system.
SP1 in Vista now gives you the option to select which Drives you want to defrag.
Defragmentation in Windows 7
In Windows 7, the defragmenter has been further improved upon:
Defragmentation in Windows 7 is more comprehensive – many files that could not be re-located in Windows Vista or earlier versions can now be optimally re-placed. In particular, a lot of work was done to make various NTFS metadata files movable. This ability to relocate NTFS metadata files also benefits volume shrink, since it enables the system to pack all files and file system metadata more closely and free up space “at the end” which can be reclaimed if required.
If solid-state media is detected, Windows disables defragmentation on that disk. The physical nature of solid-state media is such that defragmentation is not needed and in fact, could decrease overall media lifetime in certain cases.
By default, defragmentation is disabled on Windows Server 2008 R2 (the Windows 7 server release). Given the variability of server workloads, defragmentation should be enabled and scheduled only by an administrator who understands those workloads.
Additional readings on related topics:
- Troubleshooting Windows Disk Defragmenter utility
- Top 5 Free Defragmentation Software for Windows 7
- How to defrag MFT, Page File, Registry, System Files in Windows 7.