Technical information

VMware, Inc. 31
Chapter 3 Guest Operating Systems
Guest Operating System CPU Considerations
In SMP guests the guest operating system can migrate processes from one vCPU to another. This
migration can incur a small CPU overhead. If the migration is very frequent it might be helpful to pin
guest threads or processes to specific vCPUs. (Note that this is another reason not to configure virtual
machines with more vCPUs than they need.)
Many operating systems keep time by counting timer interrupts. The timer interrupt rates vary between
different operating systems and versions. For example:
Unpatched 2.4 and earlier Linux kernels request timer interrupts at 100 Hz (100 interrupts per
second).
Older 2.6 Linux kernels and some 2.4 Linux kernels request interrupts at 1000 Hz.
Newer 2.6 Linux kernels request interrupts at 250 Hz.
The most recent 2.6 Linux kernels introduce the NO_HZ kernel configuration option (sometimes
called “tickless timer”) that uses a variable timer interrupt rate.
Microsoft Windows operating system timer interrupt rates are specific to the version of Microsoft
Windows and the Windows HAL that is installed. Windows systems typically use timer interrupt
rates of between 66 Hz and 100 Hz.
Running applications that make use of the Microsoft Windows multimedia timer functionality can
increase the timer interrupt rate. For example, some multimedia applications or Java applications
increase the timer interrupt rate to 1000 Hz.
The total number of timer interrupts delivered to the virtual machine depends on a number of factors:
Virtual machines running SMP HALs/kernels (even if they are running on a UP virtual machine)
require more timer interrupts than those running UP HALs/kernels.
The more vCPUs a virtual machine has, the more interrupts it requires.
Delivering many virtual timer interrupts negatively impacts guest performance and increases host CPU
consumption. If you have a choice, use guest operating systems that require fewer timer interrupts. For
example:
If you have a UP virtual machine use a UP HAL/kernel.
In RHEL 5.1 or later use the “divider=10” kernel boot parameter to reduce the timer interrupt rate to
100 Hz.
Kernels with tickless-timer support (NO_HZ kernels) do not schedule periodic timers to maintain
system time. As a result, these kernels reduce the overall average rate of virtual timer interrupts, thus
improving system performance and scalability on hosts running large numbers of virtual machines.
Use a VMI-enabled operating system and enable VMI for the virtual machine (see “Running
Paravirtualized Operating Systems” on page 29).
For background information on this topic refer to Timekeeping in Virtual Machines, listed in “Related
Publications” on page 8.
N
OTE A bug in the RHEL 5.1 x86_64 kernel causes problems with the divider option. For RHEL 5.1
use the patch that fixes the issue at https://bugzilla.redhat.com/show_bug.cgi?id=305011. This bug is
also fixed in RHEL 5.2. For more information see
http://rhn.redhat.com/errata/RHSA-2007-0993.html.