Information Technology Reference
In-Depth Information
RAM is accessed 800,000 times faster than traditional rotational disk or 50,000 times faster than
SSD. Or to put it another way, if RAM takes 1 second to access, then disk could take 800,000 sec-
onds to access—or nine and a quarter days. h ink having SSD swap cache will help you—it would
still take over half a day.
((800,000 ÷ 60 seconds) ÷ 60 minutes) ÷ 24 hours = 9.259
((50,000 ÷ 60 seconds) ÷ 60 minutes) ÷ 24 hours = 0.578
As you can see, if VM performance is your goal, it is prudent to spend your money on enough RAM
to support the VMs you plan to run. h ere are other factors, but this is a signifi cant one. h is
incredible speed diff erence is also why adding memory compression to ESXi's arsenal of memory-
management tools can make a big diff erence in performance; it helps avoid having to swap pages
out to disk and keep them in memory instead. Even compressed pages in RAM are signifi cantly
faster than pages swapped out to disk.
Just because a VM without a reservation could potentially get all its memory from VMkernel
swap, does this mean that a VM will actually get all of its memory from swap when ESXi host
RAM is available? No. ESXi attempts to provide each VM with all the memory it requests, up to
the maximum amount coni gured for that VM. Obviously, a VM coni gured with only 4,096 MB
of RAM cannot request more than 4,096 MB of RAM. However, when an ESXi host doesn't have
enough RAM available to satisfy the memory needs of the VMs it is hosting and when tech-
nologies such as transparent page sharing, the balloon driver, and memory compression aren't
enough, the VMkernel is forced to page some of each VM's memory out to the individual VM's
VMkernel swapi le.
Is there a way you can control how much of an individual VM's memory allocation can be
provided by swap and how much must be provided by real physical RAM? Yes. This is where
a memory reservation comes into play. Recall that we said a memory reservation specii es the
amount of real, physical RAM that the ESXi host must provide the VM. By default, a VM has a
memory reservation of 0 MB, which means that ESXi is not required to provide any real, physi-
cal RAM. This means potentially all of the VM's memory could be paged out to the VMkernel
swapi le if necessary.
Let's look at what happens if you decide to set a memory reservation of 1,024 MB for this VM,
shown in Figure 11.4. How does this change the way this VM gets memory?
In this example, when this VM is started, the ESXi host must provide at least 1,024 MB of
physical RAM to support this VM's memory allocation. In fact, 1,024 MB of RAM is guaranteed
for this VM. The host can provide the remaining 3,072 MB of RAM from either physical RAM or
VMkernel swap, as shown in Figure 11.5. In this case, because some of the VM's RAM is guaran-
teed to come from physical RAM, ESXi reduces the size of the VMkernel swapi le by the amount
of the reservation. Therefore, the VMkernel swapi le is reduced in size by 1,024 MB. This behav-
ior is consistent with what we've shown you so far: With a reservation of 0 MB, the VMkernel
swapi le is the same size as the amount of coni gured memory. As the reservation increases, the
size of the VMkernel swapi le decreases in size correspondingly.
Search WWH ::




Custom Search