• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.
  • The forums have been upgraded with support for dark mode. By default it will follow the setting on your system/browser. You may override it by scrolling to the end of the page and clicking the gears icon.

Any way to control when Windows starts dumping to the pagefile?

Joined
Jun 29, 2019
Messages
136 (0.06/day)
Processor AMD Ryzen 5 5600X @4.8Ghz PBO 100W/60A/90A
Motherboard MSI B550-A PRO
Cooling Hyper 212 Black Edition
Memory 4x8GB Crucial Ballistix 3800Mhz CL16
Video Card(s) Gigabyte RTX 3070 Gaming OC
Storage 980 PRO 500GB, 860 EVO 500GB, 850 EVO 500GB
Display(s) LG 24GN600-B
Case CM 690 III
Audio Device(s) Creative Sound Blaster Z
Power Supply EVGA SuperNOVA G2 650w
Mouse Cooler Master MM711 Matte Black
Keyboard Corsair K95 Platinum - Cherry MX Brown
Software Windows 10
Hi,
My question might seem a bit bizarre, let me explain myself real quick:
So I noticed a strange thing with Windows' memory management. My Chrome is always loaded with tabs, uses at least 2.5-3.5GB. When I launch a game that uses quite a bit of RAM, over the course of about 10 minutes, Windows keeps flushing Chrome's data from the RAM to the pagefile on my SSD even though my total RAM usage is around 10-11GB and I have 16 gigs total, not even close to maxing it out.
This is really annoying for me since when I close my game and go back to Chrome, it lags a bit as it tries to retrieve the data from the SSD. It's completely unnecessary since I still have plenty of free RAM. It would be understandable if I started hitting the 14.5-15GB mark. Also, I paid for 16 gigs of RAM, I don't want Windows deciding an SSD is better instead and lock me up at like 8-9GB.

I don't want to disable the pagefile, but would like to know if anyone has an idea on how to change the trigger point of when Windows decides it's high time to unnecessarily use up those write cycles on your SSD.
I want to keep the pagefile, but have it kick in only when my RAM usage hits the 85-90% mark. If anyone has an idea it would be great. I tried looking this up on google but no dice, there's only the usual tutorials on how to expand or reduce the pagefile size...etc.

Thanks.

Screenshots showing what I mean:
(Yes that's Trine 4 don't judge me)
 
Last edited:
Is it too much bother to close chrome before playing? I don't think you have much control over pagefile besides size constraints, and you can put it on another drive if you want. I like to move windows temp folders to an hdd as well as firefox cache to minimize ssd wear but I leave the pagefile on the ssd.
 
I don't think that there is a set limit that Windows is holding you to. Instead I think you are experiencing Game Mode. It detects when you are playing a game, and prioritizes resources for the game, moving background tasks out of RAM. You can try turning it off and see if it helps:

 
Could this program help? It might cause the same behaviour as what Windows is doing for a inactive background process though.

 
Your issue looks a lot like a problem a friend had (and I ran into it on my notebook) a while ago. Windows 10 sometimes decides to load zombies (= process without a parent programm) into RAM.

To make windows clear the old pagefile:
  1. Regedit
  2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
  3. set "ClearPageFileAtShutDown" to 1
  4. Restart computer
 
Windows 10 sometimes decides to load zombies (= process without a parent programm) into RAM.
Are you referring to the newer Windows UWP apps such as Cortana, Microsoft Edge, and Photos etc.? You can go into Settings - Privacy, and scroll down to Background apps to toggle off running in the background as I have.

136064
 
My question might seem a bit bizarre, let's me explain myself real quick:
So I noticed a strange thing with Windows' memory management. My Chrome is always loaded with tabs, uses at least 2.5-3.5GB. When I launch a game that uses quite a bit of RAM, over the course of about 10 minutes, Windows keeps flushing Chrome's data from the RAM to the pagefile on my SSD even though my total RAM usage is around 10-11GB and I have 16 gigs total, not even close to maxing it out.
I don't think you understand how the page file is supposed to work. What you describe is exactly how it is supposed to work. The PF is not some over-flow for when RAM gets full. The PF is used by the OS to temporarily store lower priority data. That is, data that is not high enough to stay in RAM.

The best thing you can do is just leave the PF alone. Windows knows how to manage it just fine.
 
Is it too much bother to close chrome before playing? I don't think you have much control over pagefile besides size constraints, and you can put it on another drive if you want. I like to move windows temp folders to an hdd as well as firefox cache to minimize ssd wear but I leave the pagefile on the ssd.
Why would I? I mean either way I'm not maxing out my RAM or even coming close to doing that. Plus, I was on 8 gigs and not having to close Chrome everytime was the reason I added another 8GB kit in the first place.
I don't think that there is a set limit that Windows is holding you to. Instead I think you are experiencing Game Mode. It detects when you are playing a game, and prioritizes resources for the game, moving background tasks out of RAM. You can try turning it off and see if it helps:

Not in the broader sense, no. Because when I use After Effects, it has no problems whatsoever using up all my available RAM. So it's just a thing with programs that utilize less than 4GB of RAM at a time, Windows tried to prioritize one from another. Game Mode was indeed on, I turned it off and will fill you guys in after I retest the same scenario, thanks.
Could this program help? It might cause the same behaviour as what Windows is doing for a inactive background process though.

Thanks but I think this program does exactly what I'm trying to avoid. I don't want to clear out the standby list either.
I have "Let apps run in the background" turned off entirely, could this be the reason?
Your issue looks a lot like a problem a friend had (and I ran into it on my notebook) a while ago. Windows 10 sometimes decides to load zombies (= process without a parent programm) into RAM.

To make windows clear the old pagefile:
  1. Regedit
  2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
  3. set "ClearPageFileAtShutDown" to 1
  4. Restart computer
Thanks but no, in my case, it does the complete opposite. It flushes active programs (chrome in my case) to the pagefile when I launch a game even though there's plenty of free available RAM left.
I don't think you understand how the page file is supposed to work. What you describe is exactly how it is supposed to work. The PF is not some over-flow for when RAM gets full. The PF is used by the OS to temporarily store lower priority data. That is, data that is not high enough to stay in RAM.

The best thing you can do is just leave the PF alone. Windows knows how to manage it just fine.
Yes, I thought it was an overflow safety measurement thing at first, turns out it's clearly not. Do you know of any way to change what windows thinks low priority is? is there any way I could mark Chrome and other programs as high priority so windows leaves them alone?

I don't think that there is a set limit that Windows is holding you to. Instead I think you are experiencing Game Mode. It detects when you are playing a game, and prioritizes resources for the game, moving background tasks out of RAM. You can try turning it off and see if it helps:

Tested again with Game mode off, didn't change a thing :(
 
This is really annoying for me since when I close my game and go back to Chrome, it lags a bit as it tries to retrieve the data from the SSD.
I'm betting that is not the problem. I suspect the lag is more likely due to Chrome going out to the Internet and downloading a new fresh page - like it should.
Yes, I thought it was an overflow safety measurement thing at first, turns out it's clearly not. Do you know of any way to change what windows thinks low priority is? is there any way I could mark Chrome and other programs as high priority so windows leaves them alone?
You can easily search for
How to Change Process Priority in Windows 10. But again, I think that is a mistake.

It is not about Windows leaving them alone - its about Windows giving what you are currently doing higher priority. If you tell it to give Chrome a higher priority, there's a good chance your game play will go poorly.

I don't want to disable the pagefile
Good, because that would not be a good idea.
 
I'm betting that is not the problem. I suspect the lag is more likely due to Chrome going out to the Internet and downloading a new fresh page - like it should.
You can easily search for
How to Change Process Priority in Windows 10. But again, I think that is a mistake.

It is not about Windows leaving them alone - its about Windows giving what you are currently doing higher priority. If you tell it to give Chrome a higher priority, there's a good chance your game play will go poorly.
Good, because that would not be a good idea.

On the topic of this bad idea, heres a PS script that will let you change process priority.
https://gallery.technet.microsoft.com/scriptcenter/Set-the-process-priority-9826a55f

I'm going to create a VM with this PS script and see what happens, could be fun to benchmark some software/monitor page file size and see what happens.
 
When starting the game, do you minimize Chrome? Minimising Chrome activates Chrome features to lower RAM usage. Also applies to Firefox.
 
Only one way to find out, by making VM's and benchmarking things!
You could do that but it would only simulate one or two cherry-picked scenarios out of potentially millions. To apply to the OP's scenario, you would have to have the exact same hardware (including same revision numbers), same version of the OS with the same updates, same software (including security software) configurations too. In other words, it would not conclusively prove or disprove much of anything - an exercise in futility.
 
Chrome like any other browser will use resources whether you are looking at it or not. Bill Bright hit the nail solidly on the head as to what is happening. Even though the system shows 10 or 11 GB in use Windows itself will reserve some of your RAM without you knowing about it. If you want to see this stop (which is a non issue) get another 16GB of RAM and you will be happy.
 
When starting the game, do you minimize Chrome? Minimising Chrome activates Chrome features to lower RAM usage. Also applies to Firefox.
I actually tested it both ways, makes no difference minimized or not, the same thing will happen.
 
If you want to see this stop (which is a non issue) get another 16GB of RAM and you will be happy.
It still won't stop. Windows will still use the PF regardless how much RAM is installed. And that is NOT a bad thing.
 
It still won't stop. Windows will still use the PF regardless how much RAM is installed. And that is NOT a bad thing.

I did not say it was a bad thing I said "which is a non issue" I actually have a 32GB page file on one of my NVME drives.
 
You could do that but it would only simulate one or two cherry-picked scenarios out of potentially millions. To apply to the OP's scenario, you would have to have the exact same hardware (including same revision numbers), same version of the OS with the same updates, same software (including security software) configurations too. In other words, it would not conclusively prove or disprove much of anything - an exercise in futility.
I think this is very possible to test and at least see if there is something related here even if it's localized to my own setup.

Ideally somebody like Gamer Nexus would have a few testbenches setup with the same CPU, SSD, etc and just vary the RAM to see if this would make a difference at all, I imagine it would given the vast speed differences between even NVME storage and RAM, though whether this translates to actual performance gains or not is to be determined.
 
@gwynbleidd997
After reading through the above discussion on the subject, I find it interesting that one simple option seems to have been over-looked: Disable the pagefile. You have 16GB of ram, unless you have some extreme usage scenario, your system doesn't strictly need a pagefile. Pagefiles/Swapfiles/Etc are all virtual memory schemes that where created back when system memory was a very scarce resource(counted in MB). This limitation no longer exists. Even though modern programs use more ram than they used to, the 16GB you have completely negates the need for virtual memory.

Disable your pagefile(Windows will give a warning, ignore it) and watch your system fly. If you encounter problems, the pagefile can easily be re-enabled. This conversation has come up in the forums previously and after being challenged to do so, I disabled my pagefile and everything was fine. Granted I have much more ram than you do, but tested with less ram to see the effects. 12GB of ram seems to be the threshold for pagefile-free operation. So give it a try, you have nothing to lose except the issues you've been having.
 
I have 32GB of ram and disabled the PF way back when W10 was first released, with no issues whatsoever... I don't game but do use a lot of resource- heavy apps at the same time along with multiple chrome tabs (8-15)....
 
@gwynbleidd997
After reading through the above discussion on the subject, I find it interesting that one simple option seems to have been over-looked: Disable the pagefile. You have 16GB of ram, unless you have some extreme usage scenario, your system doesn't strictly need a pagefile. Pagefiles/Swapfiles/Etc are all virtual memory schemes that where created back when system memory was a very scarce resource(counted in MB). This limitation no longer exists. Even though modern programs use more ram than they used to, the 16GB you have completely negates the need for virtual memory.

Disable your pagefile(Windows will give a warning, ignore it) and watch your system fly. If you encounter problems, the pagefile can easily be re-enabled. This conversation has come up in the forums previously and after being challenged to do so, I disabled my pagefile and everything was fine. Granted I have much more ram than you do, but tested with less ram to see the effects. 12GB of ram seems to be the threshold for pagefile-free operation. So give it a try, you have nothing to lose except the issues you've been having.
This is what I thought at first before posting here. Here's the problem, I always keep Chrome open no matter what, and once in a while, I open up After Effects for a quick video edit, as you all already know, that thing uses a lotta RAM, my RAM usage can easily reach the 80-90% (even with a pagefile). If I disable it, I would have to enable it again everytime I start editing a video and restart my PC, because otherwise everything will just crash (I tried it, without a pagefile, everything goes to shit if your RAM usage goes beyond 80%) and then disable it afterwards.
It's frustrating how you cannot change some settings in Windows, it's like Microsoft assumes whatever works for the average joe should be fine for everyone else. Why can't they just give us the option to tweak everything the way we want even if what we go after is not always the most efficient.
 
1. One thing about Chrome I noticed .... two identical machines with identical OS and software, virtual mirrors of one another ... one would have memory related issues ... the other would not. Some machines had issues, some not, Only thing that was consistent ... switching browsers made it go away.

2. Some programs force writes to the page file and other locations. Among these is AutoCAD which in addition to page file usage, maintains it's own cache files and routinely forces writes to disk. When about to perform significant operation, it does a disk write such that the pre-action file is auto saved. Even with 32 GB and plenty of unused physical memory , the page files grows substantially when this happens.

From AutoCAD 2020 Support pages:

"The swap file size is basically a limit which restricts the total virtual size of the AutoCAD process. A good rule of thumb for configuring your swap file is three times the amount of physical memory on your system. This usually sets the limit high enough to prevent running out of swap space ....

Graphics cache files are created and maintained to optimize performance and increase the regeneration speed of objects with complex geometry such as 3D solids, non-mesh surfaces, and regions. These cache files persist between drawing sessions and are saved in your . . .\AppData\Local\Autodesk\. . . folder under GraphicsCache. The maximum number of graphics cache files that are maintained is limited in number and total size by the CACHEMAXFILES and CACHEMAXTOTALSIZE system variables. If the limits are exceeded, the oldest cache files are automatically deleted."
 
It is amazing to me to see how people justify disabling their page file by saying, "I disabled it and everything is fine".

There's a reason it's there. And since Microsoft has shown they can easily dynamically adjust it when needed, wouldn't it make sense that they would disable it if, with lots of RAM installed, it was better to have it disabled? You can question the intelligence of Microsoft's marketing weenies and some of their executives. But the developers are among of the sharpest programmers on this planet - and they are true Windows experts too.

Unless you are a true Windows virtual memory management expert (as are the dozens of PhDs and CompSci professionals at Microsoft with their exabytes of empirical data and decades of experience), leave it alone.

Maybe, and that's a big maybe, 1% of all the world's Windows users could benefit from disabling the PF. It is highly unlikely any one here falls into that extreme group. So again, because you found no issues is not a reason to disable it. Windows does not put critical data it needs right away in the PF. And the PF is not an over-flow location.
I think this is very possible to test and at least see if there is something related here even if it's localized to my own setup.
And that's fine - as long as there is no attempt to extrapolate those one-off anecdotal results as applicable to the masses.
 
There's a reason it's there.
There used to be a good reason for it to be there. It was a critically needed function in the 80's, 90's, 00's and to a small degree early in this decade. Now? Not so much. Windows runs perfectly without it when you have over a certain amount of ram.
Unless you are a true Windows virtual memory management expert (as are the dozens of PhDs and CompSci professionals at Microsoft with their exabytes of empirical data and decades of experience), leave it alone.
That is an example of elitism and flys in the face of what these help forums on TPU are all about. You did not need a PHD to experiment, try different settings and arrive at a conclusion that works for you. The folks at Microsoft are not PC gods. What they say is not the end-all-be-all of computing.

This is a situation that has been tested, retested and tested again over and over all over the world and the general conclusion is that with enough system ram, PC's do not need virtual memory of any kind, regardless of the OS being run.

@gwynbleidd997
Try it for yourself. If works for you and solves your problems, very cool. Forge ahead. If it partially solves your problem, but not completely, try a fixed size for your pagefile, say 3072MB maximum and 3072MB minimum. Pagefiles are not an exact science as others might suggest. Optimal usage of such depends on a great many factors & variables and Windows doesn't always get it right. If it did, you wouldn't be having the issues you're having.
 
Last edited:
Back
Top