Intra-VM Memory Page Sharing via Pattern Matching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing virtualized systems face inefficiencies in memory page sharing due to high overhead from hash computation and content comparison, particularly in systems where maintaining a common shared context across virtual machines is not feasible or desirable.

Innovation Solution

A lightweight technique for identifying guest pages with simple patterns, allowing for intra-VM sharing of pages with regular expressions or patterns, while inter-VM sharing is reserved for pages without such patterns, reducing the need for global locks and improving lookup efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If hash computation and content comparison are used to identify duplicate pages for sharing, then page sharing accuracy is improved, but system overhead and processing time increase significantly

Engineering Contradiction:
Improvepage sharing accuracyVSAvoidprocessing time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The page identification process is segmented into multiple stages: first using lightweight fingerprints (first set of identifiers) for quick initial matching, then using full hash computation (second set of identifiers) only for pages that pass the initial filter. This hierarchical segmentation reduces the number of expensive hash computations while maintaining accurate duplicate detection.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Instead of performing complete hash computation and content comparison on all pages, the system performs partial action by first computing lightweight fingerprints for all pages and only performing full hash computation on pages that match at the fingerprint level. This partial approach significantly reduces processing overhead while maintaining sharing accuracy.

Inventive Principle:
Principle #16Partial or excessive action

2Adaptability or versatility

If a common shared context is maintained across all virtual machines for page sharing, then inter-VM page sharing is enabled, but system complexity and lock management overhead increase

Engineering Contradiction:
Improveinter-VM page sharing capabilityVSAvoidsystem complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The shared context is segmented into per-VM components rather than a single global context. Each virtual machine maintains its own page sharing context and metadata structures, allowing independent operation and reducing the need for global locks. This segmentation enables inter-VM sharing through controlled interfaces while maintaining system modularity.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

An intermediary mechanism is introduced to facilitate sharing between VMs without requiring direct access to each other's contexts. The hypervisor acts as a mediator that manages cross-VM page sharing through standardized interfaces, reducing system complexity by abstracting the sharing logic away from individual VMs.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Measurement precision

If periodic exhaustive searches for duplicate pages are performed, then all sharing opportunities are detected, but processing overhead and time consumption become prohibitive

Engineering Contradiction:
Improveduplicate detection completenessVSAvoidprocessing efficiency
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

Preliminary action is taken by computing lightweight fingerprints for all pages during page allocation or modification, rather than waiting for periodic exhaustive searches. This preliminary indexing allows the system to quickly identify potential duplicates when pages are created or modified, capturing sharing opportunities at the source without requiring costly periodic scans.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

Instead of performing exhaustive searches on all pages periodically, the system performs partial action by using lightweight fingerprint comparison as a filter before initiating full duplicate verification. This approach processes only the necessary subset of pages while maintaining comprehensive duplicate detection capability.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS9152573B2Sharing memory pages having regular expressions within a virtual machine
Publication Date: 2015.10.06 VMWARE INC
  • US9152573B2 patent drawing
  • US9152573B2 patent drawing
  • US9152573B2 patent drawing

AI summary

A lightweight technique for sharing memory pages within a virtual machine (VM) is provided. This technique can be used on its own to implement intra-VM page sharing or it can be augmented with sharing across VMs. Memory pages whose content can be described by some succinct grammar, such as a regular expression or simple pattern, are identified for sharing within a VM. If the content of a page matches some simple pattern, it is proposed to share such a page, but only in the scope of the VM to which it belongs, i.e., intra-VM sharing. All other pages, i.e., those that are not simple patterns, can be candidates for sharing in the scope of all currently active VMs, i.e., inter-VM sharing. Either fully functional page sharing across VMs and/or page sharing in the context of each VM can be implemented.