Hypervisor Memory Ballooning with Contiguous Page Allocation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Memory ballooning techniques in virtualized systems face challenges due to memory fragmentation when allocating guest memory, leading to performance degradation as they either break up contiguous memory or allocate multiple non-contiguous portions, which affects the ability to satisfy large memory requests efficiently.

Innovation Solution

Implementing a memory allocation method that allows the hypervisor to specify a size range for guest memory, enabling the identification and release of contiguous memory within that range to minimize fragmentation, thereby inflating a memory balloon with a set of guest memory that exactly matches the request without breaking up or combining memory pages.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If memory ballooning techniques allocate guest memory by breaking up contiguous memory or allocating multiple non-contiguous portions, then memory can be reclaimed for reallocation, but memory fragmentation occurs leading to performance degradation

Engineering Contradiction:
Improvememory reclamation capabilityVSAvoidperformance stability
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent segments the memory allocation problem by introducing a size range parameter (minimum and maximum sizes) that allows the system to selectively allocate memory portions. This segmentation enables the hypervisor to choose between allocating a single contiguous portion within the range or multiple non-contiguous portions, balancing fragmentation concerns with allocation flexibility.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements dynamic memory allocation by allowing the hypervisor to specify a flexible size range rather than a fixed size. This dynamic approach enables the system to adapt to available memory conditions, choosing to allocate a single contiguous block when possible (reducing fragmentation) or multiple blocks when necessary (maintaining allocation success).

Inventive Principle:
Principle #15Dynamics

2Reliability

If contiguous memory is allocated to satisfy large memory requests, then performance is maintained, but the ability to satisfy exact memory requests is reduced due to memory fragmentation

Engineering Contradiction:
Improveperformance stabilityVSAvoidmemory request satisfaction efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent changes the allocation parameter from a fixed memory size to a size range (minimum and maximum). This parameter change allows the system to search for contiguous memory within the specified range, improving the likelihood of satisfying large memory requests while maintaining performance. The range parameter provides flexibility to adapt to fragmented memory conditions.

Inventive Principle:
Principle #35Parameter changes

3Adaptability or versatility

If multiple non-contiguous memory portions are allocated, then memory allocation flexibility is improved, but memory fragmentation increases causing performance degradation

Engineering Contradiction:
Improveallocation flexibilityVSAvoidperformance stability
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent applies partial action by allowing the hypervisor to specify a minimum and maximum size range, where the actual allocation can be any value within this range. This partial specification enables the system to allocate exactly what is needed (or close to it) while maintaining the option to allocate slightly more or less depending on memory availability and fragmentation conditions.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS12190171B2Memory ballooning related memory allocation techniques for execution environments
Publication Date: 2025.01.07 RED HAT LLC
  • US12190171B2 patent drawing
  • US12190171B2 patent drawing
  • US12190171B2 patent drawing

AI summary

Systems and methods for ballooning related memory allocation techniques for execution environments. An example method may comprise maintaining, by an operating system of a hypervisor, a list of free memory pages associated with the execution environment, wherein each entry in the list references a set of memory pages that are contiguous in a guest address space; receiving, from a management application, a request for guest memory to be made available to the hypervisor, wherein the request comprises a minimum size of guest memory requested and a maximum size of guest memory; and responsive to identifying, by the operating system, in the list of free memory pages, a set of contiguous guest memory pages that is greater than or equal to the minimum size of memory requested, and less than or equal to the maximum size of memory requested, releasing the set of contiguous guest memory pages to the hypervisor.