Information Technology Reference
In-Depth Information
Now that you've seen how to adjust the Reservation, Limit, and Shares values, we'll take a
detailed look at the specii c behaviors of how these mechanisms apply to memory usage and
allocation.
Using Memory Reservations
The memory reservation is an optional setting for each VM. You can see in Figure 11.3 that the
default memory reservation is 0 MB (the equivalent of no memory reservation at all). You can
adjust this value, but what exactly does this value do? What impact does adjusting the memory
reservation have?
The memory reservation amount specii ed in the VM settings is the amount of actual, real
physical memory that the ESXi host must provide to this VM for the VM to power on. A VM
with a memory reservation is guaranteed the amount of RAM coni gured in its Reservation
setting. As mentioned, the default is 0 MB, or no reservation. In the previous example, coni gur-
ing the VM with 4 GB of RAM and the default reservation of 0 MB means the ESXi host is not
required to provide the VM with any physical memory. If the ESXi host is not required to pro-
vide actual RAM to the VM, then where will the VM get its memory? In the absence of a reser-
vation, the VMkernel has the option to provide VM memory from VMkernel swap .
VMkernel swap is the hypervisor swapping mechanism referred to previously when dis-
cussing the various memory-management techniques that ESXi employs. VMkernel swap is
implemented as a i le with a .vswp i lename extension that is created when a VM is powered
on. These per-VM swapi les created by the VMkernel reside, by default, in the same datastore
location as the VM's coni guration i le and virtual disk i les (although you do have the option
of relocating the VMkernel swap, which we'll explain later in the section “Coni guring Swap to
Host Cache”). In the absence of a memory reservation—the default coni guration—this i le will
be equal in size to the amount of RAM coni gured for the VM. Thus, a VM coni gured for 4 GB
of RAM will have a VMkernel swapi le that is also 4 GB in size and stored, by default, in the
same location as the VM's coni guration and virtual disk i les.
In theory, this means a VM could get its memory allocation entirely from VMkernel swap—
or disk—resulting in VM performance degradation because disk access time is several orders of
magnitude slower than RAM access time.
The Speed of RAM
How slow is VMkernel swap compared to RAM? If you make some basic assumptions regarding
RAM access times and disk seek times, you can see that both appear fairly fast in terms of human
abilities but that in relation to each other, RAM is much faster:
RAM access time = 10 nanoseconds (for example)
SSD seek time = 500 microseconds (for example)
Rotational disk seek time = 8 milliseconds (for example)
h e diff erence between these is calculated as follows:
0.008 ÷ 0.00000001 = 800,000
or
0.0005 ÷ 0.00000001 = 50,000
Search WWH ::




Custom Search