Virtual Machine Memory Ballooning for Host-Guest Page Alignment
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Virtual machines inefficiently manage memory resources due to inconsistencies in page sizes between the host and guest operating systems, leading to memory waste and underutilization.
Innovation Solution
A method for virtual machine memory management that aligns memory page sizes and addresses between the host and guest systems, allowing for accurate release of free memory pages to the host, using a Balloon simulation device and enhanced Balloon driver capabilities to ensure overcommitment of memory resources.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the virtual machine applies for memory resources based on service demand, then the memory resources can be allocated to meet peak demands, but memory resources are occupied but unused during valley states
Solution Approach 1:
The patent implements dynamic memory resource adjustment through memory ballooning technology. The virtual machine can dynamically expand its memory allocation during peak service demands and contract during valley states. The Balloon driver and Balloon simulation device enable the virtual machine to dynamically adjust its memory footprint, allowing memory resources to be released back to the host when not needed, thus resolving the contradiction between ensuring availability and preventing waste.
2Productivity
If memory ballooning technology is used to enable memory release, then free memory resources can be obtained and released, but the attributes of memory resources must be identical between guest and host
Solution Approach 1:
The patent changes the parameter of memory page size alignment by introducing a memory translation mechanism. The Balloon simulation device translates the memory page size attributes between the virtual machine and host, allowing the virtual machine to release memory resources even when the guest and host have different page size attributes. This parameter transformation enables memory release without requiring identical attributes, resolving the contradiction between productivity and adaptability.
3Loss of substance
If the virtual machine releases memory resources, then memory waste is reduced, but the release fails when page sizes between virtual machine and host are inconsistent
Solution Approach 1:
The patent introduces a Balloon simulation device as an intermediary between the virtual machine and the host memory system. This intermediary component handles the memory translation and attribute transformation, enabling successful memory release even when the virtual machine and host have inconsistent page size attributes. The Balloon driver acts as a mediator that coordinates the memory release process, ensuring reliability while reducing memory waste.
Data Source
AI summary
A virtual machine memory management method, computing device, and non-transitory computer-readable storage medium are provided. The method includes obtaining first information about a memory page managed by a host machine corresponding to the virtual machine, obtaining second information about a memory page of the virtual machine, determining a target free memory page that meets a release condition from a free memory page of the virtual machine based on the first information and the second information, and releasing the target free memory page. The release condition includes a starting address of the target free memory page in the virtual machine being same as the starting address of the memory page managed by the host machine, and a total memory size of consecutive free memory pages starting from the starting address of the target free memory page being equal to the size of the memory page managed by the host machine.


