Technical information

Performance Best Practices for VMware vSphere 4.0
20 VMware, Inc.
Although some recent operating systems (including Windows Vista, Windows Server 2008, and
Windows 7) use the same HAL (hardware abstraction layer) or kernel for both UP and SMP installations,
many operating systems can be configured to use either a UP HAL/kernel or an SMP HAL/kernel. To
obtain the best performance on a single-vCPU virtual machine running an operating system that offers
both UP and SMP HALs/kernels, configure the operating system with a UP HAL or kernel.
The UP operating system versions are for single-processor systems. If used on a multiprocessor system, a
UP operating system version will recognize and use only one of the processors. The SMP versions, while
required in order to fully utilize multiprocessor systems, may also be used on single-processor systems.
Due to their extra synchronization code, however, SMP operating system versions used on
single-processor systems are slightly slower than UP operating system versions used on the same
systems.
Hyper-Threading
Hyper-threading technology (recent versions of which are called symmetric multithreading, or SMT)
allows a single physical processor core to behave like two logical processors, essentially allowing two
independent threads to run simultaneously. Unlike having twice as many processor cores — that can
roughly double performance — hyper-threading can provide anywhere from a slight to a significant
increase in system performance by keeping the processor pipeline busier.
If the hardware and BIOS support hyper-threading, ESX automatically makes use of it. For the best
performance we recommend that you enable hyper-threading, which can be accomplished as follows:
a Ensure that your system supports hyper-threading technology. It is not enough that the processors
support hyper-threading — the BIOS must support it as well. Consult your system documentation to
see if the BIOS includes support for hyper-threading.
b Enable hyper-threading in the system BIOS. Some manufacturers label this option Logical Processor
while others label it Enable Hyper-threading.
An ESX system enabled for hyper-threading should behave almost exactly like system without it. Logical
processors on the same core have adjacent CPU numbers, so that CPUs 0 and 1 are on the first core, CPUs
2 and 3 are on the second core, and so on.
ESX systems manage processor time intelligently to guarantee that load is spread smoothly across all
physical cores in the system. If there is no work for a logical processor it is put into a special halted state
that frees its execution resources and allows the virtual machine running on the other logical processor
on the same core to use the full execution resources of the core.
Be careful when using CPU affinity on systems with hyper-threading. Because the two logical processors
share most of the processor resources, pinning vCPUs, whether from different virtual machines or from
one SMP virtual machine, to both logical processors on one core (CPUs 0 and 1, for example) could cause
poor performance.
ESX provides configuration parameters for controlling the scheduling of virtual machines on
hyper-threaded systems. When choosing hyper-threading sharing choices Any (which is the default) is
almost always preferred over None or Internal.
The None option indicates that when a vCPU from this virtual machine is assigned to a logical processor,
no other vCPU, whether from the same virtual machine or from a different virtual machine, should be
assigned to the other logical processor that resides on the same core. That is, each vCPU from this virtual
machine should always get a whole core to itself and the other logical CPU on that core should be placed
in the halted state. This option is like disabling hyper-threading for that one virtual machine.
The Internal option indicates that the vCPUs of the virtual machine can share cores with each other, but
not with vCPUs from other virtual machines.
N
OTE When changing an existing virtual machine running Windows from multiprocessor to
single-processor the HAL usually remains SMP.