Installation guide
C H A P T E R 1 2 VMware ESX Server Resource Management
391
You can modify CPU shares and affinity sets dynamically at any time by using the
procfs interface on the service console or using the VMware Management
Interface. Initial values for a virtual machine may also be specified in its configuration
file.
Using Proportional-share Scheduling by Allocating Shares
With proportional-share processor scheduling, you can allocate a number of shares to
each scheduled virtual machine. CPU shares are relative.
For example, a virtual machine that is allocated 2000 shares is entitled to consume
twice as many CPU cycles as a virtual machine with 1000 shares. Similarly, a virtual
machine that is allocated 200 shares is entitled to consume twice as many CPU cycles
as a virtual machine with 100 shares. The number of shares may vary, but the first
virtual machine has twice as many shares as the second virtual machine.
By default, the setting for high is twice that of normal, or four times that of low. For
example, a virtual machine with high shares can consume twice as many CPU cycles
as a virtual machine with normal shares, or four times as many CPU cycles as a virtual
machine with low shares. If you want to change these defaults, see Using procfs on
page 397.
You can use proportional-share scheduling by itself, or in combination with CPU
percentages. See Managing CPU Time with Percentages and Shares on page 392.
For example, if you are running three virtual machines, each starts with a default
allocation of normal shares. If you want to give one virtual machine half the CPU time
and give each of the other two virtual machines one-quarter of the CPU time, you can
assign high shares to the first virtual machine and leave the other two at their default
allocations. Since these share allocations are relative, the same effect may be achieved
by giving 500 shares to the first virtual machine and 250 to each of the other two
virtual machines.
Controlling Relative CPU Rates
You can control relative CPU rates by specifying the number of shares allocated to
each virtual machine. Increasing the number of shares allocated to a virtual machine
dilutes the effective value of all shares by increasing the total number of shares.
The service console receives 2000 shares and has a minimum CPU percentage of 8
percent, by default. In most cases, this should be an appropriate allocation, since the
service console should not be used for CPU-intensive tasks.
If you do find it necessary to adjust the service console’s allocation of CPU shares, you
can use the VMware Management Interface or the procfs interface on the service
console, as described in this section. Through the management interface, you can