pagefile.sys - what are my options

Memory is committed/used progressively. It isn't allocated in huge chunks (well very rarely anyway). A well configured system will get progressively slower as it gets closer to its commit limit. A badly configured system will not do this, or won't do it enough, before hitting its limit.

You were asking me the question. Take the advice or leave it :)

People will play though right?
 
Memory is committed/used progressively. It isn't allocated in huge chunks (well very rarely anyway).

Well, memory is commited when an application ask for it. This happens no matter what the commit limit is made of. It is not like applications somehow will commit slower just because the commit limit is made higher with a page file.

Physical memory is not actually assigned before the application touches the commited memory, but that is another talk.
 
for gaming then you will find that a page file is an absolute must.
Obviously not, because there are those including me that play games without a pagefile. I don't need or have ever needed to have many programs/software open or running all at once, i just don't use my pc that way. My pagefile was removed/disabled because of low ssd space, and i have not had any issues as of yet, but yeah i might i might not?. This is just me this is my experience i can't speak for others. I now have another ssd so i'll test for myself what works for me. Even microsoft have mentioned The 64-bit versions of Microsoft Windows Server 2003 and Microsoft Windows XP can support more RAM than the 32-bit versions of these products. When lots of memory is added to a computer, a paging file may not be required. Notice it says may not?.

Have fun i say :D

such mixed views guys :D
Yeah that's because of mixed experiences :D
 
Well, memory is commited when an application ask for it. This happens no matter what the commit limit is made of. It is not like applications somehow will commit slower just because the commit limit is made higher with a page file.

Not true. As the committed memory reaches or exceeds the amount of available RAM, the kernel's memory manager will be processing page faults more and more often which will have the effect of slowing both the concerned process and indeed the entire computer down, depending upon the frequency. Swapping pages of memory in and out of a slow hard disk is very very expensive. Even SSD is "slow" as far as a page swapping is concerned, just not *as* slow. Which is another reason why a system running a SSD page file should have a fairly large commit size (at least 1x the amount of RAM) to ensure there is sufficient overhead to give a progressive appearance of slow down.

hansp said:
Physical memory is not actually assigned before the application touches the commited memory, but that is another talk.
No it's all the same discussion. What we are discussing is the concept of virtualised memory access. See: Wikipedia
 
Last edited:
Obviously not, because there are those including me that play games without a pagefile. I don't need or have ever needed to have many programs/software open or running all at once, i just don't use my pc that way. My pagefile was removed/disabled because of low ssd space, and i have not had any issues as of yet, but yeah i might i might not?. This is just me this is my experience i can't speak for others. I now have another ssd so i'll test for myself what works for me. Even microsoft have mentioned The 64-bit versions of Microsoft Windows Server 2003 and Microsoft Windows XP can support more RAM than the 32-bit versions of these products. When lots of memory is added to a computer, a paging file may not be required. Notice it says may not?.

Have fun i say :D

When one day you do something out of the ordinary on your PC and you're presented with windows that are missing text and missing buttons, along with other strange "out of memory" errors and general program crashes and maybe even a BSOD.... think of this thread please? Maybe then you won't be so smug.
 
Obviously not, because there are those including me that play games without a pagefile. I don't need or have ever needed to have many programs/software open or running all at once, i just don't use my pc that way.
Out of interest, and ignoring the present cheap-as-chips status of DDR3 (it hasn't always been that way), why install bucketloads of RAM in the first place if you're never going to need it? (please don't say "so that I can run without a pagefile" ... :D )
 
When one day you do something out of the ordinary on your PC and you're presented with windows that are missing text and missing buttons, along with other strange "out of memory" errors and general program crashes and maybe even a BSOD.... think of this thread please? Maybe then you won't be so smug.

Can't say that's ever happened to me on either my 4GB system or the 8GB, it did however on the 2GB but then that needed a page file. I'm going to go with personal experience here
 
Can't say that's ever happened to me on either my 4GB system or the 8GB, it did however on the 2GB but then that needed a page file. I'm going to go with personal experience here

One day it will. No matter how little you use your PC. One day something will happen and you'll have wished you had a page file to take the brunt of it.

It's not like a page file slows a PC down when committed memory is less than the amount of RAM. There's really no *technical* reason not to have one. There are only *human* reasons to have not have one: stubbornness, "look at me, I'm different" and ignorance.
 
One day it will. No matter how little you use your PC. One day something will happen and you'll have wished you had a page file to take the brunt of it.
You probably are correct?.

Firefox 6 + 5 tabs + downloading a 2 GB demo + 5 gadgets + anti-virus software running in the background + windows media player playing + arma2 editor running.

Bare in mind that this is an abnormal load for me.





 
Maybe then you won't be so smug.
Just to get the facts straight matey, i was not trying to be smug ok chap. I'm just enjoying myself. I was not saying you was wrong or that i am in any way right. I'm just having fun mate, no harm in that, peeps can do whatever they want to do. I can only give my advice to others on my own experiences.


Enjoy mate.
 
If you turn the PF off Windows will still create one regardless and use it.

If you disable the paging file, then it really is disabled. Windows can run perfectly fine without one. The role of the paging file is so the system can write pages on the modified page list, which represent pages that have been taking out of a process working set because they aren't being accessed actively, but have not been saved to disk, out to the paging file.

If there is no paging file, those pages won't get written out to disk. While this will result in less memory being available for other purposes, it's not going to prevent Windows from functioning correctly. Does this mean you can disable the paging file without any issues though? Nope, not necessarily.

The paging file has an impact on something called the system commit limit. This represents the maximum amount of committed virtual memory, which must be backed by physical memory or stored in the paging file, processes can allocate at any one time. The limit is therefore the sum of (most of) physical memory plus the size of the paging file(s). The commit limit needs to be large enough to accommodate your workloads system committed virtual memory requirements. If it isn't, your processes will be unable to allocate the virtual memory they want and will fail to run correctly.

The best way to monitor how much system commit your workload requires is by using Process Explorer. If you open the 'System Information' window of process explorer and select the memory tab, take a look at the 'Commit Charge (K)' section.

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.

To determine how large the paging file needs to be on your own system, once you have attained your maximum workload, take note of the 'Peak' commit charge. 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 instance, if your machine has 4GB of physical memory and your workload requires 6GB of system commit, you would need a paging file of at least 2GB to support it. 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 breathing room. If you are interested in crash dumps, make sure it's large enough to accommodate them as well.

You could then set the maximum size to double that value. Some people would suggest setting the initial and maximum size to the same value to prevent the paging file from changing in size. The paging file will only grow when the current commit charge reaches the initial system commit limit. It will grow right up and till it has hit it's maximum size, assuming there is a demand for it. If the paging file expanding and contracting is something that concerns you, as long as the initial allocation is sufficient, the paging file will never need to grow and simply serves as a safety net.

If you have enough physical memory to support your workloads system committed virtual memory requirements, you don't need a paging file and Windows will run absolutely fine without one under that workload. For example, your machine has 4GB of physical memory and your workload requires 2.5GB of system commit. However, there are a couple of disadvantages with running with no paging file. Firstly, there will be less memory available to you, and secondly, the system won't be able to generate crash dumps.

One other thing which is worth mentioning is regarding certain applications failing to run with no paging file. What appears to happen in a lot of cases which may give the impression that the application is failing to run due to no paging file is because the user has disabled it without any regard to how much system commit their workload requires.

There are certain applications which genuinely won't run if there is no paging file though. An example of this is Dawn Of War II. I wanted to gain a little insight regarding this, so I sent 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.

Interestingly enough, if you add 'disablepagefilecheck' to the games shortcut, it will run absolutely fine with no paging file.

The very last thing which is worth talking about is why some people suggest disabling the paging file. Their argument is based on the fact that hard disks are slower than RAM. This ignores the following two points.

  • How Windows manages physical memory.
  • Disabling the paging file doesn't eliminate reading from disk.
Addressing the first point. When a private modified page is taken out of a process working set, it is moved to the modified page list. If the process then touches that page again, it will be soft page faulted back into it's working set. When the modified page list reaches a threshold, a thread called the ModifiedPageWriter wakes up and begins writing pages out to the paging file. The pages are then immediately moved to the standby page list, where they can be soft page faulted back into the process working set.

It's only when the memory manager gives the page which belonged to the original process to someone else will it have to retrieve it's data from the paging file. If it gets to this point, the fact the process needs to read from the paging file is going to cause a negligible impact on system performance. If that data was in your performance interest, it would already be resident in memory.

Touching upon the second point. Things like exe's and dll's are backed by their own location on disk, not the paging file. They will need to be read into memory from disk, which will therefore cause hard page faults. All that happens when you disable the paging file is the things which could be written there, the scenario where the data is written and read back in from disk is taken out of the equation.

If anyone is interested in Windows Memory Management, the videos below are well worth watching.

Mysteries of Memory Management Revealed, with Mark Russinovich (Part 1 of 2)

Mysteries of Memory Management Revealed, with Mark Russinovich (Part 2 of 2)
 
I recently changed my pagefile.sys size from 8gb (same as my RAM) to 2GB to make more space for an install on my SSD.

Didn't have any problems but this was only a temporary measure, so soon after, maybe 5-6 days, I let Windows determine size. So it went back to 8GB (after I uninstalled the program I had changed it for)
 
Yeah i agree if you're a novice, or new to pc's. Me, i have been around pc's for quite a long time so i'm not afraid to play :D


Or a couple more ssd's maybe yeah (without a pagefile) :D, lol, just having a larf wiv yuz, hehehe!.

I've been "in the computer industry" for about 18 years.
Ever since Windows 95 I've always allowed Windows to manage it's own Swap File because it does indeed do a far better job than "messing around" with the settings.
Windows 3 and 3.1 were different - however you need to remember in those days Windows was an application that sat on DOS and not an OS.

Windows does know what it's doing and I bet anyone right now that any amount of "messing" they have done with pagefile's has made absolutely no difference to performance for the better.
 
No it's all the same discussion. What we are discussing is the concept of virtualised memory access.

We were talking about the commit limit. In that regard, it doesn't matter. It was your conclusion that applications somehow begin to commit memory faster, if there is no page file present that bothered me.
 
I recently changed my pagefile.sys size from 8gb (same as my RAM) to 2GB to make more space for an install on my SSD.

Didn't have any problems but this was only a temporary measure, so soon after, maybe 5-6 days, I let Windows determine size. So it went back to 8GB (after I uninstalled the program I had changed it for)

Mark Russinovich has been brought up in the thread. If you read his words, he talks about setting the page file according to your needs. If you don't need more than 2 GB then that is perfect.
 
We were talking about the commit limit. In that regard, it doesn't matter. It was your conclusion that applications somehow begin to commit memory faster, if there is no page file present that bothered me.

I did not say that.
 
*Snip*

Pretty much any system without a page file, under those circumstances above, will very quickly start behaving erratically at the least and throwing "out of memory" exceptions for individual processes or the entire OS kernel at the worst (BSOD).

The issue here isn't due to the fact the user is running with no paging file, but because they are hitting the system commit limit. This can happen whether the system has a paging file or not.

Not true. As the committed memory reaches or exceeds the amount of available RAM, the kernel's memory manager will be processing page faults more and more often which will have the effect of slowing both the concerned process and indeed the entire computer down, depending upon the frequency. Swapping pages of memory in and out of a slow hard disk is very very expensive.

This is something which is stated on Microsoft's Help and Support page.

Microsoft said:
Memory, Committed Bytes:

This is a measure of the demand for virtual memory. It shows how many bytes have been allocated by processes and to which the operating system has committed a RAM page frame or a page slot in the pagefile (or both). As Committed Bytes grows above the available RAM, paging increases, and the amount of the pagefile in use also increases. At some point, paging activity starts to significantly affect perceived performance.

RAM, Virtual Memory, Pagefile and all that stuff - (The page appears to be down at the moment)

From my understanding though, committed bytes isn't an appropriate counter to use if you're interested in physical memory. A process merely allocating committed virtual memory will only be having an impact on system commit. It's not until the process touches the memory, does it demand it to be backed by physical memory. In which case, you're better of looking at a counter which is displaying information about physical memory.
 
Back
Top Bottom