Block Cache Thread Model With SPSC Queues for Write I/O Balancing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Virtualized computing environments do not fully realize the performance improvements of modern storage technologies due to inefficiencies in log-based write cache methods, which lead to increased CPU usage, resource contention, and write amplification issues, and conventional thread models result in inefficient I/O operations.

Innovation Solution

Implementing a thread model with single producer single consumer (SPSC) submission queues and completion queues, using a two skip-list-based data structure for log-based write cache, and a range sort algorithm for page-aligned de-stage I/O operations, along with a buffer for scatter gather lists to optimize I/O operations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If conventional log-based write cache methods are used, then write operations can be performed, but CPU usage increases and resource contention overhead increases

Engineering Contradiction:
Improvewrite operation throughputVSAvoidCPU usage
Core Design Contradiction:
ProductivityVSUse of energy by moving object

Solution Approach 1:

The patent segments the write cache management into separate consumer threads that process logs independently, dividing the workload to reduce CPU contention and improve parallel processing efficiency

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a ring buffer as an intermediary structure between the producer thread and consumer threads, allowing efficient log passing without direct CPU contention and enabling asynchronous processing

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If conventional log-based write cache methods are used, then write operations can be performed, but write amplification occurs

Engineering Contradiction:
Improvewrite operation throughputVSAvoidwrite amplification
Core Design Contradiction:
ProductivityVSLoss of substance

Solution Approach 1:

The patent merges multiple write logs into a single consolidated log structure using the ring buffer, reducing the number of separate write operations to the backend storage and eliminating write amplification

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent implements continuous log processing where the ring buffer maintains a continuous stream of logs that are processed sequentially, ensuring that writes are performed only once without redundant operations

Inventive Principle:
Principle #20Continuity of useful action

3Ease of operation

If single dispatcher I/O is used, then I/O operations can be managed, but I/O throughput is limited

Engineering Contradiction:
ImproveI/O management simplicityVSAvoidI/O throughput
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent segments the single dispatcher into multiple consumer threads that each handle I/O operations independently, dividing the workload to increase throughput while maintaining simple per-thread operation logic

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements a dynamic thread model where consumer threads are created and managed based on workload conditions, allowing the system to scale from single dispatcher to multi-threaded operation as needed

Inventive Principle:
Principle #15Dynamics

4Productivity

If multiple interrupts are used for I/O operations, then I/O operations can be dispatched, but I/O efficiency decreases

Engineering Contradiction:
ImproveI/O operation speedVSAvoidI/O efficiency
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The patent implements continuous I/O processing where consumer threads process I/O operations without interruption, eliminating the overhead of multiple interrupts and improving overall I/O efficiency

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS20250383936A1Block cache storage thread model
Publication Date: 2025.12.18 MICROSOFT TECHNOLOGY LICENSING LLC
  • US20250383936A1 patent drawing
  • US20250383936A1 patent drawing
  • US20250383936A1 patent drawing

AI summary

Requests for a write storage operation are stored in a ring buffer. The write storage operations are executed using polling threads and cache de-stage threads. Dispatchers and worker threads are created for executing the polling threads and cache de-stage threads. Queue pairs for each pair of dispatchers and worker threads are generated. The queue pairs comprise a submission queue and a completion queue. The next available request is retrieved from the ring buffer. A scoring algorithm is used to load balance the queue pairs associated with the worker threads, the scoring algorithm operable to determine a score based a current depth of the submission queue and completion queue.