Installation guide
www.vmware.com
392
VMware ESX Server Administration Guide
increase the minimum CPU percentage or the number of CPU shares to allocated
more CPU to the service console. For more information, see Configuring the Service
Console on page 220.
Note: CPU share allocations, by themselves, do not necessarily guarantee the rate of
progress within a virtual machine.
For example, suppose virtual machine A is allocated high shares, while virtual
machine B is allocated normal shares. If both virtual machines are CPU-bound — for
example, both are running the same compute-intensive benchmark — then virtual
machine A should indeed run twice as fast as virtual machine B. However, if virtual
machine A instead runs an I/O-bound workload that causes it to stop as it waits for
other resources, it does not run twice as fast as virtual machine B, even though it is
allowed to use twice as much CPU time.
Managing CPU Time with Percentages and Shares
You can also use both CPU percentages and shares to manage CPU resources for your
virtual machines. CPU percentages specify absolutes, an absolute minimum or
maximum usage by a virtual machine. Shares, on the other hand, represent relative
importance or priority. You set shares to specify which virtual machines will get
preferential treatment when ESX Server is constrained.
For example, virtual machine A has a minimum CPU percentage of 20%, and a
maximum CPU percentage of 50%, while virtual machine B has a minimum
percentage of 30% and no specified maximum percentage. You then decide to give
virtual machine A high CPU shares and virtual machine B low CPU shares.
ESX Server interprets this allocation so that virtual machine A will never have less than
20% of a single physical CPU, while virtual machine B will never have less than 30% of
a single physical CPU, in any situation.
However, if one or more virtual machines are idling, then ESX Server redistributes this
extra CPU time proportionally, based on the virtual machines’ CPU shares. Active
virtual machines benefit when extra resources are available. In this example, virtual
machine A gets four times as much CPU time as virtual machine B, subject to the
specified CPU percentages. (By default the setting for high shares is four times that for
low shares.)
That is, virtual machine A has four times as much CPU time as machine B, as long as
the virtual machine A’s CPU percentage is between 20% and 50%. In actuality, virtual
machine A may only get twice the CPU time of virtual machine B, because four times
the CPU time exceeds 50%, or the maximum CPU percentage of virtual machine A.