Technical information

VMware, Inc. 19
Chapter 2 ESX and Virtual Machines
ESX CPU Considerations
This subsection provides guidance regarding CPU considerations in ESX.
CPU virtualization adds varying amounts of overhead depending on the percentage of the virtual machine’s
workload that can be executed on the physical processor as is and the cost of virtualizing the remaining
workload:
For many workloads, CPU virtualization adds only a very small amount of overhead, resulting in
performance essentially comparable to native.
Many workloads to which CPU virtualization does add overhead are not CPU-bound — that is, most of
their time is spent waiting for external events such as user interaction, device input, or data retrieval,
rather than executing instructions. Because otherwise-unused CPU cycles are available to absorb the
virtualization overhead, these workloads will typically have throughput similar to native, but potentially
with a slight increase in latency.
For a small percentage of workloads, for which CPU virtualization adds overhead and which are
CPU-bound, there will be a noticeable degradation in both throughput and latency.
The rest of this subsection lists practices and configurations recommended by VMware for optimal CPU
performance.
When configuring virtual machines, the total CPU resources needed by the virtual machines running on
the system should not exceed the CPU capacity of the host. If the host CPU capacity is overloaded, the
performance of individual virtual machines may degrade.
When approaching the limit for the number of virtual machine on an ESX host, use CPU reservations to
guarantee 100% CPU availability to the console. (Because it doesn’t have a console, this recommendation
doesn’t apply to ESXi.)
It is a good idea to periodically monitor the CPU usage of the host. This can be done through the vSphere
Client or by using esxtop or resextop. Below we describe how to interpret esxtop data:
If the load average on the first line of the esxtop CPU Panel is equal to the number of physical
processors in the system, this indicates that the system is overloaded.
The usage percentage for the physical CPUs on the PCPU line can be another indication of a possibly
overloaded condition. In general, 80% usage is a reasonable ceiling and 90% should be a warning that
the CPUs are approaching an overloaded condition. However organizations will have varying
standards regarding the desired load percentage.
For information about using esxtop or resextop see Appendix A of the VMware Resource Management
Guide, listed in “Related Publications” on page 8.
Use as few virtual CPUs (vCPUs) as possible. For example, do not use virtual SMP if your application is
single-threaded and will not benefit from the additional vCPUs.
Even if some vCPUs are not used, configuring virtual machines with them still imposes some small
resource requirements on ESX:
Unused vCPUs still consume timer interrupts.
Maintaining a consistent memory view among multiple vCPUs consumes resources.
Some older guest operating systems execute idle loops on unused vCPUs, thereby consuming
resources that might otherwise be available for other uses (other virtual machines, the VMkernel, the
console, etc.).
The guest scheduler might migrate a single-threaded workload amongst multiple vCPUs, thereby
losing cache locality.
This translates to real CPU consumption from the point of view of ESX. For additional information see KB
article 1730, listed in “Related Publications” on page 8.