Log-Based Block Cache De-Staging with Overlap-Aware Write Merging
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional log-based write cache methods in virtualized computing environments do not fully leverage the performance improvements of modern storage technologies like SSD and SCM, leading to inefficiencies such as increased CPU usage, resource contention, and write amplification due to sequential processing and inefficient overlap checking.
Innovation Solution
Implementing a logical data structure for merging logs and using a thread model with single producer single consumer (SPSC) submission queues and completion queues to optimize I/O operations, along with a scoring algorithm for load balancing, to reduce latency and resource consumption.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If conventional log-based write cache methods are used with sequential processing, then data integrity is maintained, but I/O latency increases and throughput decreases
Solution Approach 1:
The patent segments the log processing into multiple parallel worker threads (e.g., 4 workers handling 16 logs simultaneously) instead of sequential processing. Each worker independently processes logs from the ring buffer, enabling parallel de-staging operations that increase throughput and reduce latency without compromising data integrity through proper synchronization mechanisms.
Solution Approach 2:
The patent implements preliminary overlap checking before submitting I/O operations to backend storage. The system checks for overlapping I/O ranges in advance, merges overlapping logs proactively, and only then submits consolidated operations to storage. This preliminary action prevents redundant I/O operations and reduces overall latency.
2Ease of manufacture
If additional backend tasks and threads are added for log compaction and merging, then storage efficiency improves, but CPU usage and resource contention increase
Solution Approach 1:
The patent implements self-service log merging where worker threads automatically detect and merge overlapping logs during their normal processing flow. The system uses data structures like skip lists and interval trees that enable workers to self-organize and consolidate logs without requiring separate compaction threads or centralized coordination, thereby improving storage efficiency while minimizing additional CPU overhead.
Solution Approach 2:
The patent combines multiple functions into the worker threads: logging, overlap detection, log merging, and I/O submission all occur within the same parallel worker processes. This consolidation eliminates the need for separate backend tasks and threads, achieving storage efficiency through intelligent merging while avoiding the CPU overhead of additional dedicated compaction threads.
3Productivity
If log overlap checking is performed to avoid write amplification, then I/O efficiency improves, but processing complexity increases
Solution Approach 1:
The patent introduces intermediary data structures (ring buffer, skip lists, interval trees) that mediate between log arrival and I/O submission. These intermediaries automatically track I/O ranges and detect overlaps without requiring complex processing logic in the workers. The ring buffer serves as an intermediary queue that organizes logs chronologically, while skip lists provide efficient intermediary indexing for overlap detection, simplifying the overall processing complexity.
Solution Approach 2:
The patent replaces manual or sequential overlap checking mechanics with algorithmic substitutions using data structures optimized for range queries. Skip lists and interval trees provide O(log n) overlap detection instead of O(n) sequential checking, and merge interval arithmetic automates the merging process. This substitution reduces processing complexity while maintaining high I/O efficiency.
Data Source
AI summary
Requests for a write storage operation are stored in a ring buffer. The next available request is retrieved from the ring buffer. When the next available request comprises a write operation that overlaps in a logical address range with a previous request stored in the ring buffer, the next available request is suspended. The next available request and the previous request are merged to generate a single request that includes logical address ranges of the next available request and the previous request.


