The Vista and Windows Server 2008 Defragmentation UI was limited to essential information and controls. Based on user feedback it was found that the UI was too minimal. In Win7 the UI intends to make the defrag operations more transparent and match the task demands of the user.
List of features provided through Windows 7 Disk Defragmenter UI
1. Analyze and defragment each volume to improve disk performance
2. Monitor defragmentation progress and state for each volume
3. Schedule a job for regular defragmentation
In Windows, defrag is scheduled on an entire volume. The volume can be formatted with the standard windows file systems: NTFS, FAT and FAT32. The volume can be a basic partition or any of the dynamic types: Simple, Stripped, Mirror, RAID-5. The type of disks that host a volume have an impact on automatic scheduling of defrag on the volume. Besides normal rotating hard drives, interesting types of disks in the context of defrag are: Expandable Virtual Hard Disks (VHD) and Solid State Drives (SSD). Defrag cannot be automatically scheduled on volumes hosted by SSD disks and running defrag on volumes hosted by SSD disks is not recommended.
This article explains the different parts of the defrag UI and presents in details the criteria used to determine if the disk hosting the volume is suitable for defrag.
Disk Defragmenter Main UI
This is the primary dialog (Figure 1) that comes up when the defrag UI is started. The UI can be started from the start menu shortcut (All Programs->Accessories->System Tools), from the control panel (Control Panel->System and Security->Administrative Tools-> Defragment Your Harddrive) or from the “Tools” tab in the volume’s properties dialog.
The “Schedule” section in this dialog (figure 1) displays volumes that are scheduled for automatic defragmentation. It is recommended to have the schedule turn on. The new Windows 7 Disk Defragmenter will exclude the volumes that are not recommended to run defrag regularly
. [ Note even if the system only has SSD disks and expandable VHDs, the schedule would still be turned on; to verify if the volumes are scheduled for defrag click Configure Schedule.]
The list shows all the volumes that can be defragmented. This includes volumes on the solid state drives.
Note that volumes on SSDs and dynamic VHDs can be defragmented but are not scheduled to run regularly; this gives users the options to defrag SSD volumes if they feel the need to do so.
To analyze disk or Defragment Disk: select the volume from the list, and then click on Analyze disk or Defragment disk.
This dialog (figure 2) allows modification of the defrag schedule. Click on Select disks to see the volumes that are included in the defrag schedule.
Select or unselect the Checkboxes to include or exclude the volumes for regular defragmentation respectively. Selecting “Automatically defragment new disks” will automatically add new volumes to the defrag schedule
The screenshot below (figure 4) shows there are no volumes scheduled for defragmenter. No volumes are listed because all the volumes in the system are not suitable for regular defrag (because they could all be on SSDs or expandable VHDs). However, the user can go to the main defrag UI to defragment the volume manually.
What volumes are excluded from defrag schedule?
As mentioned earlier, regular defragmentation of volumes on certain disk types like SSD disks and expandable VHDs are not recommended. Defrag UI excludes volumes from being scheduled based on the following:
A valid response involves populating a
structure with accurate version and size data. If the IncursSeekPenalty member is set to false, the disk is considered a SSD.
How does disk defragmenter get the “nominal media rotation rate” from device?
If the port driver does not return valid data for StorageDeviceSeekPenaltyProperty, Disk Defragmenter looks at the result of directly querying the device through the ATA IDENTIFY DEVICE command. Defragmenter issues
request and checks
structure. If the NomimalMediaRotationRate is set to 1, this disk is considered a SSD.
The latest SSDs will respond to the command by setting word 217 (which is used for reporting the nominal media rotation rate to 1). The word 217 was introduced in 2007 in the
How does disk defragmenter get the “random read disc score” from the device?
Disk Defragmenter uses the
Windows System Assessment Tool (WinSAT)
to evaluate the performance of the device. The performance threshold was determined by some I/O heuristics through WinSAT to best distinguish SSD from rotating hard disks.