page_title: Write amplification
section_title: Garbage collection
hierarchical_section_title: Write amplification / Garbage collection
caption_attribution_description: English: This drawing is an illustration of garbage collection on an SSD showing pages written over time and how those pages have to be rewritten to other blocks to free up pages holding stale data.
context_page_description: Write amplification is an undesirable phenomenon associated with flash memory and solid-state drives, where the actual amount of information physically-written to the storage media is a multiple of the logical amount intended to be written.
  Because flash memory must be erased before it can be rewritten, with much coarser granularity of the Erase operation when compared to the Write operation, the process to perform these operations results in moving user data and metadata more than once. Thus, rewriting some data requires an already-used-portion of flash to be read, updated, and written to a new location, together with initially erasing the new location if it was previously used at some point in time. Due to the way flash works, much larger portions of flash must be erased and rewritten than actually required by the amount of new data. This multiplying effect increases the number of writes required over the life of the SSD, which shortens the time it can operate reliably. The increased writes also consume bandwidth to the flash memory, which reduces random write performance to the SSD.
context_section_description: Data is written to the flash memory in units called pages (made up of multiple cells). However, the memory can only be erased in larger units called blocks (made up of multiple pages). If the data in some of the pages of the block are no longer needed (also called stale pages), only the pages with good data in that block are read and rewritten into another previously erased empty block. Then the free pages left by not moving the stale data are available for new data. This is a process called garbage collection (GC). All SSDs include some level of garbage collection, but they may differ in when and how fast they perform the process. Garbage collection is a big part of write amplification on the SSD.
  Reads do not require an erase of the flash memory, so they are not generally associated with write amplification. In the limited chance of a read disturb error, the data in that block is read and rewritten, but this would not have any material impact on the write amplification of the drive.
caption: Pages are written into blocks until they become full. Then, the pages with current data are moved to a new block and the old block is erased.[2]
exif: {}