Hypervisor TRIM Command Translation for SSD Storage Reclamation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In conventional virtualization architectures, guest operating systems can only issue SCSI compliant commands, which limits the ability to inform the hypervisor about data blocks no longer needed for garbage collection in solid-state drives, leading to inefficient storage reclamation and increased fragmentation.
Innovation Solution
Exposing a virtual solid-state memory device to the hypervisor as a logical storage unit, allowing it to receive TRIM commands, which are translated into SCSI UNMAP commands to invalidate data blocks, enabling efficient garbage collection by determining the locations to be deleted using file descriptors.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If virtual disks are exposed as SCSI compliant devices to guest operating systems, then compatibility with guest operating systems is improved, but the ability to efficiently reclaim storage in underlying solid-state drives is worsened
Solution Approach 1:
The patent introduces a hypervisor layer as an intermediary between the guest operating system and the physical solid-state drive. The hypervisor translates SCSI UNMAP commands from the guest OS into TRIM commands that the solid-state drive can execute, enabling efficient storage reclamation while maintaining SCSI compatibility for the guest system.
Solution Approach 2:
The patent changes the command translation parameters by mapping specific SCSI UNMAP commands to corresponding TRIM commands. This parameter transformation allows the system to convert between different command sets, enabling the guest OS to use standard SCSI commands while the underlying solid-state drive receives optimized TRIM commands for efficient garbage collection.
2Adaptability or versatility
If only UNMAP commands are available to guest operating systems, then SCSI compatibility is maintained, but data block invalidation efficiency is worsened
Solution Approach 1:
The hypervisor acts as an intermediary that translates SCSI UNMAP commands into TRIM commands. This translation mechanism allows the guest operating system to maintain SCSI compatibility while the underlying solid-state drive receives TRIM commands that enable faster and more efficient garbage collection, reducing the time required for storage reclamation.
Solution Approach 2:
The patent substitutes the mechanical SCSI command translation process with a more efficient TRIM command mechanism. By replacing the traditional SCSI-based storage management approach with TRIM command support, the system achieves faster garbage collection performance while maintaining compatibility through the hypervisor translation layer.
3Device complexity
If TRIM commands are not translated to UNMAP commands, then command translation complexity is reduced, but storage fragmentation increases
Solution Approach 1:
The hypervisor serves as an intermediary that performs the necessary command translation from TRIM to UNMAP. This translation layer manages the complexity of converting between different command sets while maintaining data integrity and preventing fragmentation. The hypervisor tracks the mapping between virtual and physical blocks, ensuring proper invalidation without increasing fragmentation.
Solution Approach 2:
The system implements feedback mechanisms where the hypervisor monitors the translation of TRIM commands to UNMAP commands and adjusts the mapping accordingly. This feedback loop ensures that data block invalidation is properly tracked and communicated, preventing fragmentation by ensuring that only truly unused blocks are marked for reclamation.
Data Source
AI summary
A computer system that employs a solid-state memory device as a physical storage resource includes a hypervisor that is capable of supporting TRIM commands issued by virtual machines running in the computer system. When a virtual machine issues a TRIM command to its corresponding virtual storage device to invalidate data stored therein, the TRIM command is received at an interface layer in the hypervisor that translates the TRIM command to a SCSI command known as UMMAP. A SCSI virtualization layer converts the UNMAP command to a file system command to delete portions of the virtual storage device that is maintained as a file in the hypervisor's file system. Upon receiving the delete commands, the hypervisor's file system driver generates a TRIM command to invalidate the data stored in the solid-state memory device at locations corresponding to the portions of the file that are to be deleted.


