FHPM:面向虚拟化的细粒度大页管理
FHPM: Fine-grained Huge Page Management For Virtualization
AI总结:
针对虚拟化场景下大页管理缺乏基础页粒度访问信息导致hypervisor决策错误的问题,提出FHPM细粒度大页管理方案,通过重定向EPT PDE跟踪访问、动态升降级页面及友好的拆分合并机制,在分层内存管理和页面共享场景中实现性能提升与内存节省。
摘要:
随着越来越多具有大内存占用的数据密集型任务被部署在虚拟机(VM)中,大页被广泛用于消除不断增加的地址转换开销。然而,大页映射一旦建立,大页内的所有基础页区域将共享同一个扩展页表(EPT)表项,导致虚拟机监控程序(hypervisor)无法感知对基础页区域的访问。目前最先进的解决方案都无法获取大页在基础页粒度下的访问信息。我们观察到这会导致虚拟机监控程序做出错误决策,例如分层内存系统中的错误数据放置,以及页面共享时出现未被共享的基础页区域。\n本文提出了FHPM——一种无需修改硬件和客户机操作系统的面向虚拟化的细粒度大页管理方案。FHPM能够识别基础页粒度的访问信息,并动态地进行页面提升和降级。FHPM的核心思路是将EPT大页目录项(PDE)重定向到新的配套页,从而让内存管理单元(MMU)能够跟踪大页内部的访问信息。随后,FHPM可以根据当前的热页压力进行页面提升和降级,以平衡地址转换开销和内存使用。同时,FHPM提出了一种对虚拟机友好的页面拆分与合并机制,以避免额外的虚拟机退出(VM-exit)。综合来看,FHPM将监控和管理开销降至最低,并确保虚拟机监控程序获取细粒度的虚拟机内存访问信息以做出正确决策。我们将FHPM应用于改进分层内存管理(FHPM-TMM)和促进页面共享(FHPM-Share)。FHPM-TMM相比纯大页管理和纯基础页管理,性能分别提升了最高33%和61%。FHPM-Share相比最先进的页面共享方案Ingens,在性能相当的情况下能够多节省41%的内存。
英文摘要:
As more data-intensive tasks with large footprints are deployed in virtual machines (VMs), huge pages are widely used to eliminate the increasing address translation overhead. However, once the huge page mapping is established, all the base page regions in the huge page share a single extended page table (EPT) entry, so that the hypervisor loses awareness of accesses to base page regions. None of the state-of-the-art solutions can obtain access information at base page granularity for huge pages. We observe that this can lead to incorrect decisions by the hypervisor, such as incorrect data placement in a tiered memory system and unshared base page regions when sharing pages. This paper proposes FHPM, a fine-grained huge page management for virtualization without hardware and guest OS modification. FHPM can identify access information at base page granularity, and dynamically promote and demote pages. A key insight of FHPM is to redirect the EPT huge page directory entries (PDEs) to new companion pages so that the MMU can track access information within huge pages. Then, FHPM can promote and demote pages according to the current hot page pressure to balance address translation overhead and memory usage. At the same time, FHPM proposes a VM-friendly page splitting and collapsing mechanism to avoid extra VM-exits. In combination, FHPM minimizes the monitoring and management overhead and ensures that the hypervisor gets fine-grained VM memory accesses to make the proper decision. We apply FHPM to improve tiered memory management (FHPM-TMM) and to promote page sharing (FHPM-Share). FHPM-TMM achieves a performance improvement of up to 33% and 61% over the pure huge page and base page management. FHPM-Share can save 41% more memory than Ingens, a state-of-the-art page sharing solution, with comparable performance.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。