Hyper-V Thread Priorities host and guest – how do they correspond

hyper-vhyper-v-server-2012windows-server-2012

Yes, funny question.

Given: A host for Hyper-V virtual machines. A HPC type Cluster.

THere are a number of virtual machines on it. They do not use up the CPU most of the time. We also run a HPC style Cluster in house – agents pull Jobs and process them.

There is a talk to install the Agent on our Hyper-V machines. AT the Moment that would give us a significant Performance boost – it will take summer until we really ramp up the Hardware for the calculation Cluster.

The Agents are running all calcualtions in low priority threads. For normal Computers that means that the Agent basically maxes up the CPU usage but does not really interfere with the Computer Operation per se – I even can watch a DVD while the Agent is running.

Now, how is that with Hyper-V? What "thred priority" does the Hyper-V core give the virtual CPU's? Does the root Partition have a higher priorities than the virtual machines? I do not want the agents to interfere with the running virtual machines.

Best Answer

The Hyper-V Parent Partition, or Management OS, is special within the hypervisor. If its virtual processors are runnable, they get a large boost in priority over guest VMs. This is because, in a supported Hyper-V configuration, the only thing the management OS does (statistically speaking) is I/O on behalf of guest VMs. If you install anything else in the management OS, then you're going to preempt work on behalf of guest VMs.

I assume that this has already occurred to you, but you could do this the supported way. Create a VM that is essentially the same size as the physical machine. Give it very low CPU and memory weights and turn on Dynamic Memory so that, when idle, it doesn't use much memory. Run your compute task in that VM. Hyper-V will then prefer doing work for any other guest than that one, but use idle cycles on behalf of your computational task.