Pages

Defragmenting the Windows paging file

The Windows paging file can be quite large, as you know from the previous sections. Once you have created a constant size paging file, or if you just want to defragment the paging file, you can defragment the file during the next system boot. Windows will not allow any program to move the paging file around on the hard drive when the operating system is in use. The main reason why Windows does not allow this is because other programs are running in the background as well as operating system services that will depend on the paging file. This is why the defragmentation can only be done during the boot, because very few files are in use then.

The built-in Windows XP defragmenter does not defragment the paging file during a normal defrag. Microsoft has a workaround for this limitation. It tells users to do a normal defrag first, then after the free space is consolidated, to delete the paging file by disabling it and then recreating it right after a fresh defrag. Doing so will cause the operating system to create one big, continuous file on the hard drive.

There is nothing wrong with Microsoft's approach, since it will accomplish the task, but there is an easier way to do this. I recommend that, if you have not already done so, you download

the disk defragmenter utility called Diskeeper, by Executive Software (www.executive.com), which was discussed in Chapter 8. All you have to do in order to defragment the paging file is to run a boot defrag. By default, the option to defragment the paging file is already set. If you do not remember how to do a boot defrag, go back to Chapter 8 and review the step-by-step instructions in the section Boot time system defrag with Diskeeper.

0 comments:

Post a Comment