We use cookies to improve your experience with our site.

支持大页的虚拟化环境下的内存管理

Huge Page Friendly Virtualized Memory Management

  • 摘要: 随着运行在云数据中心上的应用程序内存需求的快速增加,我们需要在虚拟化环境中进行更有效的内存管理。当虚拟机运行具有大工作集的程序时,使用大页可以明显改善其性能。具有大工作集的程序对内存分配更敏感,这要求我们快速调整虚拟机的内存,以适应内存阶段的变化。我们以大页为粒度调整虚拟机的内存,使得调整的效率更高。然而,现有的虚拟机内存重新分配技术(如气球)不支持大页面。此外,为了驱动有效的内存重新分配,我们需要预测虚拟机的实际内存需求。我们发现,为常规页面设计的传统内存需求估计方法不能简单地移植到采用大页面的系统中。如何根据内存需求的周期性变化及时有效地调整虚拟机的内存是我们面临的另一个挑战。
    本文提出了一种基于动态大页面的内存平衡系统(HPMBS),用于虚拟环境下的高效内存管理。我们首先重新构建气球机制,以便以大页面的粒度分配内存。然后我们设计并实现了一个基于大页的工作集测算机制,它可以准确地测算虚拟机在大页环境中的内存需求。结合这两种机制,我们最终实现了一种基于动态规划的算法来实现动态内存平衡。实验表明,该系统节省了内存,降低了系统开销,提高了系统的整体性能。

     

    Abstract: With the rapid increase of memory consumption by applications running on cloud data centers, we need more efficient memory management in a virtualized environment. Exploiting huge pages becomes more critical for a virtual machine's performance when it runs large working set size programs. Programs with large working set sizes are more sensitive to memory allocation, which requires us to quickly adjust the virtual machine's memory to accommodate memory phase changes. It would be much more efficient if we could adjust virtual machines' memory at the granularity of huge pages. However, existing virtual machine memory reallocation techniques, such as ballooning, do not support huge pages. In addition, in order to drive effective memory reallocation, we need to predict the actual memory demand of a virtual machine. We find that traditional memory demand estimation methods designed for regular pages cannot be simply ported to a system adopting huge pages. How to adjust the memory of virtual machines timely and effectively according to the periodic change of memory demand is another challenge we face. This paper proposes a dynamic huge page based memory balancing system (HPMBS) for efficient memory management in a virtualized environment. We first rebuild the ballooning mechanism in order to dispatch memory in the granularity of huge pages. We then design and implement a huge page working set size estimation mechanism which can accurately estimate a virtual machine's memory demand in huge pages environments. Combining these two mechanisms, we finally use an algorithm based on dynamic programming to achieve dynamic memory balancing. Experiments show that our system saves memory and improves overall system performance with low overhead.

     

/

返回文章
返回