Virtual Memory - Am I The Last To Know?

I had a good IM conversation with one of my IT/Hardware guru buddies yesterday where we discussed virtual memory. Since I've already proved myself to be a hardware noob I figured I have nothing to lose in throwing out this tip (I do consider this a hardware issue since it essentially involves performance tuning for your machine). I've always seen the notice in Windows about virtual memory being low and increasing the setting could result in performance gains, but I never really thought twice about it. Well after speaking to my buddy I went home and tried it out - and was absolutely stunned with the immediate performance gains on my system. I'm sure that your results may vary - but my system was much more responsive and efficient in opening applications, even with multiple memory intensive applications open at the same time.

If you'd like to read a bunch of mumbo jumbo about virtual memory, check it out in Wikipedia. As with any hardware tuning advice that you get from me, use at your own risk. I am not responsible for blown up mother boards.

Here are the steps that my buddy advised me to take. Again, this is specific to Windows XP.

Step 1: Right click on My Computer, Select Properties.

Step 2: Select the Advanced tab and click on Settings under Performance.

Step 3: Select the Advanced tab in the Performance Options window (wow, that's a lot of 'advanced' stuff).

Step 4: Under Virtual Memory click Change.

Step 5: This window displays your current settings for virtual memory. You can manually alter the settings, but my buddy recommended to choose System Managed Size. The way he explained it to me, System Managed Size basically tells Windows to expand the virtual memory size as needed. If multiple applications are running, windows will automagically increase the size of the VM until it no longer requires it. Once you make your changes click Set and exit the windows. A restart may be required.

And that's it. As I said above, I noticed immediate and dramatic performance gains on my little old Dell. My buddy also started telling me about how he has overclocked his processor by making some BIOS adjustments, but I don't think I'm quite ready to go there. Anyone with further insight is welcome to comment.



Comments
I am giving it a shot. Thanks for the tip.
# Posted By Ben Nadel | 1/10/07 10:12 AM
Let me know how it works for you. Another buddy tried and noticed improvements too.
# Posted By todd sharp | 1/10/07 10:17 AM
It works only if you don't work with programs that require a lot of memory, or you use 1-2 programs a day. Else, the windows will increase the VM size everytime you reach the limit - ex. open up a new program or a large file. Then it lags and oh boy it lags.
# Posted By Paulius | 1/10/07 10:36 AM
Also, if your machine has a lot of memory (say 2GB), it's best to disable VM all-together as it's a much slower operation for Windows to be constantly going to disk, when you have enough RAM to handle all of the tasks.
# Posted By Rob Brooks-Bilson | 1/10/07 10:39 AM
Paulius: OK, I'm with you - but what about setting a defined ceiling (say 2gb) as opposed to system managed - which is much more then the 300mb that was set on my machine. Would that provide a benefit without risking the lag factor?

Rob - great point - that does make a lot of sense. In fact, my machine here at work is running pretty well on 1gb, but the 640mb at home was not handling the demand.
# Posted By todd sharp | 1/10/07 10:53 AM
Rob has a good point - many of today's machines come with a huge amount of RAM so the 'virtual memory' isn't as important as it once was.

On my older machines I've always set a fixed size (there are calculations you can find on the web but I think it's something like 1.5 x physical RAM.

I also set the min and max to the same size so that way I have a fixed amount of virtual RAM and Windows doesn't need to adjust constantly.
# Posted By Jim | 1/10/07 11:14 AM
Todd,
You see a performance increase by letting windows control its own VM?

Have you tried setting the min and max to the same number? Lets say 2x or 1.5x (I'm not up on the latest recommendation for XP) the amount Ram you have?
The theory behind this is this will prevent windows from resizing the VM and thus freeing up that CPU / harddisk time that would normal go to doing the resize.

Doing this had very large impact on Windows 9x and windows 2000. I have not tried comparing this in XP. (I'm a programmer now, not a bench tech.)

Giver a try I'll be interested to hear your result.
# Posted By Mark W. Breneman | 1/10/07 11:56 AM
My machine has 2 gig RAM, and I get the best performance by totally disabling virtual memory. if you have enough RAM, using virtual memory can result in lots of disk IO that could actually slow you down.

--- Ben
# Posted By Ben Forta | 1/10/07 12:05 PM
I've completely disabled virtual memory on my laptop. My thinking was that my battery would last longer if the hard drive turned less.

The information for games is already stored, ready to be compiled, re-storing it is ludicris. When I play a game the HD is intensely active, during play harly at all. Weird isn't it?
I would have thought there would be some adequate streaming process by now, where mesh, textures, lightmaps, heightmaps and weight effects were constantly updated, entire computing power devoted to getting whattt you see and are about to see on screen. Yea maybe the HD needs a processor so it can fill the ram at the rate ram goes into the processor.

Instruction -> HD -> Compiler -> Monitor/speakers
(Instead of instruction -> Processor -> Ram -> Processor -> Graphics card -> HD etc)

Once a world is set up and the button presses on a controller have meaning the only process should be using those button presses as orders
"Get this ready for me to walk through, look at & hear, I just need what I can see and am about to"

I'd like to know if anyone has done benchmarks with and without VM.
# Posted By Arma | 1/25/07 8:02 AM
thankyou so much I just bought a new game and I was so frustrated that it wouldn't work.I am not so good with computers but I spent a couple of hours trying to fix the problem when i came across your blog.now I am up and running and ofcourse learning something new everyday.thanx.
# Posted By buehls360 | 2/25/07 9:50 PM
though i have a 1gb ram, iam getting this low virtual memory message problem, and after a while, applications dont start properly, some dont open at all..... is this a ram problem or would it be fine if i just set the VM to system managed? iam not in a position to experiment... plz help!
iam using windows xp
i tried to increase the min and max of VM, but this change wasnt effective, iam still experiencing the same problem, iam not even using applications which require high ram requirement
# Posted By sandeep | 7/14/08 9:59 AM
The authors friend was right. Windows virtual memory system was designed by experts and they fully understand how it works.

Probably the biggest myth regarding the pagefile is that system managed is inefficient. In most cases this is not true. The pagfile will only need to expand if the initial size is not sufficient. At 1.5 times physical RAM this will usually be true. If this is not the case then the solution is to increase the initial size, not prevent it from growing. The danger in restricting the pagefile is this: what if you guess wrong? The result will be impaired performance as Windows is forced to page active program code instead of rarely used data.

Recommendations: Initially use default settings. If you receive warnings then increase the initial size as necessary. In any event the maximum should be at least twice the initial size, up to a maximum of 4GB.

With these settings pagefile resizing will be rare. But if Windows ever needs more it can grow as necessary. Upon a reboot (if not sooner) the original size will be restored.

Larry Miller
Microsoft MCSA
# Posted By Larry Miller | 11/10/08 3:41 PM

Calendar

Sun Mon Tue Wed Thu Fri Sat
    123
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Subscribe

Enter your email address to subscribe to this blog.

Tags

actionscript ajax blogging cfsnippets coldfusion flash forms flex funny stuff misc model-glue off topic personal project learn slidesix sql

Recent Comments

Managing Sessions In CF Ajax Applications
jlomoglio said: I tried adding this code into my application and when I run it I get the following error: The THENA... [More]

ColdFusion/Sharepoint Integration - Part 1 - Authenticating
share point said: Hi Great Article, I'm new to Sharepoint and this is a great reference to have for our implementation... [More]

TechCrunch/CrunchGear Meetup - The Aftermath
Sam Farmer said: Very cool. [More]

Eclipse - You're Killing Me
Jane Carter said: Eclipse is a nightmare. I have been trying to use CFEclipse - I had to hunt for hours for a hack ju... [More]

Using Flash Forms Inside Of CF 8 Ajax Containers
Howard Ross said: @Gavy I am currently using a work around similar to one you suggest. I use a png type cfchart in a... [More]

RSS


coldfusionbloggers

FullAsAGoog MXNA

Consumed By Feed-Squirrel.com