Question: how do you defrag your swap file?

Does anyone know how to defrag(ment) your swap file/page file/virtual memory?
Thanks in advance! (a lot!)
3,977 views 4 replies
Reply #1 Top
Right click on My Computer, select Properties, select the Advanced tab and click on the Performance Settings button. This brings you to the Performance Options window. Select the Advanced Tab and click the Change button under Virtual Memory. In the Virtual Memory window select No Paging File then hit the Set button and then OK. You'll be prompted to reboot. When you've finished rebooting the page file will be gone. Now use the same sequence to get back to the Virtual Memory window and select your desired page file. The new page file will be defragged and contiguous. BTW for any reasonably size drive (>60GB) I recommend you set a permanent page file by using Custom size with the Initial size and the Maximum size both set to 4092.
Reply #2 Top
Warning! If you do not have enough RAM (or lots of programs/utilities that load system/kernel mode/driver files such as antivirus, firewalls, etc.) you'll be unable to boot again with no page file unless you select safe mode at the boot menu.

If you have more than one disk/partition clear the page file and set another in the other disk/partition. Reboot and defrag your disk, then reverse the page file change (or not).

Or buy (or "try before you buy") a fully featured defrag program (the one shipped with windows is a lite version of a commercial one). Most of them offer page file defragging.
Reply #3 Top
Warning! If you do not have enough RAM (or lots of programs/utilities that load system/kernel mode/driver files such as antivirus, firewalls, etc.) you'll be unable to boot again with no page file unless you select safe mode at the boot menu.

That’s not true. You will be able to boot even if this is the case. All that will happen is that your firewall or whatever will simply fail to load. You'll still have no difficulty booting at which point you re-enable the page file, reboot and you're set to go.

Plus if you really do have more memory resident crap than you have memory, you should probably should get some more memory *and* give your start up services an enema.
Reply #4 Top
That MAY NOT BE true in most cases, but I'd be better on the safe side than risk a 1 millionth chance of getting his/her pc locked.
You are also asumming s/he is using Windows XP.

BTW, I have seen computers locked at boot time because they didn't have enough page file. Kernel mode files (aka drivers) are loaded before the user interface goes up skipping (or failing to load software components) will not. An out of page file before loading the interface prevents loading the interface.

A little example: You'll get a BSOD with SETUP_FAILURE(0x00000085, 0x00000002, 0x00000000, 0x00000000) if that happens while setting up devices (those are not only hardware devices) at boot time.