Freigeben über


Hyper-V CPU Scheduling–Part 4

Now that I have discussed the various CPU resource controls that are available for Hyper-V virtual machines – I thought I would take a moment to answer a couple of the common questions I have heard about CPU resource control:

Can you use the virtual machine limit, reserve and relative weight all at the same time? And what actually happens?

Yes, you can.  By default all of these controls are effectively disabled – but you can configure all of them at the same time.  The way they interact is that the reserve defines the lower bound of CPU resource, the limit defines the upper bound, and the relative weight affects how CPU is handled between these two bounds.

That said – I do not know of anyone who actually uses all three on a regular basis.  Most people use one or maybe two of the controls.

Why do you use percentage for the limit and reserve – and not MHz / GHz?

Many people find it easier to think in MHz / GHz rather than percentage of a physical computer.  They also argue that using a percentage means that as you move a virtual machine from computer to computer you may get different amounts of resource depending on the underlying capability.

This is something that has been discussed extensively on the Hyper-V team, and while I do believe there is some merit in this approach, there are a number of reasons why we chose to use a percentage instead.  Two key ones are:

 

  1. Predictable mobility

    If all your virtual machines have a reserve of 10% – you know that you can run 10 of them on any of your servers.  The same would not be true if they all had a reserve of 250Mhz.  Given how important virtual machine mobility is to our users – we believe that this is something that needs to be easy to manage.

  2. Not all MHz are the same

    1GHz on a Pentium IV is much slower than 1GHz on a Core i7.  Furthermore – newer processors tend to be more efficient at virtualization than older processors, so the difference between the “bang for buck” that you get out of each MHz varies greatly between processor types.  This means that in reality – defining a reserve or limit in MHz / GHz does not really give you a great performance guarantee anyway.

Okay, there is more that I could say here – but I will leave that for another day.

Cheers,
Ben

Comments

  • Anonymous
    March 14, 2011
    Hello i try out a simple test I have a IBM X3650 with 24 cores (12 cores + HT) + 32GB Ram DDR3 to the host OS were Hyper-V role is installed Created a VM with windows server 2008 with 4Vcores and Virtual machine reserve to 80% I did a simple test that loaded an application that eats all cpu (HyperPi) it simply overloads the cups to 100% on the Host Hyper-v I should see the Physical CPUs eating up resources like i see on the VM but no its always at 2%-3% and i only see 1-2 cores with same workload wen the VM is at 100% If i create a VM in a good server i want that VM to be able to take advantage of the full power of my hardware but i don’t seem to be able:? The question is how do i make available to a specific VM the full Power of the machine he is running on ???

  • Anonymous
    March 14, 2011
    The comment has been removed