Picking up the discussion from where we left in Part 1 – Storage, let’s move on to explore how vSphere 5.1 and Hyper-V 2012 handle virtualization memory management.

 

 

Memory Management in Hyper-V 2012

Hyper-V 2012 offers some distinct memory management options that help avoid memory over-commitment and efficient virtual machine (VM) restart operations.

 

 

  • Dynamic Memory to treat memory as a shared resource and allocate to VMs that are running on Hyper-V hosts. This technique helps provision VMs with only the memory they need. For example, if a VM is not running on peak capacity and doesn’t need the committed memory allocated to it, Hyper-V is capable of dynamically reallocating this memory to other VMs that are running more load and are in real need of memory resource. This avoids the problem of over-commitment of memory to VMs.
  • Smart Paging is another memory handling mechanism in Hyper-V 2012 used for reliable VM restart. Sometimes when a VM is rebooted, there may be no available physical memory and no option to reclaim from other VMs on the host. Smart Paging enables the temporary use of storage as a memory cache so that the VM can be provided with enough RAM to get started. Once started, the workload can fall back to its normal operational needs and stop using relatively slow disk as a temporary paging file. This helps maintain high levels of VM density without having to worry about the needs of boot-time RAM.

 

 

Memory Management in vSphere 5.1

VMware has perfected some powerful techniques by which RAM can be managed and optimized on a vSphere host in order to provide additional scalability on a per-host basis and to keep a host operating a peak levels. There are 4 memory management techniques offered by vSphere 5.1:

  

  • Transparent Page Sharing: This is a de-duplication memory management technique that helps eliminate redundant copies of memory pages across multiple VMs running on a host. vSphere discovers redundancies by assigning hash values to pages and compares them it-by-bit. Once discovered the hypervisor shares the page with all the VMs on the host with the help of a pointer. This frees up memory for new pages.
  • Memory Ballooning: This is a technique that helps free unused VM memory when the host is facing a memory shortage. There are balloon drivers installed in each VM that transfer memory from the VM back to the host so they can be reassigned to other VMs needing memory.
  • Memory compression: When there is memory contention on the host, right before swapping a page to the disk, the hypervisor reclaims memory by compressing the pages that need to be swapped out. This improves application performance when the host is under heavy memory pressure.
  • Hypervisor Swapping: When ballooning and page sharing are NOT sufficient to reclaim memory back to the host, the ESX/ESXi host swaps memory pages out to physical disk in order to reclaim memory that is needed elsewhere. The hypervisor creates a separate .vswp swap file in the home directory and swaps out guest physical memory to this file. This frees host physical memory for other VMs.

 

One key difference between both the hypervisors is that Hyper-V's Dynamic Memory allocates memory on demand and in real time, whereas vSphere’s pre-allocates memory and implements the above memory management techniques to reclaim unused memory.

 

 

To learn more about how vSphere 5.1 and Hyper-V 2012 compare,

 

 

Read this White Paper:

vsphere vs hyper-v white paper.png


Watch this Webcast:

vsphere vs hyper-v webinar.png

 

 

 

If you are interested in virtualization performance monitoring, learn about VMware monitoring and Hyper-V monitoring. In the next part of the blog series, we’ll discuss “CPU Scheduling Control”.

 

Other parts of the vSphere 5.1 vs. Hyper-V 2012 series: