Content-Based Swap Candidate Selection for Hypervisor Memory Management

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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)

Engineering Contradiction:
Improvephysical memory reclamationVSAvoiddisk access latency
Core Design Contradiction:
Quantity of substanceVSLoss of time

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

Inventive Principle:
Principle #10Preliminary action

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

Engineering Contradiction:
Improvepage access latencyVSAvoidphysical memory reclamation
Core Design Contradiction:
Loss of timeVSQuantity of substance

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

Inventive Principle:
Principle #3Local quality

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

Engineering Contradiction:
Improvememory reclamation efficiencyVSAvoidswap candidate selection complexity
Core Design Contradiction:
ProductivityVSDevice complexity

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

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS9342344B2Content-based swap candidate selection
Publication Date: 2016.05.17 VMWARE INC
  • US9342344B2 patent drawing
  • US9342344B2 patent drawing
  • US9342344B2 patent drawing

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.