Disabling Disk Defragmentation
5/10/2007
To maximize EWF performance, the disk defragmentation and auto-layout services should be disabled. The disk defragmentation service rearranges data on the disk to create contiguous sections of data. Additionally, the auto-layout service moves the most-used data closer to the center of the disk to expedite boot time. These services, if enabled, can impact the performance of EWF by adding unnecessary information to the overlay.
Disk defragmentation is not included in all default configurations. The service is included in the Disk Defragmenter Core, Disk Defragmenter for NTFS, and Disk Defragmenter for FAT components. Adding any of these components will add disk defragmentation support to your run-time image.
Note
You can use the disk defragmentation and auto-layout services to reduce the boot time of your device. You can increase the efficiency of the data layout on your media by leaving these services enabled in a development environment while EWF is disabled. After you are satisfied with the performance, you can disable the services and re-enable EWF.
To disable disk defragmentation and auto-layout
In Target Designer, add the Background Disk Defragmentation Disable component to your configuration. This component will add the following keys to your run-time image.
- or -
Add the following registry keys to your run-time image:
Disable Background disk defragmentation:
Key Name:HKEY**_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction\**
Name: Enable
Type: REG_SZ
Value: N
Disable Background auto-layout:
Key Name: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OptimalLayout
Value Name: EnableAutoLayout
Type: REG_DWORD
Value: 0
For more information about how to add this registry key to your configuration, see Adding Registry Data to a Configuration in Windows XP Embedded Studio Help.
In Target Designer, add the Background Disk Defragmentation Disable component to your configuration. This component will add the following keys to your run-time image.
- or -
Add the following registry keys to your run-time image:
Disable Background disk defragmentation:
Key Name:HKEY**_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction\**
Name: Enable
Type: REG_SZ
Value: N
Disable Background auto-layout:
Key Name: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OptimalLayout
Value Name: EnableAutoLayout
Type: REG_DWORD
Value: 0
For more information about how to add this registry key to your configuration, see Adding Registry Data to a Configuration in Windows XP Embedded Studio Help.