Home » Questions » Computers [ Ask a new question ]

Any reason not to disable the Windows pagefile given enough physical RAM?

Any reason not to disable the Windows pagefile given enough physical RAM?

The question of disabling the Windows pagefile has already been discussed quite a bit, for example here and here and here. People continue to upvote answers that say "you should not disable your pagefile even if you have plenty of RAM", but I have yet to see any concrete, verifiable reasons being given for this advice. As far as I can see, if you never need to read from the pagefile (because you have enough RAM) then performance could only be worse with it enabled due to Windows pre-emptively writing to it. At best, performance would be the same. I can't see how it could possibly be improved by writing data you never need to read.

Asked by: Guest | Views: 202
Total answers/comments: 4
Guest [Entry]

"From this link:

NOTE: Microsoft strongly recommends
that you do NOT disable or delete the
paging file.

To disable the use of the paging file
in Windows XP, you should have at
least 768MB of RAM.

Here's a link to Jeff Atwood's take on it."
Guest [Entry]

"The best reason I've found is that the pagefile allows Windows to use more physical RAM for the disk cache, which may be a better use for it than rarely used memory pages. Mark Russinovich has a great article on it, Pushing the Limits of Windows: Virtual Memory, which says:

Some feel having no paging file
results in better performance, but in
general, having a paging file means
Windows can write pages on the
modified list (which represent pages
that aren’t being accessed actively
but have not been saved to disk) out
to the paging file, thus making that
memory available for more useful
purposes (processes or file cache). So
while there may be some workloads that
perform better with no paging file, in
general having one will mean more
usable memory being available to the
system (never mind that Windows won’t
be able to write kernel crash dumps
without a paging file sized large
enough to hold them)."
Guest [Entry]

"I am running Windows XP with 4GB (3.5GB usable) of RAM. I need to run Visual Studio 2008, which requires a lot of memory. I often have 3 to 4 instances open, each taking up 500MB or more of memory.

I got really annoyed with this because whenever I needed to quickly close all Visual Studio instances, Windows would take forever to close the instances. It took 3 minutes or more. I realized what was happening was that the Visual Studio instances were paged out of RAM and into the pagefile, even if there was plenty of memory available. When closing the application, it would load all the paged data back into RAM, then shut it down. Essentially, it would copy 2GB of data from disk into memory before shutting down the instances.

After I disabled paging, I noticed a HUGE performance boost when shutting down multiple Visual Studio instances. It would take up 100% of the CPU for a few seconds, then disappear. Shutting down Windows is now possible well under a minute, rather than many minutes.

However, I did not notice any performance increase when starting applications, which makes sense, since the data still must be read from disk on startup. Also, I feel that things are generally snappier with paging disabled.

Also, I've only run into crashing programs due to insufficient memory only a few times a year. Usually if I open too many programs, or a program goes nuts and starts allocating memory like crazy.

In summary, I am very happy with paging disabled. Memory management in Windows is quite terrible. For those who are comfortable with tinkering with memory settings and are aware of the possible problems, I would recommend doing this."
Guest [Entry]

"Contrary to popular opinion, the pagefile is not simply a cheap but slow alternate to physical memory. It was designed to allow optimum usage of the RAM you have.

Even with 4GB of RAM you probably don't have nearly enough keep everything in memory. Nothing in Task Manager will reveal this. Knowing this, Windows designers created a system where executable code was only brought into memory when needed and then retained for as long as possible. If the system finds a better use for the memory thus used it will be reassigned. This system has been used by Microsoft since NT3.1, released in 1993. It has been in regular use in large systems since the 1960's.

This system works well for most forms of executable code. But modified data must be written somewhere, the pagefile, before the memory used can be reassigned. The pagefile is not normally used to to store code, only data. Being able to page out both code and data gives the system flexibility in what should paged out when necessary. Disabling the pagefile means that only memory used for code storage can be reassigned. All modified data, even that which has not been accessed for a long time and may not be needed again, must remain perpetually in RAM. But paging of code will continue as before. The lack of a pagefile, or having one that is too small, unbalances the system and forces Windows to page in a sub-optimal way. This usually impairs performance."