Copyright: Copyright (C) 2000 Mark Russinovich


<new topic>
PageDefrag

Copyright © 1998-2000 Mark Russinovich

SysInternals - www.sysinternals.com

Introduction

One of the limitations of the Windows NT defragmentation interface is that it is not possible to defragment files that are open for exclusive access.  Thus, standard defragmentation programs can neither show you how fragmented your paging files or Registry hives are, nor defragment them. Paging and Registry file fragmentation can be one of the leading causes of performance degradation related to file fragmentation in a system.

PageDefrag uses advanced techniques to provide you what commercial defragmenters cannot: the ability for you to see how fragmented your paging files and Registry hives are, and to defragment them.

Using PageDefrag

When you run PageDefrag (pagedfrg.exe) you will be presented a listbox that tells you how many clusters make up your paging files and Registry hives (SAM, SYSTEM, SECURITY, SOFTWARE, .DEFAULT), as well as how many fragments those files are in. If you feel that these files are fragmented enough to warrant a shot at defragmenting them, or if you want to defragment them at every boot, select the appropriate radio button choice and click OK.

When you direct PageDefrag to defragment, the next time the system boots it will attempt to do so. Immediately after CHKDSK examines your hard drives PageDefrag uses the standard file defragmentation APIs (see http://www.sysinternals.com/defrag.htm for documentation of these APIs) to defragment the files. As it processes each file PageDefrag will print on the boot-time Blue Screen the file name and its success at defragmenting it. If it is successful at reducing the fragmentation it will tell you the number of clusters the file started with and the number it consists of after the defragmentation.

In some cases PageDefrag may be unable to reduce fragmentation on one or more of the files, and it will indicate so on the boot-time Blue Screen. This can happen either because there is not enough space on the drive for defragmentation, or the free space itself is highly fragmented. For the best results you should use PageDefrag in conjunction with a commercial defragmentation utility or the free Contig defragmenter at http://www.sysinternals.com/contig.htm.

Reporting Bugs and Feedback

If you encounter a problem while running PageDefrag, please visit http://www.sysinternals.com to obtain the latest version. If you still have problems, please record all information relevant to the problem. Determine if the problem is reproducible, and if so, how, and send this information to:

mark@sysinternals.com