Link to home
Start Free TrialLog in
Avatar of Jay Schwegler
Jay SchweglerFlag for United States of America

asked on

vCPU to Physical CPU Ratios

I have a general question about CPU scheduling that I don't completley understand, using Hyper-V as an example.

The general consensus is that you should assign only the amount of vCPUs to a VM to satisfy the workload. It would not be recommended, for example, to assign 4 vCPUs to a VM that only ever needs 2 to run all it's threads and be happy.

I get that, but why does it really matter? A 4vCPU VM can simultaneously request 4 threads from the hyperadvisor, which it will distribute across the physical cores. If that same 4vCPU VM only ever requests 2 threads, the hyperadvisor will just deal with those 2 threads. What does it matter if that VM is a little over allocated?

I'm just trying to understand why it's "bad" or a waste of resources if the hyperadvisor is only going to process the actual CPU work that needs to be done.
SOLUTION
Avatar of RAFA
RAFA
Flag of Venezuela, Bolivarian Republic of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jay Schwegler

ASKER

But isn't the work being given to the hyperadvisor based on the threads being computed? if the VM needs 2 threads processed, isn't that what is being scheduled? What difference does the other two idle cores make in that situation?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial