After running a few VMs on my Windows 10 computer that totals to around 24GB out of the 32GB that's installed, I have had Windows begin running out of memory. Symptoms include the screens going blank temporarily and programs hanging and possibly stopping. Task manager shows the usage no where close to being full.
The event viewer does report system warnings similar to:
Windows successfully diagnosed a low virtual memory condition. The following programs consumed the most virtual memory: mksSandbox.exe (10812) consumed 1422979072 bytes, msedge.exe (11464) consumed 757063680 bytes, and mksSandbox.exe (2336) consumed 692133888 bytes.
There are some solutions which I've found to help:
- The system's page file isn't large enough. I'm not sure why Windows insists on paging data out even when there's plenty of 'free' memory. But a larger page file seems to prevent or at least mitigate this issue. This issue seems to have gone away after increasing the page file from 5GB to 20GB.
- A big chunk of the memory is stuck in standby lists. This can only be cleared using the RamMap (a Sysinternals, now Microsoft-owned) tool. Clearing the standby lists makes a bunch of memory 'free' again. Why doesn't the system automatically clear these standby lists when memory is running low? Shouldn't a low virtual memory condition be a good time to clear these standby lists? What is Windows doing?