VMware vSphere 5: Memory—the key to a virtualized environment
VMware, the dominant force in virtualization, enables users to run business-critical applications with confidence and respond to business’s needs faster. vSphere 5, the latest version, is designed to accelerate the shift to cloud computing for existing datacenters and underpins compatible public cloud offerings, forming the foundation for the industry’s only hybrid cloud model. Version 5 enables a thinner architecture as it does not depend on a general purpose O/S (the Linux Service Console is gone in ESXi) which significantly reduces the hypervisor code-based footprint. New features include Storage DRS and Autodeploy — a new deployment and patching model enabling more vSphere hosts to be deployed in minutes, plus the ability to update them more efficiently. ESXi, the gold standard in hypervisors, efficiently manages hardware resources including CPU, memory, storage and the network, among multiple concurrent virtual machines. vSphere 5 supports only the ESXi hypervisor, and no longer supports ESX.
Memory continues to be the vital component in overall server consolidation ratios, with memory still the significant determining factor in the total number of VMs possible on a physical server. In short, Total RAM = #number of VMs enabled. Virtual memory is a well known technique used in most general purpose operating systems, and most all modern CPUs have hardware to support it.
The ESXi hypervisor now uses high-level resource management policies to compute a target memory allocation for each virtual machine, based on the current system load and parameter settings for the virtual machine — shares, reservation and limit. The computed target allocation is used to guide the dynamic adjustment of the memory allocation for each VM. When host memory is overcommitted, the target allocations are still achieved by invoking several lower-level mechanisms to reclaim memory from VM’s.
vSphere 5 demonstrates the level and sophistication of its memory management by classifying memory into eight (8) types — consumed, active, shared, granted, overhead, balloon, swapped, and compressed. Overall memory utilization and efficiency has been taken to new heights with the notion of “wasted resources” having been eliminated.
However, the two most important statistics to watch are Consumed Memory, and Active Memory. Consumed Memory usage is defined as the amount of host memory that is allocated to the virtual machine. Active Memory is defined as the amount of guest memory that is currently being used by the guest operating system and its applications.
Virtual memory creates a uniform virtual address space for applications and allows the O/S and hardware to handle the address translation between the virtual address space and the physical address space. This technique not only simplifies the programmer’s work, but also adapts the execution environment to support large address spaces, process protection, file mapping, and swapping in modern servers.
The ESXi hypervisor creates a contiguous addressable memory space for a virtual machine when it runs. This memory space has the same properties as the virtual address space that the guest operating system presents to the applications running on it. This allows the hypervisor to run multiple virtual machines simultaneously while protecting the memory of each VM from being access by other VM’s. The ESXi hypervisor adds an extra level of address translation that maps the guest physical address to the host physical address. This results in ESXi having three virtual memory layers: guest virtual memory, guest physical memory, and host physical memory.
Current CPUs are helping out too! Intel Xeon and AMD Opteron now have two layers of page tables in hardware—one layer stores guest virtual to guest physical address translation, and the other layer stores the guest physical to host physical memory address translation. These two tables are synchronized via processor hardware which reduces overall overhead in synching the page tables.
ESXi employs a share-based allocation algorithm to achieve efficient memory utilization for all virtual machines and to guarantee memory to those virtual machines that need it most. ESXi provides three configurable parameters to control the host memory allocation for a virtual machine: Memory Reservation, Limit, and Shares.
Reservation is a guaranteed lower bound on the amount of host physical memory reserved for the VM. Memory Limit is the upper bound of the amount of host physical memory allocated for a VM. The default setting for Limit, is unlimited, which is its specified virtual machine memory size. Memory Shares entitle a VM to a fraction of available host physical memory based on the priority that has been setup, and is important when overall memory has been overcommitted.¹
However, if memory usage patterns change, ESXi will reclaim unused memory for use by more active VM’s. Ballooning is the first reclamation technique utilized, and swapping is the second. However, both reclamation techniques may have performance ramifications if indeed, the server lacks sufficient memory. Note that while vSphere 5 is another significant advancement in virtualized efficiency, the amount of memory in the host server will still determine how many VMs can be successfully run, with performance levels meeting user performance expectations and established levels. RAM can certainly be managed and optimized, but there is still no substitution for having enough memory in the server.
To enhance RAS capabilities, vSphere 5 employs Error Isolation, also known as Memory Reliability. This function allows ESXi to stop using parts of memory when it determines that a failure might occur (predictive, ECC), as well as when a failure did occur (actual, uncorrectable). Corrected errors are reported and collected, and ESXi stops using the failed address to prevent the corrected error from becoming an uncorrected error. This enables better VMkernel reliability despite errors that are occurring in RAM, and avoids using memory pages that might contain errors.
The best way to cost effectively configure servers, regardless of brand you choose — Cisco, Dell, HP, IBM, Oracle or Fujitsu — is by selecting DATARAM memory for your virtualized servers. Smart VMware users know the best track to significant cost savings is to order servers with the minimum memory configuration from the server OEM, and then fully configure the server memory with high-capacity DIMMs from DATARAM. This is the fastest track to cost savings at the front-end of the new hardware procurement cycle. Compatibility, reliability, quality, and skilled technical support all come with significant cost savings in every DATARAM memory product you select. And don’t forget DATARAM memory is backed **FOREVER** via a Lifetime Warranty, further lowering your total cost of ownership.
VMware vSphere 5: Memory--the key to a virtualized environment
¹ “Understanding Memory Resource Management in VMware vSphere® 5.0”, Fei Guo, VMware Performance Engineering Team





