Speculative Write Prefetch Control via Queue Depth

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing disk systems face data loss issues due to speculative write prefetching, which is detrimental in high reliability systems and applications where write data is not guaranteed to be written in the order specified, leading to potential data loss during power failures or unusual operations.

Innovation Solution

Implementing a queue switch and queue counter to selectively control speculative write prefetching, determining its benefit over time and enabling or disabling it based on the effectiveness in improving disk operations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If speculative write prefetching is performed to improve disk benchmark performance, then disk operations speed is improved, but data loss risk increases during power failures or unusual operations

Engineering Contradiction:
Improvedisk operations speedVSAvoiddata integrity
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system dynamically adjusts the prefetching behavior based on command queue depth. When the queue depth exceeds a threshold, speculative write prefetching is enabled to maximize performance. When the queue depth is below the threshold, prefetching is disabled to prevent data loss. This dynamic adaptation resolves the contradiction by making the system's prefetching behavior flexible rather than fixed.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the operational parameter of write prefetching based on queue depth conditions. By monitoring the number of commands in the queue and comparing it to a threshold, the system switches between two states: enabling prefetching when queue depth is high (improving productivity) and disabling it when queue depth is low (maintaining reliability). This parameter change strategy allows the system to optimize performance only when safe to do so.

Inventive Principle:
Principle #35Parameter changes

2Productivity

If write data is temporarily stored in buffer memory to speed up disk operations, then system performance is improved, but data loss occurs when power failure happens before data is written

Engineering Contradiction:
Improvesystem performanceVSAvoiddata loss
Core Design Contradiction:
ProductivityVSObject-generated harmful factors

Solution Approach 1:

The system performs a preliminary check of the command queue depth before enabling speculative write prefetching. Only when the queue depth indicates sufficient buffer capacity (above threshold) does the system proceed with prefetching. This preliminary action ensures that data is only prefetched when there is safe capacity to hold it, preventing the harmful effect of data loss while still allowing performance improvement when conditions permit.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS7526604B1Command queueing speculative write prefetch
Publication Date: 2009.04.28 NVIDIA CORP
  • US7526604B1 patent drawing
  • US7526604B1 patent drawing
  • US7526604B1 patent drawing

AI summary

Method and apparatus for improving system performance using controlled speculative write prefetching in systems that use command queuing. Speculative write prefetching can be forced on or off, or a determination can be made regarding the benefit versus detriment of speculative write prefetching. The state of the queue switch can be used to determine if speculative write prefetching is to be performed. The state of the queue switch can be set by a queue counter that tracks over time whether speculative write prefetching is or is not beneficial. The content of the queue counter can be controlled by incrementing its value if speculative write prefetching helped and decrementing that value if speculative write prefetching did not help.