Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would have thought this was already asked but I can't seem to find it.

At what point do I no longer need virtual memory enabled? With 4GB of RAM I see that the computer rarely uses anywhere near all of it. At that point virtual memory isn't strictly necessary. Is there danger in turning it off? Are there features I'll lose if I do?

share|improve this question
1  
Attention: There is only a limited amount of memory given to drivers, called the non-paged and paged pool memory sections. A page file is necessary for when the paged section gets full, as a gamer I have seen a game complain about paged pool memory just because I had my page file disabled on a 8 GB system. Conclusion: Page files are necessary, they prevent paged pool depletion and actually do speed up your system. –  Tom Wijsman Oct 24 '11 at 16:28
add comment

6 Answers

up vote 8 down vote accepted

Since memory is not exactly a sparse resource on desktop PCs / laptops anymore, I doubt that most programs can handle out-of-memory conditions gracefully and will crash instead.
So: Dangerous? Yes, if your 4GB are used up somehow and you have no pagefile, applications may start to crash.
And as shown in Zoran's example it may be hard to identify the problem later on.

The article, that Ram refers to, also states, that turning swapping off usually doesn't improve speed and may do the opposite instead:

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

share|improve this answer
    
I will have to dig up the article on MS's site, but MS does say you should always have a pagefile. Even on high memory systems, not having one can make your machine run slower. –  Keltari Aug 24 '12 at 1:08
add comment

See Mark Russinovich's article on Virtual Memory. That should give you a good pointer about Virtual Memory.

Here's a useful excerpt from the link

So how do you know how much commit charge your workloads require? You might have noticed in the screenshots that Windows tracks that number and Process Explorer shows it: Peak Commit Charge. To optimally size your paging file you should start all the applications you run at the same time, load typical data sets, and then note the commit charge peak (or look at this value after a period of time where you know maximum load was attained). Set the paging file minimum to be that value minus the amount of RAM in your system (if the value is negative, pick a minimum size to permit the kind of crash dump you are configured for). If you want to have some breathing room for potentially large commit demands, set the maximum to double that number.

share|improve this answer
    
+1 for Mark Russinovich reference. Always a great read. –  mrduclaw Dec 14 '09 at 19:49
add comment

This classic post on ServerFault has some good points. For only 4GB I'd leave the pagefile alone, and the space involved on the disk is minor in any case.

share|improve this answer
add comment

I'd recommend to leave the virtual memory settings to their default. I have 8GB of RAM and turned virtual memory off thinking I would gain in speed (because of no swapping), but it turns out that made my system less stable (and I did this on 2 machines, similar result). I was experiencing one BSOD per week approximately, on both machines. I started examining the minidumps produced and found out that all the BSODs were triggered by a call to a routine called KiPageFault. So I tried setting the virtual memory settings back to their defaults, and the regular BSODs disappeared.

Took me quite a while to correlate the 2, and I have no actual evidence that the fact that I turned off virtual memory caused the BSODs, but my machines were more stable after I turned it back on...

share|improve this answer
    
Thanks. It is good to hear real results and not just suppositions. –  Steve Rowe Oct 15 '09 at 1:34
add comment

Depends what your workload is. I've set up a bunch of diskless frontends for a web application. They network booted and ran everything they needed within 8GB of ram.

I've also used windows (98 probably) with 32MB and no pagefile - of course you have to live in that memory space and limit your apps to suit the resources.

You do want to make sure that there is some extra RAM for the disk cache, otherwise performance can become horrible.

I seem to recall that there are some programs that won't run without VM, but I have no idea what they were

share|improve this answer
add comment

Well, Steve, interesting that you should ask that.

I will tell you a little secret: the point at which you needed virtual memory was never. Virtual memory was an insanely incompetent idea created by a bunch of academics who knew zero about practical computing systems, and ANY computer will function vastly better if it can be made to run without VM.

Now, you might ask, if VM is useless and harmful, why do most big modern operating systems use it? The short answer to this question is that the people deciding whether to use VM or not at Microsoft, Apple and IBM were even more stupid and inexperienced than the academics who invented VM and wanted to adopt it based on the same, completely incorrect assumptions that the academics had when they invented it. We could start talking about those assumptions and misconceptions, but unfortunately, if they were easy to understand and describe we would not have the VM problem in the first place.

Getting back to you. Unfortunately, just like the aforementioned tardnoggins at Apple and Microsoft, you have your own misconceptions, namely the idea that you can turn off VM. Of course, you cannot turn it off, that would defeat the whole purpose of screwing you if you could just turn it off. When people do something really stupid, they always make sure it is irreversible. After all, if everybody could just turn off VM, they would, and that would make the bozos who created it look pretty stupid wouldn't it? They prevented this possibility by making it unremovable, kind of like Microsoft made Internet Explorer unremovable.

What you can do is limit the size of the page file, which of course should be set to whatever the minimum is, hopefully 0. Virtual Memory is still there, but at least you can reduce it from very very very slow to just very very slow by asking it to not involve the disk drive in the insanity.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.