Tip: Virtual Memory in Vista

26 11 2007

Virtual memory (it is also referred to as the page file) is a good thing to have. Its effect typically improves system performance by basically utilizing disk space to allow an application to “think” there is more memory. Do not confuse virtual memory with your physical memory (or RAM). They are totally different. However the virtual memory kicks in when an application requires more memory than available physical RAM. A file is created on your hard disk (page file) and it pretends to act like memory. Wikipedia has an article on virtual memory that will explain it in more detail. Essentially, you will want to increase your virtual memory for performance (we know Vista needs all the help it can get). However, increasing virtual memory will decrease hard drive space. So, you will likely want to find a good balance.

Increasing virtual memory in Vista is not too difficult (even though it was easier in Windows XP). Like everything else, this feature is buried in the Control Panel. Now, I know there is more than one way to go about this. So, I will give the most universal method.

  1. Open the Control Panel
  2. Go to System and Maintenance
  3. Then, click on System (should be the 3rd item down the list)
  4. Next, look in the side bar to the left and click on Advanced System Settings (UAC will announce its presence) and a new window will pop up
  5. Look for the Performance section on the window and click the Settings butto, which will open a new window
  6. Click on the Advanced tab at the top of the new window
  7. Now, in the middle of the window, there should be a section called Virtual Memory

Examine this number. A good practice is to set this number to twice that of your physical RAM. For instance, if you have 1024MB of RAM, you will want your Virtual Memory set to 2048MB. I have 2048MB of RAM and therefore, I will set my Virtual Memory to 4096MB.

This number has a limit, depending on your version of Vista. All 32-bit versions of Vista have a memory cap of 4GB of memory (due to limitations of the x86 processors). The 64-bit versions of Vista vary.

  • 64-bit Home Basic caps at 8GB
  • 64-bit Home Premium caps at 16GB
  • 64-bit Business, Enterprise, and Ultimate can exceed 128GB

In case you are unsure of how to find out how much physical RAM you have, do the following.

  1. Open the Control Panel
  2. Click on System and Maintenance
  3. Then, click on System
  4. The 2nd section down (under the large Windows logo) will give you the amount of physical RAM in your system

Go back to the window with the Virtual Memory information. Once you have determined the amount of physical RAM in your system, you are now ready to set the size of your Virtual Memory. If the amount shown in your Virtual Memory is already twice the amount of physical RAM, you are good to go and do not need to increase it (unless you want). Click on the Change button. This will open a new window with more options (this was much easier in Windows XP). In the middle of the window, click the option for Custom Size. Then, change the Initial size and Maximum size to the desired amount and then click OK. Click Apply/OK on each window trailing back to the Control Panel. Finally, close the Control Panel.

There you have it. You have just increased your Virtual Memory and could very well have increased system performance.


Actions

Information

13 responses

29 11 2007
Spice Mines of Kessel

I will make one minor correction. Towards the middle of the article I said…

“I have 2048MB of RAM and therefore, I will set my Virtual Memory to 4096MB.”

Since the memory cap is 4096MB (due to my 32-bit CPU), it would be impossible to set the Virtual Memory equal to the cap. Therefore, the amount of Virtual Memory must be less than the memory cap.

My Virtual Memory is actually set to 4095MB, which is less than the 4096MB cap.

2 01 2009
Stefan A

umm one question? what should the initial size be? :P

2 01 2009
Spice Mines of Kessel

Stefan A,

That all depends on the initial amount of physical RAM that was installed on your machine. Also, some OEMs may change the value as part of the default installation.

12 02 2009
Mhz

thnz for the tipz buddy, very useful!

12 02 2009
Spice Mines of Kessel

Mhz,

You’re most welcome.

20 04 2009
andy

i got 4 gb of ram….. so in the initial bit…i got 500 and max i got 4096…. is this okay…should the initial be more or less that this. the last comment made no sence at all.
so yea i got 4gb or ram

tell me the numbers

20 04 2009
Spice Mines of Kessel

The numbers you chose are not bad. If you have a large hard drive with a lot of free space, I would set the initial to 2048. Either way, your max number is set at a good value and that one will matter most when your PC is under a load.

26 04 2009
nik

Hey after i click set, i click ok, the program gets stuck and becomes”not-responding”…what do i do? should i just wait and it will work, just takes a while, or is there something wrong?

27 04 2009
Spice Mines of Kessel

The change should be near instant from the time you click the Set button. A few things I could possibly think is going on is that, 1) somehow Windows is not properly overwriting the pagefile.sys file, 2) UAC is not properly prompting you for Administrator access, and 3) you might be setting the maximum value too high (that one’s unlikely, but possible). Your issue seems to be the result of Windows Explorer encountering an error and simply stalling, or not responding. My first suggestion would be to increase your virtual memory in small increments from the default value (i.e. +32MB, +64MB, +96MB, +128MB, etc.). Do this and see where the error occurs. If the error occurs on the first increment, no matter how small, even if it is only +1MB, try clicking the setting for, “No paging file” and see if you get the same error. If you don’t get the error, apply the setting, and reboot your computer. Then, go back and try to set your virtual memory to a reasonable size, like 2048MB. You might also try the “System managed size” option.

3 05 2009
wanwarlock

hi,

nice article. i remember when i was looking for this for win xp, a lot of sites i went say it should be 1.5x ram and make both values the same.

is this still the case for vista or what?

thanks

3 05 2009
Spice Mines of Kessel

1.5x RAM is not bad at all, so long as you don’t hit the memory cap. Keep in mind that 32-bit processors can only read 4GB of RAM, and this holds true for virtual RAM. So, if you have 4GB of RAM on a 32-bit processor, you won’t be able to to have 1.5x RAM for virtual memory. In that case, just match your physical RAM.

15 06 2009
Chris

Thanks for making all of this a bit less confusing! I have two other questions. The first is a quick follow-up question to the previous question (on 1.5x RAM vs. 2.0x RAM). You state that a 32-bit OS can only read 4GB of RAM. What about a 64-bit OS? Is it correct that a 64-bit OS can read 8GB of RAM? If so, that means it is possible (and optimal?) to set the virtual RAM at 2.0x the physical RAM, assuming I have 4GB (or less) of physical RAM, correct?

My second question may be totally off… if so, just ignore it! But, I’m confused as to how Vista’s “Ready Boost” would function into all of this? At least in theory, this is supposed to act similar to RAM, correct? Is this supposed to function more as physical or virtual RAM? And, in either case, would this have any effect on how to configure the virtual RAM?

Thanks in advance!

15 06 2009
Spice Mines of Kessel

Yes. A 32-bit OS can only read up to 4GB of RAM. Now, a 64-bit OS can not only read 8GB of RAM, but it can read some 16 exabytes of RAM (http://en.wikipedia.org/wiki/Exabyte). Imagine 16 million gigabytes. So, to answer your question, you could set your virtual memory in a 64-bit Vista installation to 8GB, if you wish. Personally, I would only do it if I were willing to lose 8GB of hard drive space. Otherwise, I would just match my physical RAM.

Ready Boost simply acts as a cache for Vista (and Windows 7). It allows the system to utilize the flash memory to handle small read requests. It does act, in a sense, like RAM. So, 32-bit Vista is limited to the normal 4GB, and 64-bit Vista is set at a cap of 16GB for Ready Boost. (http://en.wikipedia.org/wiki/Ready_boost) It shouldn’t affect your virtual memory.

Leave a comment