SSD Band Segmentation for Single-Thread Write Fragmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional SSD storage systems experience degraded write performance due to fragment generation and high write amplification, leading to increased read/write delays and affected user experience, especially after prolonged concurrent writing operations.
Innovation Solution
A method and apparatus for writing data to an SSD that divides the disk into blocks based on a band parameter, determines a target block using single-threaded writing, and marks block states according to write rates to minimize fragment generation, employing a single thread for data storage and re-selecting blocks as needed to maintain efficient writing.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If multiple threads are used for concurrent writing to SSD, then writing speed is improved, but fragment generation increases and write amplification becomes high
Solution Approach 1:
The SSD storage space is divided into multiple bands (e.g., 32 bands), and each band is further divided into multiple blocks. This hierarchical segmentation allows the system to distribute writing operations across different bands while maintaining sequential writing within each band, thereby reducing fragment generation while preserving parallel writing capabilities.
Solution Approach 2:
The patent introduces a band dimension in addition to the traditional block structure. By organizing storage into bands and selecting target blocks from different bands based on write amplification factors, the system adds a new dimension for managing write operations, which helps reduce fragments while maintaining high writing speed.
2Productivity
If multiple threads perform concurrent writing, then writing efficiency is improved, but write amplification becomes high and read/write delay increases
Solution Approach 1:
The system calculates a write amplification factor for each band based on the number of valid blocks and total blocks in that band. This feedback mechanism guides the selection of target bands for writing operations, ensuring that writes are directed to bands with lower write amplification, thereby reducing overall write amplification and read/write delays while maintaining high writing efficiency.
Solution Approach 2:
The patent dynamically adjusts the selection of target bands based on real-time write amplification factors. As writing operations proceed and band states change, the system continuously recalculates write amplification and redirects subsequent writes to optimal bands, maintaining high writing efficiency while minimizing read/write delays through adaptive management.
3Quantity of substance
If concurrent writing is performed for a period of time, then data storage capacity is improved, but fragment generation increases and defragmentation is triggered
Solution Approach 1:
By dividing the SSD into multiple bands and blocks, the system enables data to be stored in a distributed manner across different bands. This segmentation allows concurrent writing operations to target different bands sequentially, filling storage capacity while maintaining data continuity within each band, thereby reducing fragment generation even as storage capacity increases.
4Speed
If defragmentation is triggered to resolve fragments, then read/write performance is temporarily improved, but write amplification becomes high and user experience is affected
Solution Approach 1:
The system proactively manages write operations by selecting target bands based on write amplification factors before fragments accumulate to problematic levels. By continuously monitoring and directing writes to optimal bands, the system prevents significant fragment generation in the first place, eliminating or reducing the need for defragmentation operations and their associated write amplification penalties.
Data Source
AI summary
Embodiments of the present disclosure relate to a method and a device for writing data. The method may include: determining a target block for storing to-be-written data from a plurality of blocks divided in advance for a solid state disk in response to receiving a data write instruction, where the data write instruction includes information of the to-be-written data, and the solid state disk is divided into a plurality of blocks according to a band parameter; determining the to-be-written data based on the information of the to-be-written data; writing the to-be-written data into the target block using a single thread.


