Paging file increase/decrease

mrk

mrk

Man of Honour
Joined
18 Oct 2002
Posts
100,291
Location
South Coast
Hmm that's a point actually. Mine is configured at default to be a kernel memory dump, not a full memory dump. So the system managed size of the pagefil at 64GB is in effect wasting SSD space and I can just set it to the smallest recommended size which according to Windows is 9072MB. My system never crashes though so tbh even that is a non req for me I guess.
 
Man of Honour
Joined
13 Oct 2006
Posts
91,051
Hmm that's a point actually. Mine is configured at default to be a kernel memory dump, not a full memory dump. So the system managed size of the pagefil at 64GB is in effect wasting SSD space and I can just set it to the smallest recommended size which according to Windows is 9072MB. My system never crashes though so tbh even that is a non req for me I guess.

If it's not broke...
 

mrk

mrk

Man of Honour
Joined
18 Oct 2002
Posts
100,291
Location
South Coast
True, although task manager shows my commit nowhere near hitting the commit limit:

aXx4TH3.png

And that's with Lightroom having been run all day editing large photos, 3 browser windows and multiple tabs etc. So realistically, system managed for me isn't an efficient use of the OS drive space really it would seem. It is not something I have looked back at since this 64GB upgrade from 32GB.
 
Don
Joined
19 May 2012
Posts
17,149
Location
Spalding, Lincolnshire
Leaky McLeakFace!

Dare I ask?

Some kind of memory leak, but obviously increasing my pagefile (as mentioned earlier in the thread) merely delayed the issue, rather than solving it :)

Currently monitoring with poolmon.exe to try and work out what is causing the leak (just a shame the system became unusable before I was able to get poolmon downloaded :) )
 
Don
Joined
19 May 2012
Posts
17,149
Location
Spalding, Lincolnshire
Tracked it down (noticed that DSEASDK.exe had over 11,000 handles) and hopefully it's related to an EPOS headset issue
 
Soldato
Joined
17 Dec 2004
Posts
8,696
I have 32gb of memory and set both the min and max page file as 5gb because then it doesn't mess up the drive, I have a bit of OCD going on..hehe

I would defrag the drive but defragging SSD's doesnt do them much good... The yellow is the page file.
MUMfkYO.jpg

Yeah if the system is configured for a complete memory dump you will need a maximum setting high enough to cover all memory in use - you might also encounter situations where the system can't manage the page file in that scenario so setting a static size or minimum size of 1.5x RAM would be better - in Windows 10/11 there is a new setting of an automatic memory dump which attempts to work with that limitation with a system managed page file.

The default on most systems will be an automatic or kernel dump which generally needs around 600-700MB (hence having a minimum size of at least 1024MB is better) - having a complete memory dump configured only really makes sense when doing specific troubleshooting.

If you do have a complete dump configured ignore my advice in earlier posts - I generally assume most people don't, and those who do know what they are doing.
How do you disable the dump file because its annoying because it puts a 1gb memory.dmp fiile in the widows folder when windows throws its toys out of the pram and crashes?

Edit: I think I have figured it out.. Its annoying because when windows crashes, the page file gets deleted for some reason, so windows puts the memory.dmp file where the page file goes, so theres a huge hole where the page file goes as the pagefile is forced at the end of the drive. So I then have to delete the dump file and disable and enable the paging so the page file gets deleted and puts it back in its place again.
kfwPnuT.jpg
 
Last edited:
Soldato
Joined
17 Dec 2004
Posts
8,696
This is my memory usage (while copying from 1 drive to another).. I have set the min/max of the page file to 5gb so it doesn't make a mess of the drive:D

mFAfu7o.jpg
 
Soldato
Joined
17 Oct 2007
Posts
3,824
There are three main reasons why you might want to change the size of the paging file.
  • The system commit limit isn't large enough to support the system commited virtual memory requirements of your particular workload.
  • The paging file is taking up a significant amount of hard drive space.
  • You want to configure the system for a crash dump.
The primary thing people need to be aware of when it comes to the paging file is something called the system commit limit. The system commit limit is calculated based on the amount of physical memory the system has and the size of the paging file(s). When a process allocates certain types of virtual memory; private and page file-backed, the allocation is counted towards the system commit limit. Windows is making you a commitment those pages of memory will reside in RAM or can be stored on disk in a paging file.

In terms of sizing the paging file, if the amount of system committed virtual memory exceeds the amount of physical memory you have when you have loaded up your most demanding workload, the "Minimum" will need to be at least the difference between those two values. For example, you have 8GB of RAM and your workload requires 11GB of system committed virtual memory. You will need to set the "Minimum" to at least 3GB. It would be sensible to add an additional amount to that value so you have plenty of breathing room. For the "Maximum" size, there is no reason to set this to the same value as the "Minimum" size. The paging file only expands if there is a demand for it and as long as the "Minimum" is large enough, the paging file will never need to grow. In fact, you could set the "Maximum" to a very large number because it could prove useful in situations where an application is leaking virtual memory.

While I would recommend having a paging file, I feel there is far too much scaremongering around the subject. It has even gotten to the point whereby certain developers have written their applications based on the assumption a page file is necessary. Mark Russinovich himself assured me a page file is absolutely not necessary for Windows to function correctly and any application requiring a paging file to function is based on that misconception. However, none the less if you try and run these applications with no paging file, they will fail to run correctly. This is something to consider.

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.
This is going to be a rather simplified version of what is happening but hopefully it will be straight forward enough and illustrate why a paging file is not necessary. When a modified private or page file-backed page is removed from a processes working set, the page will be put onto the modified page list. Those modified pages will eventually be written to disk and then subsequently moved to the standby page list. The modified page list is counted towards the "In use" counter (I believe) in memory statistics. This is why having a paging file is good practice. You want to move those infrequently accessed pages out of processes working sets and onto the standby page list where they can become available for other purposes.

If you have no paging file, in those instances, pages on the modified page list have no where to be written to and will therefore stay resident in physical memory occupying space. This does not cause any problems. The system will still function absolutely fine in these cases. It will just mean you will have less physical memory available to you.

What if you have enough physical memory to support the system committed virtual memory requirements of the system, you have set up Windows so it doesn't require a crash dump, and you have no applications that unnecessarily require a paging file, why have one? It's to allow the system to use physical memory in the most efficient way possible. What if you have so much "Available" physical memory, letting the modified page list grow isn't going to have much of an impact on the performance of your system. In those circumstances, disabling the paging file isn't going to make any difference to the performance of your system anyway. Everything in your performance interest will already be resident in physical memory.

As Armageus has already pointed out, the Pushing the Limits of Windows Series articles are well worth reading.

Pushing the Limits of Windows: Physical Memory

Pushing the Limits of Windows: Virtual Memory

Pushing the Limits of Windows: Paged and Nonpaged Pool

Pushing the Limits of Windows: Processes and Threads

Pushing the Limits of Windows: Handles

Pushing the Limits of Windows: USER and GDI Objects – Part 1


Pushing the Limits of Windows: USER and GDI Objects – Part 2
 
Last edited:
Man of Honour
Joined
13 Oct 2006
Posts
91,051
Not sure there is any advantage to setting 1GB max and some disadvantages if the system ever does need more.

Setting a 1GB minimum seems to change the way the swap system works vs system managed or a higher minimum - in some games for instance setting 1GB minimum means they allocate around 300-500MB while with system managed they can be using around 3GB - from what I can see it is just lazy garbage collection which might have some minor performance benefit on a lower end system but likely makes no real difference on a high spec system.
 
Soldato
Joined
17 Oct 2007
Posts
3,824
Based on my understanding of the subject, the paging file is not something which has an impact on system performance, certainly not in any meaningful way. It simply provides a backing store for certain types of virtual memory that would have to otherwise reside in RAM. The main component of the paging file being the impact it has on the system commit limit, which if it isn't large enough, will cause a whole host of issues. As long as the paging file is large enough to support the system committed virtual memory requirements of the workload being run, there isn't really much more one has to worry about. This is why a lot of people suggest letting Windows manage the size of it. Due to the formula Windows uses to determine the size of the paging file, the system commit limit, in 99% of cases, will always be large enough. Having a paging file also allows the system to use physical memory in the most efficient way possible; by removing the least frequently accessed private pages of memory out to disk.

Windows Internals 7th Edition - Part 1 said:
If the page file on your system is too big, the system will not use it any more or less. In other words, increasing the size of the page file does not change system performance. It simply means the system can have more committed virtual memory.

Hey all,

What's your consensus on touching the paging file in a Windows 10 computer? I'm constantly crashing out and my memory usage is around 7.3/8GB. Yes, I can increase memory going through IT/procurement to get it authorised which can take 3 months... however, in the meantime I've read hit and miss on changing the default. Some said the initial size should be x1.5 of your current memory and the maximum size is x3. What do you think?

To answer Yella Fella's original question, if you are using close to all of the 8GB of RAM, the amount of system committed virtual memory allocated will likely be breaching 8GB. Therefore, it makes me question the size of your paging file. As already been suggested though, because you are low on "Available" physical memory, which is such a precious resource, even if you're not experiencing issues related to the system commit limit, you would benefit from more physical memory anyway. Though, of course, I understand simply adding RAM isn't always necessarily a simple thing to do.
 
Last edited:
Back
Top Bottom