Question

  Asked: May 31 2008   6:43 AM GMT
  Asked by: Vmconfig


VM configuration - Why does increasing the number of VCPUs beyond those of phyical CPUs lead to poor performance?


Virtual Machines, vCPU

Why does increasing the number of VCPUs beyond those of phyical CPUs lead to poor performance?

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
-2
Click to Vote:
  •   0
  •  -2



If you are configuring more vCPUs than physical CPUs exist then some of the physical CPUs will be assigned to the VM more than once. As far as the virtual machine knows each vCPU is a different physical CPU so it will send load to them thinking that. However is the physical world you know how one CPU getting 200% of it's possible workload.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on Virtualization.

Looking for relevant Virtualization Whitepapers? Visit the SearchServerVirtualization.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

Vmconfig  |   May 31 2008  6:20PM GMT

But this happens even in the case of 1 virtual machine (i.e 1 VM 4 VCPUs and only 2 physical CPUs).

 

Vmconfig  |   Jun 1 2008  12:10AM GMT

Suppose there are 2 physical CPUs. Comparing 4 VCPUs and 2 VCPUs with 4 workloads. Theoretically, both should have the same performance. But this is not the case. I was actually referring to this case. I think both the cases each physical CPU gets same workload. Can you say Why??

 

Esiebert7625  |   Jun 9 2008  4:55PM GMT

You can never assign a VM more vCPU’s then physical cpu cores that the host server has. You should also never assign a VM the same number of vCPU’s that the host server has cpu cores. For example, don’t create a 4 vCPU VM on a host that has 2 dual core cpu’s. The reason for this is that when you have multi-cpu VM’s the hypervisor’s cpu scheduler must find simultaneous cpu’s/core’s available equal to the number assigned to the VM. So a 4 vCPU VM will need to have 4 free cpu’s/core’s available on the host for every cpu request which is no easy task on a host that only has 4 cpu’s/core’s. Most VM’s run well with only a single vCPU and can actually run slower with multiple vCPU’s. If you do need to create multiple cpu VM’s then make sure you have plenty of cores available. If you need to create a 4 vCPU VM it is best to have at least 8 core’s available on the host server. The VM will never be aware of which cpu/core it is running on since this is handled transparently by the scheduler. If you do want to dedicate a physical cpu/core to a VM then you can use affinity but this is not recommended because it can prevent from advanced features from working. The cpu scheduler of the hypervisor does a very good job of handling requests and it is best to leave it to schedule resources and not use affinity.