Memory combining in Windows 8 and Windows Server 2012
I’ve spent that last few weeks studying the memory architecture of Windows 8 and Windows Server 2012.
Windows and Windows Server has always had sharable memory where portions of DLLs and EXEs will have a single copy in physical memory (synonymous with RAM) and all of the applications that need them will simply reference the page already in physical memory. This is still counted in their working sets, but overall the operating system saves on physical memory usage.
One of the interesting features of Windows 8 and Windows Server 2012 is how process private page-able memory is periodically combined further saving on physical memory usage. This was mentioned in Bill Karagounis’s blog, Reducing runtime memory in Windows 8. The savings on physical memory usage could be dramatic, but possibly have some overhead from the system needing to search for duplicate pages of memory. I can only speculate at best right now.
An important distinction is that Windows 8 has memory [page] combining enabled by default, but Windows Server 2012 does not.
To check if your computer has page combining enabled or not, open an elevated Powershell session and type the following command:
Get-MMAgent
You should see output similar to this:
To enable page combining on Windows Server 2012, run the following command:
Enable-MMAgent –PageCombining
Get-MMAgent
You should see output similar to this:
I did not get a prompt to reboot, so I assume this is working now.
If you enable this feature, then please let me know what kind of impact it has on your solution. I am particularly interested in the value of the counter \Memory\Available MBytes before and after testing or real world load. Keep in mind that I suspect that the \Process(*)\Working Set sizes will remain the same simply because the physical page in RAM will be counted in the working sets normally, but physically have only one real page in RAM.
Comments
Anonymous
January 01, 2003
The comment has been removedAnonymous
February 08, 2013
Hi Peter, yes this feature is enabled by default in Windows 8, but not in Windows Server 2012. I go through the steps to enable it on Windows Server 2012 in this article.Anonymous
January 27, 2015
I am running Windows 8.1 x64 here (latest updates) with the Hyper-V Role installed and these are the results:
PS C:WINDOWSsystem32> Get-MMAgent
ApplicationLaunchPrefetching : True
ApplicationPreLaunch : True
MaxOperationAPIFiles : 256
OperationAPI : True
PageCombining : False
PSComputerName :
So it looks like in Windows 8.1, this feature is now disabled by default.