concept Servers & hardware
SSD garbage collection and write amplification
An SSD may copy valid pages before erasing their block. Those copies count as internal writes but not host writes, so the amount written to flash can exceed what the host sent during the same interval.
What it means
Reclaiming space on an SSD can require writing data the host hasn't rewritten. Flash is programmed in pages but erased in blocks. If a block chosen for erasure still contains valid pages, the SSD copies them elsewhere first. Those copies add physical writes without adding host writes. Kingston’s garbage collection overview
Write amplification is the amount written to flash divided by the amount written by the host over the same interval. KIOXIA’s explanation of write amplification The model below counts both amounts in equal-sized pages so you can see which writes enter the numerator.
Try it
Start with the defaults: Victim block page map V V V S, Free relocation destinations 4 pages, and Host writes in the same window 1 page. The victim is the block selected for erasure. These are synthetic inputs; no drive is measured or erased.
SSD garbage collection and write amplification
Use small synthetic flash blocks; overwrite pages, choose a reclamation block and count moved valid pages and host/internal writes.
Synthetic inputs only. This is not a measurement of your hardware or service.
Valid pages must be copied before erasing a block. Those relocation writes add to host writes; already-free pages are not newly reclaimed space.
Host writes plus relocation writes
- Reclamation outcome
- modeled
- Valid pages copied
- 3 pages
- Host writes
- 1 pages
- Total internal page writes
- 4 pages
- Previously stale pages reclaimed
- 1 pages
- Internal / host write ratio
- 4/1
| Event | Page writes | Erased block positions |
|---|---|---|
| copy-valid | 3 | Not evaluated |
| erase-victim | Not evaluated | 4 |
| account-host-window | 1 | Not evaluated |
Evaluated evidence
- Victim block page map
- V · V · V · S
- Free relocation destinations (pages)
- 4
- Host writes in the same window (pages)
- 1
One explicit GC victim; V=valid,S=stale,F=already free. Host writes are a separate observed count for the same synthetic window, not extra allocations simulated here. No controller/LSM/endurance or real erasure claim.
About this model
Every input is local synthetic evidence. Numbers stay as raw text until this model validates them. The shown evaluated values come from the same result as the explanation.
Presets replace the entire scenario. Reset restores all starting fields, scenario selection and model state; it does not change the open or closed state of this help or article FAQ.
No external request, device command, stored-input history or measurement is performed.
- Copy the survivors. Each
Vmarks a page whose data is still current. Copying those three pages uses three of the four free destinations outside the victim and costs three page programs. - Erase the victim. All four positions in the block become free, but the copies used three free positions elsewhere. The net gain is one page: the
S, whose contents were stale. A position markedFwould already have been free and would not count as newly reclaimed. - Count writes for the window. The host count is separate; the model does not allocate another relocation destination for it. One host-page write plus three relocation writes gives four internal page programs. Write amplification is `4/1`, or 4.
With Reclaim an all-stale block (S S S S), only the victim changes. There are no valid pages to copy, so the model reclaims four pages and the one host write gives a ratio of 1/1. With Inspect the evidence boundary, the victim is V V V S again but host writes are 0. The three copies still count as internal writes. The ratio is undefined, not zero, because its denominator is zero.
If you edit the inputs, separate the map’s one to eight entries with single spaces. Both page counts take whole-number decimal strings from 0 through 32; 1.0 is invalid, not rounded. With the starting map and only 2 free destinations, reclamation is blocked before any page moves. A ? in the map instead leaves reclamation unknown: the model cannot tell which pages must survive. Reset restores the default inputs and scenario, returns the step and virtual time to zero, and clears errors, history, and any comparison.
In practice
Before comparing ratios, state how the victim was chosen and which writes the interval includes. Here you choose one block, and the only extra writes counted are copies of its valid pages. This is relocation in the flash translation layer, not LSM-tree compaction, which reorganizes database sorted runs.
The model omits controller-specific policies, other background work, and media wear, so 4/1 is not a drive-wide endurance rating. Read it as an explanation of the extra work in this interval: one page program served the host write, and the other three preserved data the host did not ask to write again.
Frequently asked questions
Editorial questions based on the listed sources and explicitly labeled local examples.
Why are valid pages moved?
Erasing a flash block would also erase its still-valid pages. The sample therefore requires enough destination space to preserve those pages before erasing the victim, and counts the relocation writes.
Is garbage collection the same as LSM compaction?
This model describes flash-page validity and block erasure inside a storage device. It does not model database sorted runs, tombstones or an LSM compaction policy, even though both mechanisms can add writes.
What does a short-interval ratio omit?
It describes only the selected accounting interval and victim. It excludes other background work, future reclamation and a real controller’s policies, so its ratio is not a drive-wide endurance forecast.
What happens when host writes are zero?
The ratio is undefined because its denominator is zero. The model can still show relocation writes, but returns unknown for write amplification rather than dividing by zero or displaying a misleading zero.
Sources & model boundaries
Primary references used for this explanation. The interactive example is an educational model, not a live check.
- SSD over-provisioning
Benefits; Maintaining performance and endurance. Flash pages are programmed at page granularity and erased in blocks; valid-page relocation during reclamation contributes internal writes.
Checked .
- How Does Endurance Work in SSDs?
Printed page3: DWPD/TBW conversion and write amplification; PDF screenshot index2. DWPD/TBW conversion depends on capacity and declared duration; relocating valid flash data during reclamation adds internal writes.
Checked .