16gb and page file

Permabanned
Joined
4 Sep 2011
Posts
6,662
Location
Durham
Last memory question from me so here we go...

Ive picked up 16gb of ram and plan on installing it tomorrow but was wondering what do people have their page file set to? Do you let windows set it or set yourself a minimum and a maximum and if so,whats the best min/max for it?

Ive heard so many different opinions about this I dont have a clue whats the best option
 
Man of Honour
Joined
13 Oct 2006
Posts
91,058
I have minimum size 1GB so that things like BSOD dumps work properly while using minimum disc space/writes and then set max size somewhere between 2-8GB depending on software use. Most people probably won't see more than a few 100s of MB utilisation but if you do a lot of certain database tasks, high end image editing, etc. you might top 2GB.
 
Permabanned
OP
Joined
4 Sep 2011
Posts
6,662
Location
Durham
Cheers Rroff. TBH its not something Ive ever thought about but Ive noticed Batman is using 6gb of the 8gb or ram I have and using 10gb pagefile even though Ive got it set to 4 gb? That games all over the place
 
Soldato
Joined
17 Oct 2007
Posts
3,825
The most important element about the paging file is how it impacts a particular aspect of the system, with that aspect being the system commit limit. When processes allocate certain types of virtual memory, the allocation is charged against something known as the system commit limit. The commit limit represents the maximum amount of virtual memory, which has to be backed by physical memory or the paging file, processes can allocate at any one time. The limit is therefore derived from the sum of physical memory (or most of), plus the size of the paging file(s).

You can monitor the system committed virtual memory utilisation of the system by using a tool like Process Explorer. The information will be shown under the 'Commit Charge (K)' section of the 'Memory' tab.

Commit Charge (K):

  • Current - This represents the amount of committed virtual memory processes have currently allocated which must be backed by physical memory or stored in the paging file.

  • Limit - This represents the amount of committed virtual memory processes can allocate at any one time and is the sum of most of physical memory and the size of the paging file(s).

  • Peak - This represents the total amount of committed virtual memory processes have allocated since the system booted which must be backed by physical memory or stored in the paging file.

The system commit limit has to be large enough to support the system committed virtual memory requirements of the workload which you're running. If the commit limit is smaller than that value, your processes won't be able to allocate the virtual memory they want and will fail to run correctly. I have illustrated what happens when you hit the system commit limit at the bottom of this post.

If you're going to manually size the paging file, once you feel you have attained your maximum workload, have a look at the 'Commit Charge Peak' value. The difference between that value and the amount of physical memory of the machine is how large the paging file will need to be on your system to support that particular workload. For example, if your workload requires 6GB of system commit and the machine has 4GB of physical memory, the paging file will need to be at least 2GB. This should be the bare minimum for the initial size of the paging file. You would want to add extra onto that value to give yourself some buffer. If you are interested in crash dumps, make sure it's large enough to accommodate them as well.

For the maximum, you could set it to double the initial size. Some people may suggest having the initial and maximum sizes the same to prevent the paging file from expanding and contracting. Assuming this is an issue, the paging file will only grow when the 'Commit Charge Current' reaches whatever the initial system commit limit is. Providing the initial allocation is sufficient, the paging file will never need to grow and the maximum simply serves as a safety net.

If the amount of physical memory you have exceeds the amount of system committed virtual memory your workload requires, you don't need a paging file and Windows will run perfectly fine without one. However, there are a couple of disadvantages of running with no paging file.

  • The subset of pages on the modified page list which could get written out to the paging file will no longer be able too. This results in less memory being available for other purposes.

  • The system won't be able to generate crash dump files. This also applies to cases where you have one, but isn't large enough to support the crash dump you are configured for.

---------------------------------------------------------------------------------------------

The following is just an illustration of what will happen in a best case scenario when you hit the system commit limit. The system which I was using had 4GB of physical memory and both the initial and maximum size of the paging file had been set to 1024MB.

ProcessExplorer-5.png


ProcessExplorer-1-2.png
 
Last edited:
Caporegime
Joined
8 Sep 2006
Posts
38,058
Location
On Ocuk
Last memory question from me so here we go...

Ive picked up 16gb of ram and plan on installing it tomorrow but was wondering what do people have their page file set to? Do you let windows set it or set yourself a minimum and a maximum and if so,whats the best min/max for it?

Ive heard so many different opinions about this I dont have a clue whats the best option

When I had 8GB memory there were times when the pagefile was used, however since installing 16GB I've turned it off for a week as a test, and memory usage never gets high enough to use the pagefile. As for BSOD dumps, unless that becomes an issue I might turn it back on, which so far it hasn't
 
Soldato
Joined
17 Oct 2007
Posts
3,825
When gaming I checked my pagefile usage via AB & I'm using something like 8GB even though I have 16GB physical memory installed with only 6GB of it acually bieng used.

When you say "AB", are you referring to MSI Afterburner? If you are, the 'Pagefile usage, MB" isn't actually displaying how much has been written to the paging file. What it is really displaying is your current commit charge, which task manager will display as well.

  • Windows 7 - Task manager - Performance tab - System heading: Commit (MB) - (The second value being the system commit limit)

  • Windows 8 - Task manager - Performance tab - Memory section: Committed - (The second value being the system commit limit)
 
Soldato
Joined
17 Oct 2007
Posts
3,825
'you don't need a paging file and Windows will run perfectly fine without one.'

rofl

You have taken what I said out of context. Here is what I wrote in full.

Fire Wizard said:
If the amount of physical memory you have exceeds the amount of system committed virtual memory your workload requires, you don't need a paging file and Windows will run perfectly fine without one.

With the exception of the information highlighted above, there isn't any technical reason why having no paging file would cause any issues. The purpose of the paging file is to enable processes private pages which are sitting on the modified page list (which represent pages that aren't being accessed actively but haven't yet been saved to disk) to be written out to disk.

If a system doesn't have a paging file, those pages sitting on the modified page list waiting to be written out to the paging file will instead stay on the modified page list, occupying space in physical memory. While this will result in less physical memory being available, it doesn't cause any issues.

Mark Russinovich, one of the authors of the Windows Internals book has done a couple of seminars regarding Windows Memory Management and this is what he says.

Mark Russinovich said:
Can Windows run without a paging file? Sure, I can set a paging file size of zero and Windows will run just fine without a paging file.



One thing I did fail to mention though was regarding certain applications failing to run if there is no paging file, Dawn Of War II being one of those applications. I was extremely curious about this so I sent Mark Russinovich an email, and this was his response.

Mark Russinovich said:
These apps could very easily be querying directly for the existence of a paging file and failing if one’s not present, based on the misconception that one is necessary.

Interestingly enough, by adding the "-disablepagefilecheck" switch to the .exe, Dawn Of War II ran fine even with the paging file disabled.
 
Associate
Joined
14 May 2012
Posts
1,160
I always set mine manually.
It always depends on the speed of the disk and the amount of RAM I have installed.
(And what I plan on doing with it).

My work laptop has 16GB of RAM and 4GB page file. (Intel SSD).

My media PC has 8GB and just a 2GB page file (Samsung M2 PCIE SSD).

My gaming PC has 32GB of RAM and a 2GB Page file.

I set them all to static (same min + max size), so there is no time / writes spent deflating or inflating the file.
 
Caporegime
Joined
20 Jan 2005
Posts
45,677
Location
Co Durham
Rough rule of thumb is meant to be page file = 1.5 times your physical ram.

However, i do believe this is a bit excessive once you go to 16Gb.

Certainly when I had 8Gb ram and 6Gb of page file I regularly ran out of memory with errors and crashes to desktop.

Windows on my systems automatically set it to 2gb with my 16Gb ram and I have left it at that.

Also unless things have changed, I was always told to move the page file away from your ssd onto another drive.

And I always set them to static.
 
Back
Top Bottom