Solid State Disk Solutions


SSDs and Write Endurance

Write Endurance in this context is defined how much data can be written to the SSD over its lifetime. A fundamental characteristic of flash: data must be erased one block at a time. One block is typically 512 KiB. To get good performance, operations are typically striped across several flash channels, which mean that typically, an SSD will erase more than one block in a single operation.

Given that, there are three parameters to take into consideration:

  1. A number of program/erase (p/e) cycles the raw flash can tolerate.
  2. Amount of raw flash is available for writing.
  3. The amount of write amplification the SSD suffers.

Write Amplification is expressed as a ratio:

  • Number of bytes of flash that are programmed / Number of bytes of data written to the SSD

Factors that affect write amplification are:

  • Over provisioning percentage: the amount of raw flash versus the available capacity of the drive. When a block of flash is erased, there will often be valid data (which must be preserved) in that block. In general, the greater over provisioning the smaller the amount of valid data that will need to be preserved when a block is erased.

  • Workload: Small random writes across the entire drive cause the most write amplification, because the drive will be forced to erase blocks in which most of the data is valid. Sequential writes, on the other hand, are the easiest to manage, as they will typically be programmed to sequential blocks of flash. Next time the blocks are erased, it may be the case that no data needs to be preserved.

  • Compression (if used by SSD): Compression effectively increases over provisioning percentage and highly dependents on data pattern. For example, if the drive manages 25% compression overall, the 25% saved will be available for over provisioning, which can result in an increase in life and performance of the SSD much larger than the 25% compression.

  • SSD hardware/firmware implementation: SSDs use sophisticated flash mapping schemes balancing several conflicting requirements, including performance, endurance, reliability, power, and cost. If the SSD uses XOR, which can greatly improve reliability, that can also increase write amplification.

    Typical write amplification numbers for enterprise SSDs for random 4K writes range from 3-4, while for client SSDs the numbers range from 15-70. A client SSD that uses compression might suffer a write amplification of 20 at 0% compression, but only 3 at 25% compression.

Sample endurance calculation:

  • Assume we have an SSD with 240GB of capacity and 256GiB of flash (275GB) and 5000 P/E cycle MLC flash. Simple multiplication gives us an endurance of 1375TB. If write amplification is 8, then you could write a total of 171.8TB. Endurance specifications are typically provided assuming small random writes (either 4096 or 8192 bytes). Best case would be sequential writes, where write amplification could be close to 1. Worst case would be smaller writes, especially with an odd sector count.