4

I have an ultrabook hybrid with a SSD (mSata) and HDD working with intel rapid storage and my PC has 6 GB of ram. So I want to know if I can disable virtual memory and what other things should I do to improve the performance of my system?

I´m using Windows 8 with a core i3 u3217.

3
  • You can't disable virtual memory on any modern PC operating system. Commented Jul 20, 2014 at 12:39
  • @DavidSchwartz, What do you mean by that? I'm currently running a Windows with "virtual memory" disabled . Exactly 0 bytes of memory on hard disk.
    – Pacerier
    Commented Jan 12, 2015 at 11:58
  • 3
    @Pacerier You disabled your paging files, you didn't disable virtual memory. (See Jamie's answer below.) Commented Jan 12, 2015 at 21:17

3 Answers 3

7

It's not a good idea to disable virtual memory. The virtual management is a complex process but simplistically Windows only use the virtual memory if there is no "real" memory to allocate, then windows will swap the less used items in the memory to the virtual memory.

So if you have enough memory windows will not use the virtual memory, and will use it only if it need to be used. (This doesn't mean that it will not write anything in the virtual memory, but it won't cause a performance hit.)

But when you disable virtual memory and there is not enough memory for the apps, then you will get app crashes because of the not enough memory.

8
  • 2
    "virtual memory" in windows is used well before you run out of memory.
    – 50-3
    Commented Nov 17, 2013 at 11:47
  • 1
    If I remember correctly windows constantly writes stuff to virtual memory just in case it later needs to free real memory. Commented Nov 17, 2013 at 12:18
  • 3
    "windows only use the virtual memory if there is no 'real' memory to allocate". that's not true, windows puts all kinds of things into virtual memory automatically because they have a relatively low chance of being used or don't need to be fast if they are used. Commented Jun 17, 2014 at 21:58
  • Exactly, I just make it simple to the questioner, because it will 'really' use it if there is no more memory to use (and if this happen then will the perfomance impact come). But this not change the key fact that disabling it is a bad idea. Commented Jun 17, 2014 at 22:16
  • This is just a much more complex question, e.g. if low priority memory com in, it will be preferentially paged out even if it has been recently used. There is a lot of to talk about this, I just want make it simple. Commented Jun 17, 2014 at 22:19
4

You can't disable virtual memory. Windows and your applications are always running in virtual memory. The addresses presented to the CPU by programs and by the OS are virtual addresses, not physical. Always.

Deleting the pagefile does not disable virtual memory. (The terminology in the Windows dialog is misleading.) What it does is disable paging to disk for a particular type of virtual memory called "private committed" memory. This will likely cause the other major type, mapped memory, to be paged more than otherwise. This will not improve performance.

Here's a more complete analysis: http://azius.com/blog/why-do-i-still-need-a-pagefile-or-how-can-i-be-out-of-memory/

10
  • We expect more then just a link to another website. A website I might add that has incorrect information.
    – Ramhound
    Commented Jul 20, 2014 at 9:22
  • 1
    He's right though. Programs don't ever use anything but virtual memory. Allocated regions are automatically moved between swap and physical memory, if possible.
    – Daniel B
    Commented Jul 20, 2014 at 10:16
  • If @Ramhound will indicate exactly what "incorrect information" he has perceived, I will be happy to clarify. Commented Jul 22, 2014 at 9:44
  • Of course you can disable virtual memory, at least in Windows 7. Here is an article which explains how: windows.microsoft.com/en-us/windows/…
    – Druvision
    Commented Jan 21, 2015 at 18:03
  • 1
    It's using wrong terminology. That article tells you how to change the size of the pagefile - including setting its size to zero. But the pagefile is not synonymous with virtual memory (despite what that article and even the Windows dialog says), paging to and from disk will still occur after you disable it, and all the counters in the system that reflect sizes of virtual memory will look the same as always... except the commit limit, which will be much smaller. The Windows Internals book has it right. Commented Jan 21, 2015 at 18:33
1

I am not a Windows expert, and I am telling this purely as a longtime user-of-Windows' perspective.

If you enable virtual memory:

  1. A large file (usually 1.5 times of physical memory size) is created at the root directory of the system (usually, c) drive. This file cannot be moved to another drive. If your system drive is a small SSD, and say you have a 16GB memory, this will really bother you.
  2. If you minimise a program and restore it after a long time (like several hours later), Windows will read the drive a lot, and the program becomes unresponsive for a while. Possibly, Windows had put all the memory of the program into the virtual memory and tries to restore the memory when activated.
  3. Real memory saved from 1 and 2 above may be utilised for file caching. File that was once read can be read super fast from the next time. Notice that, Windows does this whether virtual memory is used or not. It is just there would be more real RAM for this, if virtual memory is enabled. You may or may not notice the effect anyway.

If you disable virtual memory:

  1. You will not experience the first two annoyances in the "enable" section.
  2. If your RAM usage nears the size of the physical memory, yes "nears" not equals, Windows will constantly show a pop up message saying the system is running out of memory. For example, if you have 1GB of physical RAM and the Task Manager shows about 0.5GB of RAM is used, but Windows may keep showing the warning pop up.
  3. If your RAM usage really really nears the physical memory size, the entire system may become really really slow and unresponsive. Applications may crash without apparent reasons.

Other than that, I have not experienced any downside of disabling virtual memory. I think virtual memory technology was invented long time ago when PCs have 8MB or 16MB of RAM (MB not GB). When I was a college student I took an Operating Systems class, and learnt how virtual memory worked. It was a general mechanism, not Windows-specific, though. It may have been useful when PCs had really small amount of RAM, but now anyone can easily afford 16GB on one's desktop. I think virtual memory is not so useful anymore, unless you are using a laptop which has unexpandable 4GB RAM. I personally have disabled it on my PC which has 16GB of RAM.

In your case, if you are 100% sure that your RAM usage will never exceed 5GB (since you have 6GB), go ahead and disable it.

4
  • 1
    That's not true, the swap file can be moved to another drive.
    – Daniel B
    Commented Jul 20, 2014 at 10:12
  • Here is how to disable virtual memory completely, at least in Windows 7: windows.microsoft.com/en-us/windows/…
    – Druvision
    Commented Jan 21, 2015 at 18:03
  • As described above - no. You can't "disable virtual memory completely". You can disable the paging file, but that is one out of many, many files involved in paging to and from disk. Paging will still occur, and paging to and from disk will still occur; the performance counters will prove this. Commented Apr 15, 2015 at 19:46
  • @Sin Jeong-hun Your advice to disable the pagefile is hugely misguided. Only someone with a very limited knowledge of what virtual memory is, how it is used, and what its benefits are, would conclude "virtual memory is not so useful any more". There are many, many benefits of virtual memory. The fact that a modern system may show much of its RAM "free" or "available" does NOT mean that it could live without v.m. In fact, virtual memory allows RAM to be used far more efficiently, so the same workload would probably not run nearly as well without it.... Not that you can turn it off anyway. Commented Jul 17, 2015 at 0:02

Not the answer you're looking for? Browse other questions tagged .