Guest Page Hints for Hypervisor Memory Deduplication

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing memory deduplication techniques in virtual machines are inefficient due to the high cost of write-protecting memory pages and scanning large ranges for duplicates, leading to performance slowdowns and increased processing costs.

Innovation Solution

The hypervisor receives a list of read-only memory page hints from virtual machine guests, allowing it to target specific memory pages for deduplication, reducing unnecessary comparisons and processing costs, and improving memory usage efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If the hypervisor scans all memory pages to identify duplicates, then memory deduplication is achieved, but processing time and computational cost increase significantly

Engineering Contradiction:
Improvememory utilizationVSAvoidprocessing time
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The hypervisor applies write protection to memory pages in advance before scanning for duplicates. This preliminary action prevents any pages from being modified during the deduplication process, ensuring that only stable, read-only pages are considered for deduplication. By filtering out writeable pages beforehand using the page hints data structure, the system avoids wasting processing time on pages that would be modified anyway, thus resolving the contradiction between achieving deduplication and minimizing processing time.

Inventive Principle:
Principle #10Preliminary action

2Measurement precision

If the hypervisor write-protects memory pages before scanning, then duplicate detection accuracy is improved, but system performance slows down due to page faults

Engineering Contradiction:
Improveduplicate detection accuracyVSAvoidsystem performance
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

Instead of uniformly write-protecting all memory pages, the system applies write protection selectively only to pages marked as read-only in the page hints data structure. This local quality approach ensures that write protection is applied only where necessary for accurate duplicate detection, while leaving other pages unaffected. The page hints data structure enables this selective treatment by providing information about which pages are genuinely read-only versus which are writeable, thus improving duplicate detection accuracy without causing widespread performance slowdowns.

Inventive Principle:
Principle #3Local quality

3Quantity of substance

If the hypervisor scans large ranges of memory pages, then comprehensive deduplication is achieved, but computational cost and processing overhead increase

Engineering Contradiction:
Improvememory deduplication coverageVSAvoidcomputational cost
Core Design Contradiction:
Quantity of substanceVSUse of energy by moving object

Solution Approach 1:

The system extracts and processes only the subset of memory pages that are marked as read-only in the page hints data structure, rather than scanning the entire memory space. By taking out only the relevant read-only pages for deduplication processing, the system significantly reduces computational cost and processing overhead while still achieving comprehensive deduplication coverage for all eligible pages. This extraction approach filters out writeable pages that would not be suitable for deduplication, thereby reducing the scanning range and associated energy consumption.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS11429416B2Memory deduplication based on guest page hints
Publication Date: 2022.08.30 RED HAT ISRAEL
  • US11429416B2 patent drawing
  • US11429416B2 patent drawing
  • US11429416B2 patent drawing

AI summary

Methods, systems, and computer program products are included for de-duplicating one or more memory pages. A method includes receiving, by a hypervisor, a list of read-only memory page hints from a guest running on a virtual machine. The list of read-only memory page hints specifies a first memory page marked as writeable. The method also includes determining whether the first memory page matches a second memory page. In response to a determination that the first memory page matches the second memory page, the hypervisor may deduplicate the first and second memory pages.