Storage Ballooning for Mobile Virtualization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current mobile virtualization platforms face challenges in optimizing the utilization of limited host disk space, leading to underutilization and potential resource exhaustion due to static storage allocation and inefficient management of shared storage resources between guest and host systems.
Innovation Solution
Implementing a storage ballooning system where the guest system dynamically adjusts its file size based on host disk space availability, using a balloon file that expands or contracts to reflect host storage utilization, allowing for opportunistic recovery of space and avoiding resource exhaustion by marking or discarding blocks and issuing TRIM commands.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If static storage allocation is used for guest VM image on host file system, then storage space is reserved for guest at VM creation time, but storage resources allocated to guest are underutilized since space is statically reserved and unavailable to host
Solution Approach 1:
The patent implements dynamic storage allocation where the guest VM image size on the host file system automatically adjusts based on actual usage. The hypervisor monitors guest storage consumption and expands or contracts the allocated space dynamically, transforming the static allocation model into a dynamic one that adapts to changing requirements, thereby improving both reliability and productivity.
Solution Approach 2:
The system changes the storage allocation parameter from a fixed value determined at VM creation to a variable value that continuously adapts based on guest usage patterns. The hypervisor modifies the allocated storage parameters in real-time, allowing the guest image size to scale with actual needs while freeing unused space for host operations.
2Productivity
If over-provisioning is used by not reserving complete VM image at VM creation, then storage space utilization is improved, but storage space on host may be exhausted and guest I/O may trigger extent allocation that fails
Solution Approach 1:
The hypervisor implements a feedback mechanism that continuously monitors both guest storage requests and host file system space availability. When the guest attempts to allocate storage, the hypervisor checks current host space conditions and dynamically adjusts the allocation decision, providing real-time feedback control that prevents both under-provisioning and exhaustion scenarios.
Solution Approach 2:
The system performs preliminary checks of host file system space availability before allowing guest storage allocations. The hypervisor proactively monitors space conditions and preemptively manages extent allocations, preventing failed I/O operations by ensuring sufficient space is available before guest operations proceed.
3Ease of operation
If manual adjustment of disk image sizes for different VMs is performed, then storage space management can be attempted, but this approach is inefficient and ineffective for managing utilization of available physical disk space
Solution Approach 1:
The system implements self-service storage management where the hypervisor automatically monitors, allocates, and adjusts guest VM image sizes without manual intervention. The hypervisor autonomously manages the guest image file on the host file system, dynamically expanding or contracting storage allocations based on actual usage, eliminating the need for inefficient manual adjustment while maximizing storage utilization.
Data Source
AI summary
One embodiment of the present invention provides a system for managing storage space in a mobile device. During operation, the system detects a decrease in available disk space in a host file system, wherein an image file for a guest system is stored in the host file system. In response to the detected decrease, the system increases a size of a balloon file in a storage of a guest system. The system then receives an indication of a TRIM or discard communication and intercepts the TRIM or discard communication. Next, the system determines that at least one block is free based on the intercepted TRIM or discard communication. Subsequently, the system frees a physical block corresponding to the at least one block in a storage of the host system and reduces a size of the image file for the guest system in accordance with the intercepted TRIM or discard communication.


