Content-Based Swap Candidate Selection for Hypervisor Memory Management
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Hypervisors lack the ability to selectively choose swap candidate pages based on their sharability or compressibility, leading to inefficient memory reclamation and performance penalties in memory overcommitted scenarios.
Innovation Solution
Implementing a content-based swap candidate selection algorithm that identifies sharable or compressible memory pages by checking metadata and compression ratios, allowing the hypervisor to build an optimized list of swap candidates for host swapping.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If the hypervisor uses traditional host swapping to reclaim memory pages, then physical memory can be recovered, but disk access latency increases significantly (orders of magnitude slower than shared or ballooned pages)
Solution Approach 1:
The hypervisor performs preliminary checks on swap candidate pages to determine if they are sharable or compressible before actually swapping them out to disk. This preliminary classification allows the system to prioritize pages that can be handled through faster mechanisms (page sharing or memory compression) and only resort to slow disk swapping for pages that cannot be optimized, thereby reducing overall disk access latency while maintaining effective memory reclamation
2Loss of time
If the hypervisor performs page sharing or memory compression on swap candidate pages, then performance improves due to reduced disk access, but the amount of physical memory reclaimed is reduced compared to pure host swapping
Solution Approach 1:
The hypervisor applies different quality treatments to different swap candidate pages based on their individual characteristics. Sharable pages receive page sharing treatment, compressible pages receive memory compression treatment, and non-sharable/non-compressible pages receive traditional host swapping. This localized quality approach ensures that each page is handled by the most appropriate mechanism, optimizing both performance and memory reclamation efficiency for the overall system
3Productivity
If the hypervisor randomly selects swap candidate pages without content-based filtering, then the selection process is simple and fast, but the effectiveness of page sharing and memory compression is reduced
Solution Approach 1:
The hypervisor performs preliminary classification of swap candidate pages based on their content characteristics (sharability and compressibility) before the actual swapping operation. This preliminary action involves checking page metadata and potentially sampling page content to determine the optimal handling mechanism, which increases selection complexity but dramatically improves memory reclamation efficiency by ensuring pages are processed through the most effective path
Data Source
AI summary
Techniques for building a list of swap candidate pages for host swapping are provided. In one embodiment, a host system can determine a swap target virtual machine (VM) and a target number of swap candidate pages. The host system can further select a memory page from a memory space of the swap target VM and can check whether the memory page is sharable or compressible. If the memory page is sharable or compressible, the host system can add the memory page to the list of swap candidate pages.


