Information Technology Reference
In-Depth Information
This behavior ensures that a VM has at least some high-speed memory available to it if the
ESXi host is running more VMs than it has actual RAM to support, but there's also a downside.
If you assume that each of the VMs you start on this host has a 1,024 MB reservation and you
have 8 GB of available RAM in the host to run VMs, then you will be able to launch only eight
VMs concurrently (8 × 1,024 MB = 8,192 MB). On a more positive note, if each VM is coni gured
with an initial RAM allocation of 4,096 MB, then you're now running VMs that would need 32
GB of RAM on a host with only 8 GB. ESXi uses the technologies described previously—trans-
parent page sharing, the balloon driver, memory compression, and i nally, VMkernel swap—to
manage the fact that you, as the administrator, have allocated more RAM than is physically
installed in the server.
There's one other side effect from using memory reservations that you must also under-
stand. We mentioned previously that using a memory reservation guarantees physical RAM
for the VM. This is true, but only as the guest OS in the VM requests memory. If you have a VM
with a 1,024 MB reservation coni gured, then the ESXi host will allocate RAM to the VM on
an as-needed basis, and the i rst 1,024 MB of RAM allocated to that VM is part of the reserva-
tion. RAM is allocated on demand; the presence of a reservation doesn't change that behavior.
Once allocated, though, because this RAM is part of the memory reservation, it's locked to this
VM—it won't be reclaimed via the balloon driver, and it won't be swapped out to disk or com-
pressed. In a way, that's good; it underscores the fact that this memory is guaranteed to this VM.
In a way, it's also bad, though, because the reserved memory, once allocated to a VM, can't be
reclaimed for use by other VMs or for use by the hypervisor itself.
Reserved Memory and Transparent Page Sharing
While reserved memory won't be reclaimed by the hypervisor for use by other purposes—it is,
after all, guaranteed for that VM—reserved memory can be shared via transparent page sharing.
Transparent page sharing does not aff ect the availability of reserved memory because the page is
still accessible to the VM.
Like all the mechanisms described in this chapter, this means that you'll want to use mem-
ory reservations carefully and with a full understanding of the impact on the ESXi host's behav-
ior and operation.
Use Memory Overcommitment Wisely
Although you can overcommit memory with VMware ESXi, be careful doing so. You must carefully
weigh the performance considerations. Although VMware ESXi has advanced memory-management
technologies such as transparent page sharing and idle page reclamation that help conserve memory,
any workload that actually needs its memory might take a performance hit if that memory isn't
available. In our experience, many workloads running in Windows-based VMs utilize only a por-
tion of their confi gured memory.
Search WWH ::




Custom Search