BACKGROUND IMAGE: iSTOCK/GETTY IMAGES
Although hypervisors and virtualization technology are now well-established and proven to be reliable for enterprise environments, there are some potential issues that might require investigation and remediation.
Virtual CPU (vCPU) and workload performance problems can arise through vCPU oversubscription. We commonly assume one vCPU for one logical CPU. For example, a single CPU core that isn't hyper-threaded would assume one vCPU, while a single CPU core with hyper-threading present and enabled would assume two vCPUs. But there is no rule that limits this to a 1:1 ratio. It's possible to assign more than one vCPU to the same logical CPU -- this kind of oversubscription makes the system think it has more CPU resources than might actually be present in physical CPUs. As an example, VMware vSphere 5.0 set a maximum of 25 vCPUs per physical core -- up to a 25:1 ratio in this case.
Oversubscription can work fine when the VMs and workloads present on the host server make minimal use of CPU resources. When more than one vCPU is assigned to a physical core, internal scheduling divides the physical CPU's usage between each associated vCPU. However, VMs with intensive processing needs can easily experience contention and degradation when vCPUs vie for time on the same physical CPU -- this is the constant threat posed by any resource oversubscription. Generally, a ratio of 1:1 to 3:1 is acceptable, a ratio of 3:1 to 5:1 might show some performance reduction and a ratio greater than 5:1 can be problematic.
When VM and host performance metrics show extremely high CPU utilization, it might be best to reduce the level of overprovisioning implemented on a server. Newer CPU models are often able to handle higher levels of overprovisioning than previous CPU models.
Selection and assignment
Even when oversubscription is prohibited, vCPU and workload performance problems can occur through poor vCPU selection and assignment to VMs. Remember that a hyper-threaded CPU core isn't two separate and distinct CPUs, but rather a second instruction pipeline that shares the CPU core's common functions. When hyper-threading is enabled in the basic input/output system, the hyper-threaded CPU is seen as two logical CPUs, and both logical CPUs are typically virtualized into corresponding vCPUs. The problem is that if both vCPUs on the same physical core are assigned to two demanding VMs, the compute demand from both VMs can be great enough to cause performance degradation in the more sensitive workload.
When VM and host performance metrics show extremely high CPU utilization, it might be best to assign vCPUs from different physical cores. For example, suppose a server uses a two-core, hyper-threaded CPU. Assuming no oversubscription, there would be four vCPUs denoted as CPU 0 and CPU 1 on the first core and CPU 2 and CPU 3 on the second core. If one demanding VM is using CPU 0 and the second demanding VM is using CPU 1 -- sharing the same CPU core -- it might be possible to mitigate performance degradation by changing one of the VMs to use either CPU 2 or CPU 3 -- on the second core. Another less demanding workload could use the remaining vCPU on either core. Administrators often use CPU affinity and anti-affinity rules to stipulate what CPUs a VM should and shouldn't use.
Every administrator must be familiar with CPU resources and the way that hypervisors virtualize and manage CPU resources across VMs -- evaluating and provisioning vCPUs to workloads. Overprovisioning vCPUs can help to support a higher VM count but risks performance penalties for demanding workloads. VM performance can also be affected by poor vCPU allocation. Restricting overprovisioning and applying affinity rules to guide a VM's vCPU placement can ease CPU performance bottlenecks on busy enterprise servers.
Resolve VM performance problems
Take advantage of server virtualization management tools
Dig Deeper on Virtual machine monitoring, troubleshooting and alerting
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.