Home > Blogs > VMware VROOM! Blog > Author Archives: Fei Guo

Author Archives: Fei Guo

Understanding Memory Resource Management in vSphere 5

Memory resource management is a key player in the ability of vSphere systems to over-commit resources and thereby maximize the utilization of an ESXi host. Over-commitment allows the active memory of a system to perform as close to 100% as possible. vSphere achieves this by using several innovative techniques to reclaim virtual machine memory, which are:

  • Transparent page sharing (TPS)—removes redundant pages with identical content
  • Ballooning—artificially increases the memory pressure inside the guest
  • Memory compression—compresses the pages that need to be swapped out
  • Hypervisor swapping—ESXi directly swaps out the virtual machine’s memory
  • Swap to host cache (swap to SSD)—reclaims memory by storing the swapped out pages in the host cache on a solid-state drive

New to vSphere 5 is swap to host cache, also known as swap to SSD. This is a memory management technique that takes place after ballooning, transparent page sharing, and memory compression have already been tried to free memory. It is an alternative that gives better performance than hypervisor swapping. In the test environment employed, swapping to SSD performed 30% better than hypervisor swapping in the same test system.

 A recently-published technical white paper describes how memory management works in ESXi, details the configuration options available, and provides results to show the performance impact of these options.

 Data in several tests that appeared in earlier versions of the paper is also updated for vSphere 5.

 For the full paper, see Understanding Memory Resource Management in VMware vSphere 5.

 

Understanding Memory Resource Management in VMware ESX Server 4.1

We have published a whitepaper about how ESX server 4.1 manages the host memory resource. This paper not only presents the basic memory resource management concepts but also shows experiment results explaining the performance impact for four different memory reclamation techniques: Page sharing, ballooning, memory compression and host swapping used in ESX server 4.1. The experiment results show that:

1) Page sharing introduces negligible performance overhead;

2) Compared to host swapping, ballooning will cause much smaller performance degradation when reclaiming memory. In some cases, ballooning even brings zero performance overhead.

3) Memory compression can significantly reduce the amount of the swapped out pages and hence greatly improve the overall performance in high memory overcommitment scenario.

The following is the brief summary of the paper.

In this paper, we start from introducing the basic memory virtualization concepts. Then, we discuss the reason why supporting memory overcommitment is necessary in ESX server. Four memory reclamation techniques are currently used in ESX server: Transparent Page Sharing (TPS), Ballooning, Memory Compression and Host Swapping. We illustrate the mechanism of these techniques and analysis the Pros and Cons of each technique from performance perspective. In addition, we present how ESX memory scheduler uses a share-based allocation algorithm to allocate memory for multiple Virtual machines when host memory is overcommitted.

Beyond the technique discussion, we conduct experiments to help user understand how individual memory reclamation techniques impact the performance of various applications. In these experiments, we choose to use SPECjbb, Kernel Compile, Swingbench, SharePoint and Exchange benchmarks to evaluate different techniques.

Finally, based on the memory management concepts and performance evaluation results, we present some best practices for host and guest memory usage.

The paper can be found in

http://www.vmware.com/files/pdf/techpaper/vsp_41_perf_memory_mgmt.pdf

Note that this paper is written based on ESX4.0 memory management paper. Besides the new content introduced in ESX4.1, e.g., memory compression, quite a few places have been updated to represent the state of the art of ESX memory management.

Understanding Memory Resource Management in VMware ESX Server

Recently, we have published a whitepaper about how ESX server manages the host memory resource. This paper not only presents the basic memory resource management concepts but also shows experiment results explaining the performance impact of three different memory reclamation techniques:

Page sharing, ballooning, and host swapping used in ESX sever. The experiment results show that:

1) Page sharing introduces negligible performance overhead;
2) Compared to host swapping, ballooning will cause much smaller performance degradation when reclaiming memory. In some cases, ballooning even brings zero performance overhead.

The following is the brief summary of the paper.

In general, ESX server uses high-level resource management policies to compute a target memory allocation for every virtual machine based on the current system load and parameter settings for the virtual machine (shares, reservation, and limit, etc). The computed target allocation is used to guide the dynamic adjustment of the memory allocation for each virtual machine. In the cases where host memory is overcommitted, the target allocations are still achieved by invoking several lower-level memory reclamation techniques to reclaim memory from virtual machines.

In this paper, we start from introducing the basic memory virtualization concepts. Then, we discuss the reason why supporting memory overcommitment is necessary in ESX server. Three memory reclamation techniques are currently used in ESX server: Transparent Page Sharing (TPS), Ballooning and Host Swapping. We illustrate the mechanism of these three techniques and analysis the Pros and Cons of each technique from performance perspective. In addition, we present how ESX memory scheduler uses a share-based allocation algorithm to allocate memory for multiple Virtual machines when host memory is overcommitted.

Beyond the technique discussion, we conduct experiments to help user understand how individual memory reclamation techniques impact the performance of various applications. In these experiments, we choose to use SPECjbb, Kernel Compile, Swingbench and Exchange benchmarks to evaluate different techniques.

Finally, based on the memory management concepts and performance evaluation results, we present some best practices for host and guest memory usage.
 
For more details, please read the full paper from here.