How Much Memory Does My Hyper-V Host Require?

If you are trying to figure out how much RAM you have left for virtual machines then this is the post for you.

When Microsoft launched Dynamic Memory with W2008 R2 SP1, we were introduced to the concept of a host reserve (nothing to do with the SCVMM concept); the hypervisor would keep so much memory for the Management OS, and everything else was fair game for the VMs. The host reserve back then was a configurable entry in the registry (MemoryReserve [DWORD] in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization). Things changed with WS2012 when we were told that Hyper-V would look after the reserve and we should stay away from it. That means we don’t know how much memory is left for VMs. I could guess it roughly but I had no hard facts.

And then I saw a KB article from about a month ago that deals with a scenario where it appears that a host has free memory but VMs still cannot start.

There’s two interesting piece of information in that post. The first is how to check how much RAM is actually available for VMs. Do not use Task Manager or other similar metrics. Instead, use PerfMon and check Hyper-V Dynamic Memory Balancer\Available Memory (instance: System Balancer). This metric shows how much memory is available for starting virtual machines.

The second fact is is the size of the host reserve, which is based on the amount of physical RAM in the host. The following table is an approximation of results of the algorithm:

image

Microsoft goes on to give an example. You have a host with 16 GB RAM:

  • The Mangement OS uses 2 GB.
  • The host reserve is up to 2.5 GB.
  • That leaves you with 11.5 GB RAM for VMs.

So think about it:

  1. You log into the host with 16 GB RAM, and fire up Task Manger.
  2. There you see maybe 13.5 GB RAM free.
  3. You create a VM with 13 GB RAM, but it won’t start because the Management OS uses 2 GB and the host reserve is between 2-2.5 GB, leaving you with 11.5-12GB RAM for VMs.

13 thoughts on “How Much Memory Does My Hyper-V Host Require?”

  1. As it was explained to me, once a Windows server has the Hyper-V role installed, taskmanager.exe is not helpful for so many things. For that matter, if you’re going to fire up Perfmon, I’m a big fan of the PAL tool from Clint Huffman (https://pal.codeplex.com/) – dormant for some time, it was updated with Hyper-V and Windows Server 2012 templates – it makes data collection easy, and the reports (including thresholds, etc.) are sometimes very helpful in troubleshooting. But I also think it’s great to use at the beginning of a Hyper-V deployment to baseline host performance.

  2. When is it best to use static vs. dynamic? I only use static, because I know precisely where I am, what my limits are etc., for cluster usage at least.

  3. If I have a Hyper V 2012 R2 Core server and I have 32GB of RAM then how much of the memory can I use for VMs?

    Keep in mind I am asking about the Core (non-GUI) version. Thanks!

  4. We have a Windows 2012 R2 hyper-V host. On that Hyper-V host we have our Windows 2012 R2 RDS server running. The hardware IBM X3650 M5 – Dual Xeon CPU – RAM 48 GB – with 10K SAS disks.
    It should have sufficient memory.
    It has been running from November 2014. But we have serious performance issue. The server works perfectly, but within a week it slows incredible down. We are only 7 users. We have a lot of Outlook activity and share our mailbox across all coworkers, so the OST files are big – 430 GB for 10 mailboxes.
    The Windows Search Index grows to 4 GB in 3-4 days, and that is slowing server down. If I rebuild the index everything works fine for the week or so.
    There is a lot of disk activity on the searchindexer.exe and, on the *.ost files and C:\ProgramData\Microsoft\Search\Data\Applications\Windows\windows.edb
    That is the default location. Seems I need to move the Windows.edb to a different disksytem to keep the Windows Search Service from slowing the system down.
    Is this a common scenario?

    1. No it’s not. You say “on the host” – I hope you mean as a VM. What type of disks (speed) did you use? What type of RAID?

  5. When I did my research, I discovered that Hyper-V Server allocates RAM to the Nonpaged pool based on the amount of RAM available to the Host ( http://eyeglazer.blogspot.com/2014/02/hyper-v-and-reserving-ram-for.html ).

    The amount it reserves is ~0.0425 times the amount of RAM (what Windows reports as GB). So an 8GB host will lose 0.34GB, a 24GB host loses 1.02GB, and a 96GB host loses 4.08GB. I used a tool called RAMMap to figure this out on a few different machines (16GB, 24GB, 64GB, & 96GB, IIRC). The RAM you lose grows linearly from what I saw, and the “0.0425” number is not exact, but a very, very close estimate.

  6. Can I have Source from ? because i have hyperv at 88 % (used 338 and total 384) and it’s not running smooth as i think, sometimes it just turned off not gracefully… and my hyperv is just hyperv. nothing more.

Leave a Reply to Mark Taylor Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.