Information Technology Reference
In-Depth Information
In general, then, you should consider memory limits a temporary stop-gap measure when
you need to reduce physical memory usage on an ESXi host and a negative impact to perfor-
mance is acceptable. You wouldn't, generally speaking, want to overprovision a VM with RAM
and constrain memory usage with a limit on a long-term basis. In that scenario, the VM will
typically perform very poorly and would actually perform better with less RAM coni gured and
no limit.
Why Use Memory Limits?
You might be asking yourself, “Why should I even use limits? Why not just set the confi gured limit
to whatever I want the VM to use?” h at's a good question! Keeping in mind that memor y limits are
enforced by the VMkernel without any awareness by the guest OS of the confi gured limit, memory
limits can, in many cases, negatively impact the performance of the VM.
However, there are times when you might need to use memory limits as a temporary measure to
reduce physical memory usage in your hosts. Perhaps you need to perform maintenance on an ESXi
host that is part of a cluster. You plan to use vMotion to migrate VMs to other hosts during the
maintenance window, and you want to temporarily push down memory usage on less-important
VMs so that you don't overcommit memory too heavily and negatively impact lots of VMs. Limits
would help in this situation.
K nowing that memor y limits can have negative impacts on performance, be sure to use them only
when that negative performance impact is understood and acceptable.
Working together, an initial allocation of memory, a memory reservation, and a memory limit
can be powerful tools in efi ciently managing the memory available on an ESXi host. But there is
still one more tool to examine, and that's memory shares.
Using Memory Shares
In Figure 11.3, there is a third setting called Shares that we have not yet discussed. The two
mechanisms described to you already, memory reservations and memory limits, help provide
i ner-grained controls over how ESXi should or should not allocate memory to a VM. These
mechanisms are always in effect; that is, a Limit setting is enforced even if the ESXi host has
plenty of physical RAM available for the VM to use.
Memory shares are very different. The share system in VMware is a proportional share
system that allows administrators to assign resource priority to VMs, but shares are only used
when the ESXi host is experiencing physical RAM contention. In other words, the VMs on an
ESXi host are requesting more memory than the host can provide. If an ESXi host has plenty of
memory available, shares will not play a role. However, when memory is scarce and ESXi must
decide which VM should be given access to memory, shares can establish a priority setting for a
VM requesting memory that is greater than the VM's reservation but less than its limit. (Recall
that memory under the reservation is guaranteed to the VM, and memory over the limit would
not be allocated. Shares, therefore, affect only the allocation of memory between the reservation
and the limit.) In other words, if two VMs want more memory than their reservation limit and
the ESXi host can't satisfy both of them using RAM, then you can set share values on each VM
so that one gets higher-priority access to the RAM in the ESXi host than the other.
Search WWH ::




Custom Search