I apologize in advance if this is not clear enough to understand my problem, it's a bit long but I've done my best to make it understandable.
I'm running an Exchange 2016 CU6 on a Windows server 2016 VM and I am frequently getting warning in the application log saying that I am out of virtual memory (pagefile).
My monitoring shows that the pagefile has been at 4GB since the VM was created in April, it has never increased beyond 4GB nor has it decreased.
To troubleshoot this issue and understand what the problem is, I have created two test VMs with a vanilla installation of Windows Server 2016 Standard and Windows Server 2008 R2 Enterprise, both with the same physical and virtual memory configuration:
Test VM Configuration
RAM: 4GB
Disk C (dedicated to system): 32GB
Disk G (dedicated to pagefile): 8GB
Pagefile for drive C: 512 - 1024 MB
Pagefile for drive G: System managed size
My test VM 2016 is currently using 512MB on the C: drive and 1GB on the G: drive, totalling 5.5 of committed memory
The test VM 2008 is currently using 512MB on the C: drive and 4GB on the G: drive, totalling 12.5GB of committed memory
After researching a lot about committed memory, I have found this article from Mark Russinovitch: https://blogs.technet.microsoft.com/markrussinovich/2008/11/17/pushing-the-limits-of-windows-virtual-memory/
I've decided to use the tool testlimit64.exe with the -m switch to see if the pagefile would increase on the test VM 2016 and test VM 2008.
The result reflects the problem explained initially where the pagefile on the test VM 2016 does not increase on the G: drive, but it does on the test VM 2008:
According to this Microsoft KB: https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/automatic-memory-dump, using the Automatic Memory Dump setting under Control Panel->System->Advanced System Settings->Startup and Recovery->Write debugging information with the pagefile configured as system managed, it can set the pagefile to a size that is less than the amount or physical memory.
The tests I have performed did not use this setting, both test VM 2008 and test VM 2016 were configured with Kernel memory dump.
So if I set the pagefile on the G: drive to System managed on test VM 2016, its size will be automatically set by Windows and will not increase when under load. This is the core of the issue as it is a behavior change with Windows Server 2008.
My last test was to configure the pagefile on the G: drive manually to 4096 - 8100 MB and run the tool testlimit64.exe with the -m switch again, and as you can see the pagefile does increase from 4GB to ~8GB
So here is my question: why is Windows Server 2016 not increasing the size of the pagefile when set to system managed? What has changed between Windows Server 2008 and 2016 about this?
Thanks a lot for reading all the way and for your responses.