Q
Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

If one vCPU is good, why wouldn't more be better?

Is it bad to assign more virtual CPUs to a VM than absolutely needed? Shouldn't another vCPU lead to better performance?

Virtual machine performance depends on proper provisioning – ensuring that the VM receives an adequate amount of...

clock cycles, memory space and I/O bandwidth. When a VM encounters resource shortages due to provisioning errors or increased computing demands, VM performance may suffer and its stability may be compromised. Many IT administrators overprovision computing resources to ensure that VMs are not starved for resources during times of peak activity. Although overprovisioning usually isn’t harmful, it is wasteful. However, there are circumstances in which overprovisioning virtual CPUs (vCPUs) can adversely impact a VM’s performance.

The goal with all resource provisioning is to allocate enough computing resources to operate the VM workload properly, but not overprovision those resources. Overprovisioned resources are wasted. And in the case of processors, overprovisioning can actually impair the VM’s performance.

The problem is in scheduling. A hypervisor must schedule time on a vCPU for the VM. As long as all of the VM’s time is slated for the same vCPU, there is no real conflict. But when a VM uses multiple vCPUs that cross two or more cores, the hypervisor must now schedule time on two or more physical processors. This means the hypervisor (and the VM it’s scheduling) must wait for time on different physical processor cores.

Now, this is just fine if the VM is designed for symmetric multi-processing (SMP), and hypervisor vendors like VMware provide an SMP add-on that allow SMP workloads to schedule and use multiple vCPUs (multiple cores) successfully and efficiently.

But for common single-threaded workloads that are not explicitly designed for SMP behavior, the hypervisor can wind up wasting time holding up VM execution waiting for time on multiple vCPUs. This will actually slow down the VM’s performance. In these situations, reducing the processing to just one vCPU can actually improve the workload’s performance. Administrators must be adept at allocating vCPUs to workloads and identifying improperly-allocated vCPU resources.

Next Steps

How to find the best VM to processor core ratio

Reduce CPU ready time to improve performance

Is vSphere Fault Tolerance for multiple CPUs worth the wait?

This was last published in April 2015

Dig Deeper on Server hardware and virtualization

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Join the conversation

1 comment

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

How do you decide how many vCPUs to allocate to a virtual machine?
Cancel

-ADS BY GOOGLE

SearchVMware

SearchWindowsServer

SearchCloudComputing

SearchVirtualDesktop

SearchDataCenter

Close