FlexMem: Proactive Memory Deduplication for Qcow2-Based VMs with Virtual Persistent Memory

Published: 01 Jan 2024, Last Modified: 08 Aug 2024APNet 2024EveryoneRevisionsBibTeXCC BY-SA 4.0
Abstract: Virtualization-based cloud computing has gained popularity owing to its system-isolation security and near-native performance. However, a critical challenge for cloud computing arises from the presence of numerous redundant memory pages across independent virtual machines (VMs), significantly reducing memory efficiency. For instance, each VM typically loads data from its virtual disk into its memory without considering the existing data in other VMs’ memory. The state-of-the-art solution for addressing memory efficiency is kernel same-page merging (KSM), which performs memory deduplication by merging pages with identical data from different processes on the host. However, KSM operates reactively after memory redundancy has occurred, adding computational overhead due to periodic scanning, rendering it inefficient for cloud computing environments with high-density VMs.In this paper, we propose FlexMem, a preliminary architecture designed to eliminate memory redundancy for VMs. FlexMem’s core is a virtual persistent memory (PMem) device with flexible backing specifications, which is designed to be memory-mapped (mmapped) to sparse and layered qcow2 images. By providing images to VMs in the form of FlexMem, and with the guest’s Direct Access (DAX) enabled, user programs within the guest gain direct access to identical images already cached in the host’s memory. This proactive approach eliminates memory redundancy before VMs’ startup. Our evaluation demonstrates that FlexMem significantly improves memory efficiency and the availability of VMs with reduced hardware costs, ultimately enhancing the competitiveness of cloud vendors.
Loading