Q
Get started Bring yourself up to speed with our introductory content.

How can I tell if a virtual CPU is to blame for poor performance?

How can I tell if the allocation of multiple virtual CPUs is causing a performance problem on a virtual machine?

When multiple virtual CPUs are allocated to the same VM, the hypervisor must wait for available processor cycles...

across multiple physical CPUs. If the workload is not designed for symmetric multi-processing (SMP), this behavior can actually reduce the workload’s apparent performance. The challenge here is not processor cycles -- there are probably plenty of processor cycles available across multiple CPUs. The challenge is scheduling (waiting for) time on multiple CPUs.

Monitoring can help administrators identify vCPU performance problems. For example, VMware vSphere’s CPU ready statistic (cpu.ready.summation) reports the time (milliseconds) that a VM was trying to execute without an available physical CPU. This value should ideally be small; as it grows, the VM is waiting longer for an available processor. By comparison, vSphere’s CPU usage statistic (cpu.usage.average) reports the percentage of time the CPU is used per host, per VM or per pool. A larger number indicates that the available processing resources are being more heavily utilized.

So if the CPU usage is fairly light, but the CPU ready (more accurately termed "wait") is unusually heavy, this may be a good indicator of multiple vCPU contention.

CPU limits and reservations are often not appropriate solutions to multiple vCPU provisioning problems. Limits put a cap on the maximum processing capacity of the CPU. Without limits, a VM can use 100% of the processor’s clock cycles, though CPUs are still shared between multiple VMs. Limits often cause unexpected (and unnecessary) VM performance problems for VMs that otherwise have proper vCPU provisioning. Reservations set a minimum amount of CPU processing capacity allocated to a VM -- even if the VM is not currently using that CPU capacity -- and can make that reserved capacity unavailable to other VMs which also results in potential resource shortages or performance issues.

For most VMs, allocating a single vCPU will provide the VM with access to a shared CPU core, and this usually provides enough processing capability to handle the VM’s needs. Although administrators can certainly allocate multiple virtual CPUs to the same VM, only VMs designed for SMP will really benefit, and other single-threaded workloads will often see a performance penalty.

Next Steps

Four mistakes that can hurt VM performance

Eliminate IO bottlenecks to improve virtual machine performance

Does adding more virtual CPUs lead to better performance?

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 prevent performance problems linked to virtual processor allocation?
Cancel

-ADS BY GOOGLE

SearchVMware

SearchWindowsServer

SearchCloudComputing

SearchVirtualDesktop

SearchDataCenter

Close