Search CTRL + K

Write Amplification

固态硬盘本身带有 写放大 的负面现象

  • 固态硬盘无法覆写数据,只能先擦除后写入
  • 固态硬盘以页为单位写入,但擦除只能以块为单位

因此固态硬盘在在某个块重新写入数据时,需要把块中未被标记删除(仍然有用)的数据页迁移到别的块(GC),也就是一次逻辑写入可能造成多次实际写入,并且固态硬盘使用越满越容易触发 GC。

由于固态硬盘每个块擦除次数有限,因此 写入放大 会影响到固态硬盘使用寿命。


Wikipedia

Write amplification (WA) is an undesirable phenomenon associated with flash memory and solid-state drives (SSDs) where the actual amount of information physically written to the storage media is a multiple of the logical amount intended to be written. [1]

TiKV

Write amplification is the ratio of the amount of data written to the storage device versus the amount of data written to the database.[2]

SLSM - A Scalable Log Structured Merge Tree with Bloom Filters for Low Latency Analytics

Write amplification is the amount of data written to storage compared to the amount of data that the application wrote.[3]


  1. https://en.wikipedia.org/wiki/Write_amplification ↩︎

  2. https://tikv.org/deep-dive/key-value-engine/b-tree-vs-lsm/#write-amplification ↩︎

  3. P.A. Riyaz and Surekha Mariam Varghese, “SLSM - A Scalable Log Structured Merge Tree with Bloom Filters for Low Latency Analytics,” Procedia Technology 24 (2016): 1491–98, https://doi.org/10.1016/j.protcy.2016.05.075. ↩︎