Hypervisor Prefetch Cache for Virtual Memory Latency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Virtualized computer systems experience significant latency when accessing swapped-out memory pages due to the time-consuming process of swapping data back into memory, which negatively impacts user experience and performance.

Innovation Solution

The implementation of a prefetching mechanism by virtualization software that identifies and caches swapped-out content from the guest operating system's swap file in the host machine memory, allowing for immediate access from the prefetch cache instead of the disk during I/O operations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If memory pages are swapped out to disk to free physical memory, then physical memory availability is improved, but access latency increases significantly

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

Solution Approach 1:

The system performs preliminary actions by prefetching memory pages from disk to a cache buffer before they are actually needed. The hypervisor monitors guest memory access patterns and proactively loads pages that are likely to be accessed soon, transforming the reactive swap-in process into a proactive prefetching operation that reduces latency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

A cache buffer is introduced as an intermediary layer between the guest virtual memory and the physical disk storage. This buffer temporarily holds swapped-out pages, allowing the system to serve memory access requests from the faster buffer rather than directly from the slower disk, thereby reducing access latency while maintaining physical memory availability.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If multiple virtual machines are hosted on a single host with memory over-commitment, then hardware resource utilization is improved, but memory access performance deteriorates due to frequent swapping

Engineering Contradiction:
Improvehardware resource utilizationVSAvoidmemory access speed
Core Design Contradiction:
ProductivityVSSpeed

Solution Approach 1:

The cache buffer serves multiple functions simultaneously: it acts as extended physical memory for the host, provides prefetching capability to reduce latency, and offers a shared resource that multiple virtual machines can benefit from. This multi-functional design allows the system to maintain high resource utilization while improving memory access performance across multiple VMs.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The system implements self-service by having the hypervisor monitor guest memory access patterns and autonomously decide which pages to prefetch into the cache buffer. This automated approach allows the system to adapt to changing workloads without manual intervention, maintaining optimal performance while supporting memory over-commitment across multiple virtual machines.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS9547600B2Method and system for restoring consumed memory after memory consolidation
Publication Date: 2017.01.17 VMWARE INC
  • US9547600B2 patent drawing
  • US9547600B2 patent drawing
  • US9547600B2 patent drawing

AI summary

One embodiment of the system disclosed herein facilitates reduction of latency associated with accessing content of a memory page that has been swapped out by a guest operating system in a virtualized computer system. During operation, a hypervisor detects an I/O write command issued by the guest operating system at a swap location within the guest operating system's swap file and records the swap location. The hypervisor then prefetches contents of a page stored at the swap location within the guest operating system's swap file into a prefetch cache in host machine memory. Subsequently, the hypervisor detects an I/O read command issued by the guest operating system at the swap location within the swap file. In response, the hypervisor provides contents of the page to the guest operating system from the prefetch cache, thereby avoiding accessing the guest operating system's swap file.