CPU’s on Hyper-V host system is just idling, even though VM’s are at full throttle

cpu-usagehyper-voptimizationvirtualizationwindows-server-2008

I have a server that is running Windows 2008 64 bit Hyper-V, with 8 gigs of RAM and Intel Xeon X3440 @ 2.53 Ghz, which gives me 8 logical cores in the performance monitor on the host system.

I have set up three Virtual Machines, all running Windows 2008 32 bit.

  1. Build server, running Team City
  2. Staging server
  3. SQL Server, running SQL Server 2005

These three machines are running very sluggishly, they are at 100% cpu even though the host system is barely using any cpu at all, typically below 10% total.

Could anyone please give some tips as to the best setup for CPU allocating? Should I have set each server to have two cores, or should I increase this number above the total number of cores on the host?

What is a good number to set on the Virtual Machine Reserve and Virtual Machine Limit?

Is 8 gigs of physical RAM insufficient for 3 VM's?

Thanks for reading. 🙂

Best Answer

Bjørn, you're worried about something that isn't an issue. In your case, you have a hypervisor and four virtual machines. One of those virtual machines (the management OS) came with the hypervisor. You then installed three virtual machines.

Ask yourself whether you'd like to see the management OS using CPU time. Ideally, you want it to leave as much CPU time as it possibly can to the three VMs that you set up.

This is exactly what Hyper-V does, assuming that you have installed the "VM Integration Components" in all your VMs. These components make I/O much more efficient by installing drivers that are meant for VMs. Then, unless your VMs are particularly I/O-heavy, your management OS will just sit there waiting for you to interact with it, attempting to use as few resources as possible. This is a good thing.

If you want to see the actual CPU metrics from the hypervisor, not the management OS, use Performance Monitor in the management OS and look for the Hyper-V counters. These will tell you about physical CPU usage.

Doug Luxem (who seems to know a lot about this) answered this well on another thread today. So I'll just steal his text:

First, you have to remember that in Hyper-V that the "host" is called a parent partition and it really just like a virtualized guest with special permissions and roles. Just like any other child/guest, when you open up Task Manager, you can not see the CPU usage of the other children on the server.

Ben Armstrong has a good explanation of this here: http://blogs.msdn.com/virtual_pc_guy/archive/2008/02/28/hyper-v-virtual-machine-cpu-usage-and-task-manager.aspx

Lastly, look at RAM usage in your VMs. Look at disk queue length. These will tell you if you need more RAM. It sounds, though, like your VMs just need more total CPU than the host has to give.