Use PageDefrag to defragment immovable system files

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.)

    Requires Free Membership to View

More on defragmentation

Weigh the pros and cons of disk defragmentation.

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:

  1. Defragment once at the next reboot,

  2. Defragment at each boot time with a countdown delay, or

  3. 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.

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.

This was first published in July 2007

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.