Question Can I disable the pagefile on Windows?

Status
Not open for further replies.
Outside of some apps complaining about it not existing, here's why you shouldn't turn off the page file.

When an app asks for memory from the OS, the OS will reserve more than it asked for. The reasoning is chances are the application will likely ask for memory again and allocating a chunk of memory for it can be expensive in terms of overhead. So when the application asks for more memory, the OS can immediately give it to the application.

The problem comes when the system starts running out of physical memory. The OS can't reassign reserved memory for another application. It'd be like if you reserved a table at a restaurant for some number of chairs, but your friends are late, so the restaurant reassigns those chairs to other guests because they see you're not using them at the moment. So what does the OS do? Punt the unused reserved memory bits into the page file. It's essentially a free action, because there's nothing to copy.

In any case, the entire memory space Windows has for applications is a combination of how much physical memory there is plus the size of the page file. The amount of memory Windows marked for applications (whether they use it or not) is called a commit charge. The entire commit charge must fit within the memory space.

As I'm writing this, my entire commit charge is about 14.6GB, but only 11.2GB is in use. If I had 16GB of memory with no page file, the moment 1.4GB is reserved, this is effectively considered no more memory is available. Applications will start throwing "out of memory" errors even though I still have a few gigabytes of RAM not in use.

tl;dr, if you turn off the page file, you effectively lessen the amount of RAM your system can use.
 
Status
Not open for further replies.