Physical CPU (pCPU) and Virtual CPU (vCPU) Ratio in VMware vSphere ESXi Environment

I have some testings couple of times about this. In a Business Critical Applications, Telco Workloads Applications (Network Function Virtualisation (NFV)), or High CPU intensive applications (without high up and down intensity of CPU workloads), it is always recommended to do dimensioning of 1 vCPU compare to 1 pCPU. Regardless we have the performance benefit from Hyperthread technology around 25% because of the scheduling enhancement from intel processor.

For IT workloads (such as email, web apps, normal apps, etc) we can give better ratio such as 1 pCPU to 4 vCPU or even 1:10 or I also see some 1:20 of the production environments. Due to the VMs will not burst at the same time with a stable and long transactions per second.

These are some tests that I have for Network Function Virtualisation platform, we are pushing one of Telco workloads applications (messages) using Spirent as performance load tester to our VNF (telco VM) which run on the intel servers.

Known Fact for Host and VM during the Test:

  • Configuration of the Host = 20 cores x 2.297 GHz = 45,940 MHz
  • Configuration of the VM = 10 vCPU x 2.297 GHz = 22,297 MHz
  • Only 1 VM is powered on in the host (for testing purpose only to avoid contention)

Observation of Host CPU performance:

  • Max Host during Test Performance (Hz)= 12,992 MHz of total 45,940 MHz
  • Max Host during Test Performance (%)= 28.27 % of total 45,940 MHz

Observation of VM CPU performance:

  • Max VM during Test Performance (Hz)= 12,367 MHz of total 22,297 MHz
  • Max VM during Test Performance (%)= 53.83 % of total 22,297 MHz

Conclusion:

  • Percentage calculation is the same result as MHz calculation. Means, if we calculate percentage usage with total MHz then the result will be MHz usage.
  • CPU clock speed that will be needed by VNF vendor can be calculated based on MHz or percentage calculation, as long as the functionality is considered as apple to apple comparison (need to consider the number of modules/functionality).
  • From performance wise observation, this will also give better view that for NFV workloads, 1 to 1 mapping dimensioning is reflected between vCPU and pCPU —> 10 vCPU is almost the same as 10 pCPU (from MHz calculations usage scenario).

Notes:
Physical CPU is physical cores that is resides in the servers. Virtual CPU is logical cores that is resides in the VMs (can benefit the hyper thread technology).

 

Kind Regards,
Doddi Priyambodo

Why Smaller vCPU is better than Bigger vCPU in a fully probable contention environment

In VMware vSphere environment, why Smaller vCPU is better than Bigger vCPU (if the workloads only require few vCPU) in a fully probable contention environment?

To explain this further let’s take an example of a four pCPU host that has four VMs, three with 1 vCPU and one with 4 vCPUs. At best only the three single vCPU VMs can be scheduled concurrently. In such an instance the 4 vCPU VM would have to wait for all four pCPUs to be idle. In this example the excess vCPUs actually impose scheduling constraints and consequently degrade the VM’s overall performance, typically indicated by low CPU utilization but a high CPU Ready figure.

So, always start with smaller vCPU and then add extra vCPU later on if needed based on your observation about the workload.

This reference post also share a very good description why too many vCPU will give poor performance to your Virtual Machine: http://www.gabesvirtualworld.com/how-too-many-vcpus-can-negatively-affect-your-performance/

Conclusion: “Right Size Your VMs!”

 

Kind Regards,
Doddi Priyambodo