SSD Write Amplification Reduction via Fence Command Caching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Write amplification in solid-state drives (SSDs) leads to rapid degradation of SSD integrity, particularly due to small write commands that increase in size and frequency, causing significant overhead and reducing the lifespan of SSDs, especially exacerbated by flush commands in journal-based file systems.

Innovation Solution

Implementing a 'fence' command that allows caching and grouping of write commands, enabling their issuance to non-volatile memory without immediate persistence, thereby reducing write amplification and maintaining data coherency without the need for immediate SSD writes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If flush commands are issued to maintain data coherency in journal-based file systems, then data integrity is improved, but write amplification increases significantly

Engineering Contradiction:
Improvedata coherencyVSAvoidwrite amplification
Core Design Contradiction:
ReliabilityVSLoss of energy

Solution Approach 1:

The patent introduces a preliminary action by adding a fence command between data writes and journal updates. This fence command establishes an ordering constraint that allows the system to defer actual SSD writes until necessary, preventing premature writes that would cause write amplification. The fence command acts as a placeholder that maintains data coherency semantics without immediately triggering the write operations that consume SSD write cycles.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The fence command serves as an intermediary between data writes and journal updates. Rather than directly writing both data and journal to the SSD, the fence command mediates the ordering relationship, allowing the system to batch and coordinate writes more efficiently. This intermediary mechanism enables the filesystem to maintain coherency requirements while reducing the total number of write operations to the SSD.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If small write commands are issued to SSDs, then fine-grained data updates are enabled, but write amplification increases due to minimum write requirements

Engineering Contradiction:
Improvedata update granularityVSAvoidwrite amplification
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The patent merges multiple small write operations into larger batched writes. By using the fence command to establish ordering constraints, the system can accumulate data writes and journal updates that can be combined into single write operations to the SSD. This merging of operations maintains the fine-grained update capability at the software level while presenting larger, more efficient write operations to the SSD, thereby reducing write amplification.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The fence command performs a preliminary action by establishing write ordering constraints before actual writes occur. This allows the filesystem to plan and batch write operations in advance, converting multiple small writes into fewer, larger writes that meet SSD minimum write requirements. The preliminary ordering constraint enables efficient write coalescing without sacrificing data update granularity.

Inventive Principle:
Principle #10Preliminary action

3Ease of manufacture

If all pages in a block are erased before new data is written, then SSD write operations are simplified, but existing data must be migrated causing additional writes

Engineering Contradiction:
Improvewrite operation simplicityVSAvoidwrite efficiency
Core Design Contradiction:
Ease of manufactureVSProductivity

Solution Approach 1:

The fence command enables preliminary action by establishing write ordering constraints before erase operations occur. This allows the system to identify and migrate existing data that needs to be preserved before the block is erased. By planning data migration in advance based on the fence command ordering, the system can minimize the amount of data that needs to be moved, reducing the additional write operations required while maintaining the simple erase-before-write SSD operation model.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11132145B2Techniques for reducing write amplification on solid state storage devices (SSDs)
Publication Date: 2021.09.28 APPLE INC
  • US11132145B2 patent drawing
  • US11132145B2 patent drawing
  • US11132145B2 patent drawing

AI summary

Disclosed herein are techniques for reducing write amplification when processing write commands directed to a non-volatile memory. According to some embodiments, the method can include the steps of (1) receiving a first plurality of write commands and a second plurality of write commands, where the first plurality of write commands and the second plurality of write commands are separated by a fence command (2) caching the first plurality of write commands, the second plurality of write commands, and the fence command, and (3) in accordance with the fence command, and in response to identifying that at least one condition is satisfied: (i) issuing the first plurality of write commands to the non-volatile memory, (ii) issuing the second plurality of write commands to the non-volatile memory, and (iii) updating log information to reflect that the first plurality of write commands precede the second plurality of write commands.