1

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.

3
  • I cannot answer your question directly, but having been an admin of HyperV hosts (HyperV Server and Windows Server) since 2008, in practice 2GB isn't enough. (Even for HyperV Server). I dedicate 4GB on each of my hosts to the Host OS. I leave 10% free in case I need to make adjustments later. Have you tried the Dynamic memory settings for the VMs? They can work in a variety of situations, but I am unsure what you situation is. I know also there is a tendency to forget drivers the host is running need resources as well. Just food for thought.
    – MikeAWood
    Dec 19, 2013 at 8:33
  • I won't do dynamic memory because I've heard of performance issues that stem from it. As it stands, I have found that 2 44GB VMs can coexist on the same cluster node. The actual amount of ram the host partition needs in my situation lies between 6GB and 8GB (since 6GB isn't enough, but 8GB is). I think someone needs to publish a better RAM calculator for Hyper-V 2012; maybe clustering has different requirements?
    – Granger
    Dec 19, 2013 at 22:32
  • I can't really comment about there being performance issues as they would be dependent on the work load. Certainly something you can bench test and the setting is easy enough to change. I use it with my SQL2012 and Exch2010 VMs, though in truth it isn't designed for those workloads as then tend to consume, but not release RAM. I would agree that 6-8GB for the host seems about right. 8GB seems to be better on servers with RAID controllers that have larger drivers with management consoles (Adaptec).
    – MikeAWood
    Dec 20, 2013 at 22:49

1 Answer 1

1

Source

300 MB for the Hypervisor plus 32 MB for the first GB of RAM allocated to each virtual machine plus another 8 MB for every additional GB of RAM allocated to each virtual machine plus 512 MB for the host operating system running on the root partition

As a general rule of thumb, plan to allocate at least 512 MB memory for the root partition to provide services such as I/O virtualization, snapshot files support, and child partition management.

300+32+(45*8)=692MB For the first VM

692+32+(45*8)=1084 for both VMs

1084+512=1596MB total accounting the rule of thumb

So this would be just the hypervisor consumption. Now considering that you have more than 5 GB used even when the first VM is provisioned. I would suggest to look at the output of tasklist in command prompt and look for server processes consuming RAM

5
  • Unfortunately, your source is about 6 years out of date. According to those calculations, 2GB should be plenty for what I'm doing. And taskmgr considers all of that RAM used by Hyper-V (hypervisor + VMs) to be in use by the OS itself, so there's no insight there.
    – Granger
    Feb 3, 2014 at 22:37
  • Sorry didn't check that it was 6 years old article. I tried to look up more and found another article dated 2012, that too have the same information almost: technet
    – balwa
    Feb 3, 2014 at 23:18
  • RAMmap shows interesting memory usage. Without any VMs running, the usage is about 5.6 GB in my case where 4 GB is Nonpaged pool.. This link isn't the solution but explains troubleshooting nonpaged pool well
    – balwa
    Feb 4, 2014 at 0:12
  • I have the same issue on my servers. RAMMap shows about 4GB as Active in the Nonpaged pool for each server/node in the cluster. In my case, I've since installed Hyper-V 2012 r2 (from scratch) on these machines, and the symptom remains. I reviewed this video to try and understand RAMMap: channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-6-RAMMap One thing I find interesting is that almost all of the RAM in my Nonpaged pool has no tag! Anyhow, at this point, I think your answer is valid, but that we're looking at a Microsoft bug/memory-leak.
    – Granger
    Feb 10, 2014 at 19:26
  • Oh, and PS, while researching the RAM with RAMMap, I was able to confirm that those Hyper-V calculations that everyone's been using for the last 6 years is still a good metric. And I also see why most people just blindly throw out "2GB"; it's rare to find a situation where that wouldn't be sufficient.
    – Granger
    Feb 11, 2014 at 18:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .