Usually, when we're concerned about the effects of fragmentation, we worry about how fragmentation affects a system's...
data or its applications. But fragmentation also affects system files that typically can't be defragmented, either by Windows' own built-in Defrag tool or by third-party defragmenters. (Some third-party defrag tools, such as Diskeeper, have the ability to move system files, but this is a premium feature that comes at a cost.)
The Sysinternals utility PageDefrag (now at version 2.32) is one of the few freeware programs that lets you defragment immovable system files. It won't let you do a defrag while the system is actually running—you'll need to reboot to do that. But the PageDefrag tool defragments the page file, the event logs, the Registry hives and the hibernation files, all of which normally cannot be defragmented.
When first run, PageDefrag generates a report that describes the location of those files, how many clusters they occupy and how many fragments they're in. You're then given three options:
- Defragment once at the next reboot,
- Defragment at each boot time with a countdown delay, or
- Disable defragmentation.
If you choose either of the first two options, defragmentation will occur at the next reboot before the Windows GUI loads, and the PageDefrag program will provide real-time feedback on its progress. PageDefrag can also be invoked from the command line or in a script; you don't need to use the GUI to trigger it.
Although the fragment count for any given file can be quite high, this is not always indicative of how scattered the fragments are—just that the file is in a number of different fragments. (Generally the more fragments there are, the greater the impact on performance.) Another factor is the amount of contiguous free space available on the drive. Simply put, the more, the better (as is the case with any defrag operation).
Note: PageDefrag does not currently seem to work in Windows Vista, even when run as Administrator. This may be due to newly-imposed restrictions on how system files can be accessed.
More on defragmentation
- Weigh the pros and cons of disk defragmentation.
About the author: Serdar Yegulalp is editor of the Windows Insight, (formerly the Windows Power Users Newsletter), a blog site devoted to hints, tips, tricks and news for users and administrators of Windows NT, Windows 2000, Windows XP, Windows Server 2003 and Vista. He has more than 12 years of Windows experience under his belt, and contributes regularly to SearchWinComputing.com and SearchSQLServer.com.