I have a situation where a Hyper-V 2012 cluster node cannot support 2 VMs when I think it should. Presently, I'm playing around with 96GB RAM, and I want to have 2 47GB VMs running (static RAM). That leaves 2GB for the host, which is supposed to be plenty. However, I can't run the second VM because the software complains there's not enough memory for it.
Next, I decreased each VM to 46GB, but it still won't support the 2 VMs. Running "taskmgr" from the node, it reports 51GB "in use" with "44.9GB" available. I don't understand why a 46GB VM would incur a 5GB overhead in the host partition. Looking at the running processes, the listed RAM adds up to under 500MB.
I would like to tell Hyper-V to reserve all but 2GB explicitly for VM usage only.
Additionally, it would be even better to know why the hypervisor "needs" 5GB. Is there a way to tell what Hyper-V is doing internally with the RAM? Or is there a new calculation for Hyper-V 2012 as to how much RAM the host actually needs (since 2GB isn't cutting it)?
Edit - 2014-02-14
After a review of 4 different Hyper-V Server 2012r2 hosts, and a 2008r2, the Nonpaged pool linearly grows with the physically installed RAM. It doesn't matter if the CPU is AMD or Intel. It doesn't matter if the host is part of a Windows cluster or not. It doesn't matter if the host is joined to a domain or not. And it doesn't matter how many VMs are running on the host (or how much RAM those VMs are consuming). Finally, I consider this to be the behavior for 2012r1 also, because I had these symptoms back when the 2012r2 hosts were all 2012r1.
In all cases, I have found that multiplying the amount of installed RAM (in GB) by 0.0425 will tell you how much RAM (in GB) is lost to the Nonpaged Pool. (It a very close estimate.)
So until Microsoft fixes their software, or officially admits that this behavior is by-design, the answer is to use the calculation that everyone commonly uses (as presented in the answer below), then add on the result of the above calculation to account for RAM you'll lose to the Nonpaged Pool. (Or, if you like, I have a summary with examples here.)
PS: I feel it important to note that I've been writing "GB", but I'm just using what Windows reports. The numbers reported by Windows and RAMMap are not GB/KB, but actually GiB/KiB, so multiply the result of the Nonpaged Pool calculation by 1024 to compare it to the "K" number reported by RAMMap.