
Resource Management
234
www.vmware.com
CPU Resource Management
VMware ESX Server provides dynamic control over both the execution rate and the
processor assignment of each scheduled virtual machine. The scheduler performs
automatic load balancing on multiprocessor systems.
You can manage the CPU resources on a server from the VMware Management
Interface or from the console operating system’s command line.
Proportional-share Scheduling
Proportional-share processor scheduling gives you intuitive control over execution
rates. Each scheduled virtual machine is allocated a number of shares that entitle it to
a fraction of processor resources. For example, a virtual machine that is allocated twice
as many shares as another is entitled to consume twice as many CPU cycles. In
general, a runnable virtual machine with S shares on a processor with an overall total
of T shares is guaranteed to receive at least a fraction S/T of the processor CPU time.
For example, if you are running three virtual machines, each starts with a default
allocation of 1,000 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 2,000 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.
You can control relative CPU rates by specifying the number of shares allocated to
each virtual machine. The system automatically keeps track of the total number of
shares, T. Increasing the number of shares allocated to a virtual machine dilutes the
effective value of all shares by increasing T.
Absolute guarantees for minimum CPU rates can be specified by following the simple
convention of limiting the total number of shares allocated across all virtual machines.
For example, if the total number of shares is limited to 10,000 or less, each share
represents a guaranteed minimum of at least 0.01 percent of processor CPU cycles.
The console operating system receives 1,000 shares by default. In most cases, this
should be an appropriate allocation, since the console operating system should not
be used for CPU-intensive tasks. If you do find it necessary to adjust the console
operating system’s allocation of CPU shares, you can use the procfs interface, as
described in this section. Or you can achieve a similar result indirectly, using the
VMware Management Interface, by adjusting the shares of the virtual machines
Komentáře k této Příručce