Pagefile.

RAM is not being ignored (or unused). There's a difference between unused and unutilised. Windows will utilise available RAM and write to the PF if/when needed. The same goes for apps. With more RAM available, the PF might be written to less but it depends on what apps you run. For the software I use this seems to be the case especially since I upgraded from 8 to 16GB and noticed the difference on the reports being given.

Essentially there isn't anything being wasted or untapped in Win7.

The gadgets are from http://www.myfavoritegadgets.info/

I see what you mean now, sorry for being such a noob on this.....I have now upped my PF so it is between 1GBmin and 6GBmax and we shall see how I get on....I have installed the System monitor app and it is reading about 24% Ram....19% PF (of the 1024MB)....

thanks for your patience.:)
 
Aye just keep an eye on it over about a week and then fine tune from there :)
 
(Mrk, I apologise for responding to your post a little back to front. I thought it would make a little more sense responding to your post in this manner. :))

For reference, I have 16GB RAM and as you can see, the PF is still required and used by Windows, even if the actual usage is tiny (220MB), it's still a needed thing.

A paging file is beneficial, but it is not a requirement. Windows can run perfectly fine without one. The role of the paging file is so Windows can write a subset of pages on the modified page list out to the paging file. Pages on the modified page list represent pages which have been taken out of a process working set because they haven't been accessed recently but have yet to be written to disk. If you have disabled the paging file, those pages won't be written out to disk, and they will stay on the modified page list. While this will result in less memory being available for other purposes, it's not going to cause any problems.

200MB may not be enough in most cases. On my own machine after 2 days of Lightroom/Photoshop, gaming and media watching as well as constant browser usage my PF is using a max of 220MB of space (now at 165MB), it is manually set to be 2GB min/max.

Monitor your usage using Windows gadgets or the Resource monitor and then manually set a small enough pagefile based on your usage.

Monitoring how much has been written to the paging file and then sizing it accordingly isn't really the correct way of determining how large the paging file needs to be. When it comes to sizing the paging file, the priority should be on how it impacts the system commit limit. When processes allocate certain types of virtual memory, the allocation will get charged against the system commit limit. Windows is making you a commitment that it will be able to back that data by physical memory, or store it on disk in the paging file. The commit limit is therefore the sum of most of physical memory plus the size of the paging file(s). You can monitor how much system commit your workload requires by Process Explorer. If you open the 'System Information' window, 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 'Commit Charge Limit' has to be large enough to support your workloads commit charge. If it is not, 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 'Commit Charge Limit', in a best case scenario, at the bottom of this post.

If you are looking to manually size the paging file, the most appropriate way of doing so is too have a look at the 'Commit Charge Peak' value after you feel you have attained your maximum workload. The difference between that value and the amount of physical memory of the machine is the size of the paging file which you will need to support your workload. For example, if you have 4GB of physical memory and your workload requires a commit charge off 4.7GB, the paging file would need to be at least 700MB. 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.

The most sensible option for the maximum size would be to set it to double what the initial size has been set too. Some people may suggest having the initial and maximum sizes the same value 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 the 'Commit Charge Limit'. As long as the initial allocation is sufficient, the paging file will never need to change in size and the larger maximum simply serves as a safety net.

If you have enough physical memory to support your workloads commit charge, you don't need a paging file and Windows will run perfectly fine without one. For example, you have a system which consists of 8GB of physical memory and your workload requires 5.6GB of commit charge. However, there are a couple of disadvantages with 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 will also apply to cases where you have one, but it isn't large enough to support the crash dump you are configured for.
One last thing which is probably worth mentioning is regarding certain applications failing to run because the paging file has been disabled. Taking into account the role of the paging file, whether you have one or not shouldn't effect the functionality of the software which you're running. However, there does seem to be certain applications (Dawn Of War II being an example) which genuinely won't run if there is no paging file. I couldn't quite understand the reasoning behind this so I thought I would send Mark Russinovich a message via his blog, 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.

Applications which fail to run due to the above should not be confused with the issue of hitting the system commit limit, which may give the illusion a paging file is necessary and a particular application requires one. That seems to have originated from the fact that people are disabling the paging file without any regard to how much commit charge their workload requires.

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

Following on from the above, I am just going to illustrate what happens when you hit the system commit limit. My system has 4GB of physical memory and the initial and maximum size of the paging file has been set to 1024MB. This means the system commit limit is roughly 5GB. I ran a tool called Testlimit and directed it to allocate 2GB of private committed virtual memory by using the -m switch. As I reached the system commit limit, my processes were unable to allocate the virtual memory they wanted and Windows popped up a message telling me I was low on memory.

ProcessExplorer-5.png


ProcessExplorer-1-2.png


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

If anyone is interested in this sort of thing, the following links are well worth looking at.

Papers:



Videos:



 
Last edited:
Hmm cheers for the indepth info once again, I actually didn't think of the min/max sizing because I still was thinking with a HDD in mind where you wouldn't want it to expand and shrink on heavy workloads because that could impact performance, obviously on an SSD this is not a problem as it can freely do this without impacting performance.

I will re-check my settings tonight :p

Edit*
The last week of usage has been abnormally high for video/photo editing and I just checked Process Explorer, the Commit Charge Peak is 8.8GB, I have 16GB of RAM so I am assuming going by the above info that for that particular workload that my PF should at that moment have been 7.2GB (the difference between the Peak and amount of physical memory).

Of course that kind of usage was a one off but it's nice to know this information after such sessions. I can re-set the PF again but this time with a low minimum and say up to 10GB for maximum to add a bit of buffer just in case it's needed.

Here is my screeny:

processexplorer.jpg
 
Last edited:
*Snip*

Edit*

The last week of usage has been abnormally high for video/photo editing and I just checked Process Explorer, the Commit Charge Peak is 8.8GB, I have 16GB of RAM so I am assuming going by the above info that for that particular workload that my PF should at that moment have been 7.2GB (the difference between the Peak and amount of physical memory).

I'm sorry, I don't think I was particularly clear in my previous post. The system commit limit is the sum of most of physical memory plus the size of the paging file(s). You need to make sure the system commit limit is large enough to support your workloads commit charge. If your workload requires 6GB of commit charge, the amount of physical memory of the machine and / or the size of the paging file(s) would need to add up to a sum of 6GB.

If the amount of physical memory of the machine is more than your workloads commit charge value, you don't need a paging file because the system commit limit is already large enough. The reason why you would want to have a paging file in those cases is due to the following reasons.

  • A subset of pages on the modified page list can be written out to the paging file, which results in more memory being available for other purposes.

  • The system will be able to generate crash dumps.
Here is my screeny:

*Process Explorer Screenshot*

And roughly 9GB sitting on the standby page list is, errrrr, awesome. :D:o

Edited...
 
Last edited:
I did say that session was an abnormally heavy session remember ;)

Re-Adjustments underway :p
 
The pagefile should be 1.5x physical memory on a 64 bit system.

The pagefile is best placed on the SSD as it's the best performing drive you have, infact of all the files on your system, the pagefile is one which gets the most benefit from being on the SSD.

You can move it if you want. But this is a workaround for you buying a drive with too small capacity, ideally you'd buy a bigger drive.
 
But my usage doesn't even command a 16GB one and the fact that even when set to 10GB that at most 1% of that was in use since I rebooted when I got home from work and did some BF3/photo editing?

Idle now just browsing there's 33MB of the pagefile in use.
 
I did say that session was an abnormally heavy session remember ;)

Re-Adjustments underway :p

Yep. Though, what I was trying to say, but failing miserably :p, was if the amount of physical memory you have exceeds the amount of commit charge your workload requires, you don't need to calculate the difference between the two because the system commit limit is already large enough to accommodate your workload. A system which has 16GB of physical memory would only require a paging file of over 7GB is if the workload needed 23GB of system commit.
 
But my usage doesn't even command a 16GB one and the fact that even when set to 10GB that at most 1% of that was in use since I rebooted when I got home from work and did some BF3/photo editing?

Idle now just browsing there's 33MB of the pagefile in use.

mrk, so i have a 80gb SSD, and 16gb memory, making a 16gb pagefile (which is way to much) so i was thinking of reducing it to 4gb ? what do you think

the most intensive act i do is BF3
 
I've been toying with various settings the past couple of weeks really. Playing BF3 has next to no increase in pagefile size. Most recently I've just set the min/max to 800/2048 and that seems fine (not that any other value had a problem anyway though). The PF stays at 800MB and has yet to increase in size which I'd expect it to do when the requirements command it. Dual screens are immensely handy for keeping an eye on usage when gaming :p

It's worth noting that to date, I've never seen a virtual memory low message with any PF configuration. I've never had the PF turned off though, only manually set.

Keep in mind the info Fire Wizard has posted above as well though.
 
I've been toying with various settings the past couple of weeks really. Playing BF3 has next to no increase in pagefile size. Most recently I've just set the min/max to 800/2048 and that seems fine (not that any other value had a problem anyway though). The PF stays at 800MB and has yet to increase in size which I'd expect it to do when the requirements command it. Dual screens are immensely handy for keeping an eye on usage when gaming :p

It's worth noting that to date, I've never seen a virtual memory low message with any PF configuration. I've never had the PF turned off though, only manually set.

Keep in mind the info Fire Wizard has posted above as well though.

ok mate, what is this minimum settings size then? would that not be 0?
 
Well it's a bit weird, Windows says no less than 800MB else crash dumps etc might not be saved but the dialogue box says a minimum of 16MB is allowed. If you choose less than 800MB Windows gives you that warning.

I've never had a crash so can't really say if setting it less than 800 does indeed save a dump file or not.
 
I've been toying with various settings the past couple of weeks really. Playing BF3 has next to no increase in pagefile size. Most recently I've just set the min/max to 800/2048 and that seems fine (not that any other value had a problem anyway though). The PF stays at 800MB and has yet to increase in size which I'd expect it to do when the requirements command it. Dual screens are immensely handy for keeping an eye on usage when gaming :p

Given the information you have shared with us Mrk, the paging file on your system will likely never increase under the most demanding of your current workloads. The paging file won't increase in size because there are still pages on the modified page list which can be written to the paging file, but the amount which has already been written there has reached the value which you have set the initial size of the paging file too. What will happen in those cases is the modified page list will continue to grow. The paging file will only increase in size when the 'Commit Charge Current' reaches the 'Commit Charge Limit', assuming you have set a larger maximum than an initial size, of course.

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

If you have enough physical memory to support your workloads system commit, but would still like to have a paging file, a good starting point in terms of sizing it would be to make sure it's large enough to hold a crash dump. Crash dumps will vary in size though depending on the type of memory dump you're configured for. Assuming you are set up for a 'Kernel Memory Dump', the size will depend on the state of the system at the time of the crash.

Once the paging file has been configured to support your workloads system commit requirements and / or accommodate a crash dump, you could use the Windows Management Instrumentation Command-line tool to check how much has been written to the paging file after the system has been running for a little while and then increase it if you felt it was necessary. You could alternatively use a gadget like Mrk suggested in his post here to do the same thing.

Edited....
 
Last edited:
Back
Top Bottom