VMware Cloud Community
R2B
Contributor
Contributor

CPU Contention Basics

I have been called in to address performance issues in a vSphere 4.1 environment.  Most of the VMs are set with 4 vCPUs for no specific reason.  It seems to have been set at 4 vCPUs thinking more CPUs is better.

I am not 100% understanding the CPU contention issue other than it seems like if too many vCPUs are assigned, the host may be affected when trying to schedule the CPU cycles for all the VMs so more CPUs means more scheduling and potentially causing slower performance.  Is that basic understanding correct?

So my question is - I have read that using ESXTOP and checking the %Ready metric will tell me if CPU contention is happening on the host.  Assuming that is the case, woud you recommend reducing the amount of CPUs per VM?  Is this a valid troubleshooting step.  I can already hear the client saying "you are going to reduce the CPUs on a server that already seems to be working slowly".  But if my understanding above is correct, then I think that is a valid explanation.

Also, I see that in the vCenter client, under the performance tab for a VM, there is also a CPU ready metric.  Is this a valid reference to use to see if CPU contention is taking place?  Some of the VMs to show this value to be over 10% but does that necessarily mean the host is having contention?

Any clarification and recommendations would be appreciated,

Thank you.

0 Kudos
1 Reply
weinstein5
Immortal
Immortal

Yes your understanding is roughly correct and yes from what you describe reducing the number of vCPUs will improve performance - this is why best practice is always to start with a single vcpu and add more -

Yes the metrics in vCenter are also useful in diagnosing contention issues -

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
0 Kudos