Default Virtual Memory Settings

On all of our Windows systems, the default pagefile / virtual memory is set to a custom value of min=2046 and max=4092. This seems to be the same for servers and clients (32 bit or 64 bit) when freshly built so we have to manually change the settings as we do the setup. This is the same for non-domain systems so isn't being set by group policy or anything.

My question is - why are these values chosen by Windows by default, and given that Windows has specifically chosen them should we change them back to System Managed or leave them alone?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

My personal view on VM settings is this.  
I use CUSTOM sizes.  
I make an initial of 2mb and a maximum of 50mb on the boot drive (usually C:)
I make an initial of 1.5 x RAM with a Max also 1.5 X RAM on the next best physical Drive.    (Usually D:)  So if I have 4GB of ram i have used 6000mb/6000mb settings in D:.

Reasons.  Worst thing that can happen is when system crashes, and it needs to dump is RAM into somewhere.  Having INITIAL/MAX set at 1.5 x RAM in machine give you enough room to dump it all out if needed.  This configuration has benefits for some online gaming.

In reverse, I do recall a situation at BigBlue that required a reduction in these settings.  One of the larger ERPs did not like if the VM was set above 2046.

GeorgeFromTheBankAuthor Commented:
Thanks for your answers, they're good for what to set it to by choice but my question is really about the default options and why they are set as they are.
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

2GB of VM is often all that is needed and because MS determined that setting the default parameters in this way is sufficient to have the system perform.

VM parameters for 1.5 or 2 times the installed RAM was needed when ram was expensive.
If you have a system with 8,16,32,64 GB of ram, it would be impractical/unnecessary to have 1.5 or 2 times the RAM as a Page file. a 2GB-4Gb page will do in most cases.  In a DB server, the page file adjustment to 6-7GB might be useful depending on the installed RAM and size of DB.
GeorgeFromTheBankAuthor Commented:
So basically it determines that there is plenty of physical RAM available when it's installing and sets it to the 2gb-4gb custom setting?
The default pagefile size is set as a percentage of RAM size. Exactly what this will be depends on the OS in question. The idea is to provide a pagefile that is adequate for the workload. If RAM is larger the pagefile is larger because workload is usually dependent on RAM size. A small RAM size is suitable only for light loads and a large pagefile won't help much. A larger RAM size is suitable for larger workloads amd a larger pagefile is necessary for full efficiency.

The pagefile is not used simply as an overflow when RAM is short. It is used in an ongoing capacity as storage for rarely used data. This leaves more RAM for more important purposes which usually means better performance. A larger workload will have more active data, requiring more RAM, and more inactive data, requiring more pagefile.

In most cases the default settings will be adequate. With large RAM sizes the default may be larger than necessary, but this will cause no harm except wasting a small amount of disk space. On the other hand, having a pagefile that is too small can produce performance problems and application or system failures.

Moving the pagefile, or adding one to a secondary physical drive may improve performance. But this will only make a significant difference if pagefile performance is a bottleneck for performance, which it usually isn't.

I would advise using the default settings unless you understand what you are doing and have a good reason to do otherwise. Blindly following someones advice that you do not understand does not qualify.

If it aint broke, dont fix it.
GeorgeFromTheBankAuthor Commented:
If 'The default pagefile size is set as a percentage of RAM size.', why is it always the same on all our machines even though some have 1gb and some have 32gb?
The comment above by Emredrum76 sums it up nicely.
Most attempts to "optimize" the pagefile are simply wasted effort.
GeorgeFromTheBankAuthor Commented:
I agree, I'm more interested to know why it sets it to what it does....
Sure its not the Manufacturer Settings? Are you PC's pre-installed? Come from same disk? same Manufacturer?
GeorgeFromTheBankAuthor Commented:
Yeh, even when I do fresh installs it does the same...
The 2046/48 is the default page file size in the more recent OS installs, 2003,R2,2008,windows 7.

The older OS version had the setting to let windows determine the size as needed.

On workstations, the 2GB is a fair tradoff between hard drive space and performance.

On servers, as others pointed out, you can adjust the configuration to meet your system's needs based on what it is doing.
GeorgeFromTheBankAuthor Commented:
So going back to the original question, does anyone actually know for definate, why it's set from 2gb to 4gb on fresh install?
The only one who definately knows is MS who you should call or look through the white papers if they discussed this adjustment. My guess would be that it doubled the minimum requirement and the common maximum range when this decision was made and this is a good range that would not require the average user to tinker with this setting.

GeorgeFromTheBankAuthor Commented:
Hi Arnold,
Thanks for the input. I did actually investigate elsewhere (and MS) first but couldn't find any reasoning. I guess they had good reason to do it, I just wonder what it was!
The default pagefile size was chosen to provide a pagefile that is usually large enough. If the computer has a workload larger than is practical for your RAM size then this may not be sufficient. If the workload is light then the default size may be larger than necessary, but that is not a problem. Lacking information about your projected workload, the default pagefile size will be suitable for the large majority of users. Only in some unusual situations should it be necessary to change it.

That is the reasoning behind the default size.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GeorgeFromTheBankAuthor Commented:
Nothing official but likely
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Legacy OS

From novice to tech pro — start learning today.