VM Migration Speedup via Free Page Hinting

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing virtual machine migration techniques require copying all memory pages, regardless of usage, leading to inefficiency and preventing the source VM from being destroyed until the entire memory is copied, which hinders resource reuse and performance.

Innovation Solution

The system and method involve a hypervisor that determines which pages of a source VM are in use and maps unused pages to external physical memory, such as a zero page, avoiding unnecessary copying and allowing the destination VM to execute without full memory duplication, thereby enabling efficient migration and resource reuse.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If all memory pages are copied during VM migration, then the destination VM can execute with complete memory contents, but the migration time increases and source VM memory cannot be reused

Engineering Contradiction:
Improvememory completenessVSAvoidmigration time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The memory migration process is segmented into two distinct phases: a copy phase for pages that will be accessed and a map phase for pages that won't be accessed. This segmentation allows the system to selectively copy only necessary pages while mapping others to external storage, reducing overall migration time while ensuring memory completeness for executed code.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements preliminary action by starting the destination VM execution before completing the full memory copy. The system begins copying memory pages in parallel with VM execution, and uses demand-paging mechanisms to copy pages on-demand during execution, rather than waiting for complete memory duplication before starting the VM.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If all memory pages are copied during VM migration, then the destination VM has complete memory contents, but the source VM's memory resources cannot be reused

Engineering Contradiction:
Improvememory completenessVSAvoidresource reuse efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

Memory pages are segmented into two categories: copied pages and mapped pages. Copied pages are fully duplicated to the destination VM, while mapped pages are referenced from external storage. This segmentation enables the source VM's memory to be released and reused while maintaining complete memory functionality at the destination through the combination of copied and mapped pages.

Inventive Principle:
Principle #1Segmentation

3Productivity

If unused pages are mapped to external memory instead of copied, then migration efficiency improves, but the system complexity increases

Engineering Contradiction:
Improvemigration efficiencyVSAvoidmemory management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent introduces an intermediary mechanism in the form of a page table with two types of entries: copy-on-demand entries and map-on-demand entries. This intermediary structure manages the complexity of differentiated memory handling by providing a unified interface that automatically routes page accesses to either copied or externally-mapped storage based on the entry type, thereby improving migration efficiency while containing system complexity within the memory management subsystem.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS10503659B2Post-copy VM migration speedup using free page hinting
Publication Date: 2019.12.10 RED HAT ISRAEL
  • US10503659B2 patent drawing
  • US10503659B2 patent drawing
  • US10503659B2 patent drawing

AI summary

A system and methods for migrating a virtual machine (VM). In one embodiment, a hypervisor receives a request to migrate the contents of a memory of a source VM in a first physical memory area to a destination VM in a second physical memory area, where the first and second physical memory areas are disjoint. The hypervisor executes the destination VM in response to the request, and detects an access of a page of memory of the destination VM. The hypervisor determines, in view of a data structure maintained by a guest operating system executing in the destination VM, that a first page of a memory of the source VM in the first physical memory area is currently in use by the destination VM. In response to the detecting, the hypervisor: copies, in view of the first page of VM memory being used by the destination VM, the contents of the first page to a corresponding page of the destination VM; and maps, in view of a second page of VM memory not being used by the destination VM, (i) a physical memory page that is external to the first physical memory area and to the second physical memory area to (ii) a page of the destination VM corresponding to the second page.