Information Technology Reference
In-Depth Information
Using CPU Reservations
As you saw in Figure 11.7, the default CPU reservation for a new VM is 0 MHz (no reservation).
Recall that a reservation is a resource guarantee. Therefore, by default, a VM is not guaranteed
any CPU activity by the VMkernel. This means that when the VM has work to be done, it places
its CPU request into the CPU queue so that the VMkernel can handle the request in sequence
along with all of the other VMs' requests. On a lightly loaded ESXi host, it's unlikely the VM
will wait long for CPU time; however, on a heavily loaded host, the time this VM might have to
wait could be signii cant.
If you were to set a 1,024 MHz reservation, as shown in Figure 11.8, this would effectively
make that amount of CPU available instantly to this VM if there is a need for CPU cycles.
Figure 11.8
A VM confi gured
with a 1,024 MHz
reservation for CPU
activity is guaran-
teed that amount of
CPU capacity.
Using a CPU reservation has one notable impact on the behavior of the ESXi host, and in this
regard CPU reservations and memory reservations behave identically. The ESXi host must be able
to satisfy the reservation by providing enough resources to meet the reservations. If each VM
you create has a 1,024 MHz reservation and your host has 12,000 MHz of CPU capacity, you can
power on no more than 11 VMs (1,024 MHz × 11 = 11,264 MHz), even if all of them are idle. Note
that we said “power on” and not “create”—resources are allocated only when a VM is powered
on, not created.
While a CPU reservation behaves like a memory reservation in this regard, a CPU reserva-
tion is very different than a memory reservation when it comes to “sharing” reserved CPU
cycles. Recall from the previous section that reserved memory, once allocated to the VM, is
never reclaimed, paged out to disk, or shared in any way. The same is not true of CPU reserva-
tions. Suppose you have a VM, creatively named VM1, that has a CPU reservation of 1,024 MHz.
If VM1 is idle and not using its reserved CPU cycles, those cycles can be given to VM2. If VM1
suddenly needs cycles, VM2 doesn't get them anymore, and they are assigned to VM1.
So using a Reservation setting on CPU is similar to using a Reservation setting with memory,
but it is also very different. You saw previously that using a Limit setting with memory had
some signii cant drawbacks; what about CPU limits?
Using CPU Limits
In addition to a CPU reservation, you can set an option to place a limit on the amount of CPU
allocated. This effectively limits the VM's ability to utilize a maximum number of clock cycles
 
Search WWH ::




Custom Search