Virtual Disk Block Rearrangement for VM Boot Optimization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The loading and execution of virtual machines from virtual disks are slow and inefficient due to increased latency and seek times caused by adjacent blocks being written to distant locations on a physical disk, resulting in slower boot-up processes compared to loading a host operating system directly from a physical disk.
Innovation Solution
A method and system that uses trace data to physically rearrange and replicate blocks in virtual disks to reflect the read order, moves them to buffer memory, and prefetches blocks for cache storage during the startup process, optimizing I/O operations and reducing latency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If virtual machine blocks are stored in virtual disk files on physical disk, then virtual machines can be loaded and executed, but adjacent blocks are written to distant locations on physical disk causing increased latency and seek times
Solution Approach 1:
The system performs preliminary actions by creating a trace file during the first boot-up process that records the actual read order of blocks. This trace data is then used in subsequent boot-ups to prefetch blocks in the correct order before they are needed, eliminating the need to wait for sequential disk seeks. The preliminary trace collection enables optimized prefetching in future operations.
Solution Approach 2:
The system provides beforehand cushioning by implementing a prefetch mechanism that reads blocks into memory ahead of time based on the trace file. This cushioning effect ensures that blocks are already available in memory when needed during the boot-up process, preventing I/O latency from occurring in the first place rather than just mitigating it.
2Productivity
If blocks are read sequentially from virtual disk during startup, then the startup process can execute, but the process executes more slowly compared to loading host operating system directly from physical disk
Solution Approach 1:
The system performs preliminary actions by creating a trace file during the first boot-up process that records the actual read order of blocks. This trace data is then used in subsequent boot-ups to prefetch blocks in the correct order before they are needed, eliminating the need to wait for sequential disk seeks. The preliminary trace collection enables optimized prefetching in future operations.
Solution Approach 2:
The system creates a copy of the necessary block data from the virtual disk into the host system's memory through prefetching. Instead of reading blocks sequentially from the virtual disk during each boot-up, the system copies blocks into memory in advance based on trace information, allowing the startup process to execute from memory rather than from the slower virtual disk file on physical storage.
3Reliability
If virtual machines are loaded from virtual disks with scattered block locations, then virtual machine execution is enabled, but I/O operations experience increased seek times
Solution Approach 1:
The system creates a copy of the necessary block data from the virtual disk into the host system's memory through prefetching. Instead of reading blocks sequentially from the virtual disk during each boot-up, the system copies blocks into memory in advance based on trace information, allowing the startup process to execute from memory rather than from the slower virtual disk file on physical storage.
Solution Approach 2:
The system substitutes the mechanical disk seek operation with a memory-based prefetch operation. Instead of relying on the physical disk's mechanical seek mechanism to retrieve blocks in scattered locations, the system uses software-based prefetching that reads blocks into memory in the correct order, replacing the slow mechanical process with a faster software-controlled process.
Data Source
AI summary
The disclosed embodiments provide a system that manages the use of a virtual disk. During operation, the system obtains trace data associated with a startup process that reads blocks from the virtual disk. Next, the system physically rearranges the blocks based on the trace data to increase the speed of the startup process. During execution of the startup process, the system also determines a progress of the startup process and uses the progress and the trace data to prefetch blocks from the virtual disk for use by the startup process.


