Paravirtualized Block Deallocation in Virtual Machines
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional virtual machine systems inefficiently manage storage allocation, leading to unnecessary growth of image files due to the inability to promptly reuse deleted data blocks, which reduces the benefits of thin provisioning and impacts system performance.
Innovation Solution
A paravirtualized mechanism is implemented, where an I/O device driver in the guest operating system intercepts block deallocation operations and communicates with the hypervisor to immediately deallocate data blocks, using standardized interfaces like VIRTIO API to facilitate efficient block deallocation and reuse.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If conventional image file allocation is used in virtual machines, then storage blocks are allocated to virtual machine hard drives, but the image files unnecessarily inflate in volume because deleted blocks cannot be easily reused by the host
Solution Approach 1:
The hypervisor proactively identifies and deallocates storage blocks before they are needed again, by monitoring write operations and detecting zero-filled blocks. This preliminary action prevents the accumulation of unused blocks in image files, enabling timely reuse of storage space by the host system.
Solution Approach 2:
The system implements a feedback mechanism where the hypervisor continuously monitors write operations to virtual machine storage, detects zero-filled blocks, and triggers deallocation. This closed-loop feedback ensures that storage blocks are efficiently reclaimed and made available for reuse, preventing image file inflation.
2Quantity of substance
If a utility in the virtual machine periodically writes zeros to deallocated blocks, then the hypervisor can detect and free these blocks, but free blocks are regained only periodically and image files can still inflate in the interim
Solution Approach 1:
Instead of waiting for periodic zero-write operations, the hypervisor proactively identifies deallocated blocks immediately when they become unused in the virtual machine. This preliminary action eliminates the time delay associated with periodic detection and enables immediate reuse of storage blocks by the host.
Solution Approach 2:
The system transitions from periodic batch processing of block deallocation to continuous monitoring and immediate deallocation. By continuously tracking storage operations and instantly freeing blocks when they become unused, the system maintains continuous storage optimization without idle periods where blocks remain allocated but unused.
3Quantity of substance
If the hypervisor checks and compares all written blocks to zero, then deallocated blocks can be freed, but the checking and comparing operations are not efficient and reduce the performance of the system
Solution Approach 1:
The system extracts and processes only the specific subset of blocks that are actually deallocated and zero-filled, rather than checking and comparing all written blocks. This selective extraction of relevant blocks for deallocation significantly reduces the computational overhead while maintaining accurate identification of reusable storage space.
Solution Approach 2:
The virtual machine's own write operations and deletion actions serve as the trigger for hypervisor intervention. When the VM writes zeros or deletes data, these actions automatically signal the hypervisor to initiate deallocation, eliminating the need for the hypervisor to proactively check and compare all blocks. The system uses the VM's own operations to drive the optimization process.
Data Source
AI summary
A system and method deallocates data blocks in virtual environments with high efficiency. A computer system hosting a virtual machine includes an I/O device driver in the guest operating system of the virtual machine. The I/O device driver intercepts an operation performed by the guest operating system that causes a data block to be deallocated in the virtual machine. The I/O device driver informs a hypervisor of the computer system that the data block is to be deallocated. The hypervisor then instructs the data storage to deallocate the data block for reuse.


