Database Reference
In-Depth Information
In Figure 7.4 , if we doubled the amount of physical memory on the host from 64GB to
128GB, there would be enough memory set aside for all the virtual machines with
memory reservations plus any additional demand the other VMs listed would ever put
on the physical host, as configured. That would be an example of a system where
memory is not overcommitted. There is more than enough memory to meet the demands
of all the virtual machines that reside on the physical host.
It's important to remember that when a database cannot get the resources it needs when
it needs them, database performance will be negatively impacted as the database waits
for those needed resources.
Caution
When you first start virtualizing your production databases, its important you
don't overcommit memory. When there is not enough physical memory to meet the
demands of the VMs, excessive paging and swapping will occur, which will
impact database performance.
If the physical host is memory starved, then the individual VMs are at risk of being
memory starved, which will induce paging and swapping. The one exception to this rule
is memory reservations. To help prevent memory shortages, the hypervisor has tools
available to it, such as transparent page sharing and ballooning, that can help lessen the
strain on the physical host.
Transparent Page Sharing
To paraphrase the Scottish poet Robert Burns, the best laid plans of mice and men often
go astray. No matter how well you plan the memory usage, there may come a time when
the physical host becomes oversubscribed. One of the tools available to the hypervisor
is transparent page sharing (TPS). TPS enables the hypervisor to remove redundant
pages of memory to free up memory that is needed elsewhere. In Figure 7.2 , we talked
about how memory management happens at three levels: the guest VM level and the
hypervisor level and physical host. TPS happens at the hypervisor level or physical host
level.
Where there are idle CPU cycles, the hypervisor is running hash algorithms to generate
“hints” so that it knows the location of the redundant pages of memory. Redundant pages
of memory could occur when virtual machines are running the same applications,
running the same guest operating systems, or working with the same datasets, but they
actually happen at a level below application and operating system awareness, so
redundant pages can still be found even if all workloads are unique. Only when there is
actual memory contention at the physical host level does the hypervisor start using
transparent page sharing.
 
 
Search WWH ::




Custom Search