The scenario: You've got a pretty decent system, maybe 2GB of RAM, maybe more. You have several programs open. You switch to a program, but you haven't used it for a few minutes. When you try to switch, you have to wait while Windows reloads the application code from the page file. In the meantime, everything else accessing the disk slows to a standstill. And if you want to switch between several fairly large programs, get ready to wait. Sound familiar?
I finally figured out how to tell Windows to use the page file somewhat less aggressively. It still uses it, but not to the degree it did before. Here's the fix:
NOTICE: This involved editing the registry. If you muck with stuff you don't understand, you will probably end up with an unbootable system. You have been warned!
- Open regedit.exe
- Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
- Change DisablePagingExecutive from 0 to 1
What this does is tells windows to not page executables (programs) unless it HAS to. Normally, Windows will page out sections of programs whenever it hasn't been used for a while. This frees up memory, but slows down overall system performance. In my opinion, the reason to have memory is to use it. I prefer the memory model used by Linux, where the swap space (page file) isn't touched until the system is out of available RAM. This change makes Windows a little smarter about memory.