Write Amplification, Garbage Collection and Over-Provisioning

Updated

Write amplification occurs when an SSD writes more data than the host requests due to the need to erase and rewrite entire blocks. Garbage collection consolidates valid data and frees up space, while over-provisioning reserves extra capacity to improve performance and extend drive life.

Write Amplification, Garbage Collection and Over-Provisioning
Photo: Phiarc, CC BY-SA 4.0

What Is Write Amplification

NAND flash memory stores data in pages, typically 4 to 16 KB in size, but erases data in larger units called blocks that contain many pages. When the host updates a small piece of data, the SSD cannot simply overwrite the old page; it must read the entire block, modify the relevant pages, and write the block to a new location, then erase the old block. This process causes the drive to write more data than the host requested, a phenomenon known as write amplification.

The amount of write wear on a NAND SSD is influenced by the condition of the existing data on the drive, since data is recorded in pages but erased in blocks, as described in Solidigm's SSD vs HDD guide. Higher write amplification reduces the effective endurance of the SSD, measured in terabytes written (TBW) or drive writes per day (DWPD).

Garbage Collection

Garbage collection is the background process that reclaims space occupied by invalid or stale data. As explained in Samsung's internal SSD FAQ, when some pages in a block become stale, the SSD reads the pages that still contain valid data and rewrites them into a previously erased empty block. The original block is then erased, making all its pages available for new writes.

This process reduces the number of partially filled blocks and helps maintain a pool of free blocks for incoming writes. Efficient garbage collection lowers write amplification by minimizing the need to move data repeatedly.

Over-Provisioning

Over-provisioning reserves a portion of the SSD's total capacity as unallocated space that the controller can use for garbage collection and wear leveling. The SNIA overview of SSDs states that SSD endurance varies greatly as a function of free space or over-provisioning on the drive. More free space gives the controller more room to perform garbage collection without interfering with host writes, which reduces write amplification.

The Solidigm QLC considerations article explains that over-provisioning, along with firmware tuning and controller configuration, complements the inherent characteristics of NAND to improve drive-level performance and endurance. Users can adjust the over-provisioning area on supported drives using vendor tools such as Samsung Magician, which provides an interface to control the size of the unallocated area.

The Role of TRIM

TRIM is a command that allows the operating system to inform the SSD which logical block addresses contain data that is no longer in use. According to Samsung's internal SSD FAQ, TRIM prepares the deletion of invalid data, making garbage collection more effective by allowing the SSD to skip those blocks when performing garbage collection. Without TRIM, the SSD may treat deleted data as still valid, forcing the garbage collection process unnecessarily.

All Samsung SSDs support the TRIM function, but its operation may vary depending on the operating system. Enabling TRIM on systems that support it helps maintain consistent performance and reduces write amplification over time.

Garbage Collection ProcessStep 1: Identify block with stale pages; Step 2: Read valid pages from that block; Step 3: Write valid pages to a new block; Step 4: Erase the old block; Step 5: Mark old block as freeGarbage Collection ProcessIdentify block with stale pagesRead valid pages from that blockWrite valid pages to a new blockErase the old blockMark old block as free
Garbage Collection Process
Factors Influencing Write Amplification
FactorEffect on Write AmplificationMitigation
Over-provisioning amountLess free space increases write amplificationReserve extra capacity via vendor tools or leave unallocated space
Garbage collection efficiencyInefficient collection leaves many partially filled blocksUse TRIM and allow background GC to run
TRIM supportWithout TRIM, invalid data may still be movedEnable TRIM in the operating system
Workload typeRandom writes cause higher amplification than sequential writesDesign workloads to be sequential when possible

Frequently asked questions

What is write amplification?

Write amplification is the ratio of actual data written to the NAND compared to the data requested by the host. It occurs because NAND must erase entire blocks before rewriting, causing extra writes.

How does garbage collection reduce write amplification?

Garbage collection consolidates valid data from partially invalid blocks into new blocks, allowing the old blocks to be erased and reused. This reduces the need for repeated writes to the same blocks.

What is over-provisioning and why is it important?

Over-provisioning reserves a portion of the SSD's capacity as unallocated space. This provides extra free blocks for garbage collection, reducing write amplification and improving endurance.

How does the TRIM command help?

TRIM allows the operating system to inform the SSD which data blocks are no longer in use. The SSD can then skip those blocks during garbage collection, making the process more efficient.

Can over-provisioning be adjusted after purchase?

Some SSD vendors provide software tools, such as Samsung Magician, that allow users to adjust the over-provisioning area on supported drives.