Hyper-V Program Manager
Having talked about the virtual machine reserve and the virtual machine limit – the next logical stop in the discussion of how Hyper-V schedules virtual machine CPU time is relative weight.
“Relative weight” is the third processor resource control setting that you can configure. Unlike the virtual machine reserve and limit there is no unit for the relative weight. It is just a number between 1 and 10,000 – which is set to 100 by default.
The CPU relative weight does not come into effect until there is contention for CPU resource on the physical computer. This means that if you have one virtual machine with a relative weight of 100 and a second virtual machine with a relative weight of 200 – both will get all the CPU time they need if it is available. Where relative weight comes into play is if virtual machines are asking for more CPU time than is physically available.
With all virtual machines set to a relative weight of 100 (the default for Hyper-V) when there is contention for CPU resource – it will be shared evenly among the virtual machines. But if one virtual machine had a higher relative weight (e.g. 200) it would receive a higher share of the system resource.
Relative weight works well for people who want to categorize virtual machines as “important” and “not important”. The best thing about relative weight is its flexibility. If you create a new virtual machine you do not need to adjust the weighting on all of the existing virtual machines.
How do people use the CPU relative weight?
The most common reason I hear for using relative weight is when people are mixing production and development or staging environments on the same physical computer. They use relative weight to mark the production virtual machines as important – and thus ensure that as development virtual machines come and go, they do not interfere with the production systems.
What are the common problems involved in using CPU relative weight?
The common issues that I hear about with CPU relative weight are:
That is all I have to say for today – stay tuned for further discussion of Hyper-V CPU scheduling.