Question Question on virtual memory ?

Mas3nk0

Distinguished
Jul 31, 2013
56
1
18,635
Last few months I have games crashing back to desktop (sometimes even BSOD). Following the usual troubleshooting paths didn't resolve this until I changed the virtual memory from auto (which only allocates 5000Mb) to minimum 1.5x RAM and max 3x RAM. This made the crashes in some games go away and in others made them less frequent. Now this didn't make any sense to me as I have 32Gb of physical memory and additional slow SSD memory (which is what virtual memory gives) shouldn't resolve any of these crashes. A memtest on the memory also showed no errors and the system is reporting the 32Gb of RAM correctly.

Suspecting an other underlying issue (bad driver) I did a full reinstall of Win 11 and wipe of the drives. Online however I found that "By default Windows will allocate virtual memory (pagefile) the same size as your RAM". After the reinstall I therefore rechecked my virtual memory and it only auto allocates 5000Mb for all stations on a system with 32Gb. Is this an indication that something memory related is still not working properly on the system?

Games in question that regularly gave crashes: Diablo 4 and Helldivers 2.

Thanks in advance for any advice.
 

Ralston18

Titan
Moderator
There should be no need for end user configuration of virtual memory. Just let Windows manage virtual memory.

Where is virtual memory being hosted?

Disk drive(s): make, model, capacity, how full?

Look in Reliability Histoyr/Monitor and Event Viewer.

Either one or both tools may be capturing some error codes, warnings, or even informational events just before or at the time of the crashes.

Source for Diablo 4 and Helldivers 2?
 
After the reinstall I therefore rechecked my virtual memory and it only auto allocates 5000Mb for all stations on a system with 32Gb. Is this an indication that something memory related is still not working properly on the system?
With enough physical memory - virtual memory gets used minimally.
It just needs to be available (you can't disable it or will get memory subsystem errors).
Set it to 5000MB minimum, 16000MB max.
 

Mas3nk0

Distinguished
Jul 31, 2013
56
1
18,635
There should be no need for end user configuration of virtual memory. Just let Windows manage virtual memory.

Where is virtual memory being hosted?

Disk drive(s): make, model, capacity, how full?

Look in Reliability Histoyr/Monitor and Event Viewer.

Either one or both tools may be capturing some error codes, warnings, or even informational events just before or at the time of the crashes.

Source for Diablo 4 and Helldivers 2?
I have two SSD drives (C: and D:). The first hosts Windows 11 and is 1Tb while the other hosts all applications and is 2Tb. At the time of the crashes the D: drive still had 800Gb free space so should be enough to increase virtual memory at will unless there is a strange memory leak running away with it all. Both crashing games are on the large SSD.

I have no clue why virtual memory would make a difference on crashes. Also the fact it only allocates 5000Mb on automatic while it should normally allocate the same size as the physical memory by default puzzles me.
 

Mas3nk0

Distinguished
Jul 31, 2013
56
1
18,635
It should not "allocate the same size as the physical memory".
I have no idea, where you got that.
https://answers.microsoft.com/en-us...y-is-low/464fd6a7-a897-4ecf-b321-7a7b783239fc

I got that from a google search, but now that I read the full thread another user is already debunking this statement as well.

Have now done a full reset of the computer (wipe of storage and reinstall of win 11) and no crashes so far. Will post a screenshot of the event viewer in case it crashes again or otherwise will close the thread (meaning that the virtual memory was most likely a side effect/placebo for another underlying issue).
 
  • Like
Reactions: 35below0
Jun 5, 2024
3
1
15
It sounds like you've already done quite a bit of troubleshooting, but let's see if we can delve deeper into the issue.

Firstly, let's address the virtual memory settings. Windows typically manages virtual memory automatically, but sometimes it might not allocate enough space, especially if it's set to a fixed size. Your decision to manually set the virtual memory to 1.5x to 3x your RAM is generally a good practice, especially with 32GB of physical memory. This ensures that there's enough virtual memory available for your system and applications.

However, the fact that Windows is only allocating 5000MB of virtual memory for a system with 32GB of RAM does seem unusual. It could be a symptom of an underlying issue with the system's configuration.

Here are a few steps you can take to further diagnose the issue:

1. **Check System Health**: Run system diagnostic tools like Windows Memory Diagnostic or third-party software to ensure there are no underlying hardware issues.

2. **Update Drivers**: Make sure all your device drivers, especially those related to your motherboard, GPU, and storage devices, are up to date. Outdated or faulty drivers can often cause crashes and instability.

3. **Monitor System Resource Usage**: Keep an eye on your system's resource usage, particularly memory usage, while running games or other intensive applications. This can help identify any abnormal spikes or patterns that could indicate a problem.

4. **Event Viewer**: Check the Windows Event Viewer for any error messages or warnings that might provide clues about what's causing the crashes. Look for patterns or commonalities between the crashes in different games.

5. **Temperature Monitoring**: Overheating can also cause crashes and instability, especially during gaming sessions. Use software tools to monitor your CPU and GPU temperatures to ensure they're within safe limits.

6. **BIOS Update**: If your motherboard has a BIOS update available, consider updating it. Sometimes, BIOS updates include fixes for memory management issues and other system stability issues.

7. **Check for Malware**: Although less common, malware can sometimes interfere with system processes and cause crashes. Run a thorough malware scan to rule out this possibility.
 
  • Like
Reactions: Mas3nk0

instawookie

Reputable
Jun 13, 2021
133
25
4,610
Following, had the same issues a few months ago trying to play RDR2, but that appeared to be a common issue amongst that game and that game only. My only solution was to manually do allocation of virtual memory as the fix.
 
The oft-cited "Microsoft recommends setting the page file to at least 1.5x physical RAM" is as old as "delete system32" memes and I don't even know if I can find the origin of that recommendation in the amount of time I'm willing to spend. But it made sense back then when RAM wasn't exactly plentiful (systems as late as 2005 were shipping with 128MB of RAM). But RAM is now more or less plentiful. It doesn't make sense to me that for a system with 32GB of physical RAM that the minimum page file size needs to be 48GB, especially when on average, I rarely hit my physical RAM capacity in commit charge.

But also related to OP's plight, I spent a better part of a summer a couple of years ago playing RDR2 and I never had to touch my page file size settings. And the only time you would ever need to increase the page file is if the total commit size is approaching physical RAM capacity + page file size constantly. And even then when commit size hits that value, applications should just start throwing "out of memory" errors.
 
Last edited: