Flash translation, write amplification, and honest persistence
Connect erase-before-reuse flash, garbage collection, wear, and device-cache ordering without treating logical block writes as physical cell placement.
On this page
The question for today
What you’ll understand
- Explain why logical overwrites can cause additional physical flash writes.
- Calculate write amplification and a bounded endurance-budget estimate.
- Distinguish ordinary completion, flush ordering, FUA, and documented power-loss protection.
An SSD presents logical blocks while managing a different physical medium underneath. NAND flash is programmed and erased at different granularities, and locations cannot be overwritten indefinitely like an abstract byte array. Controllers relocate data, reclaim erase units, and spread wear. These hidden operations affect latency, sustained throughput, and lifetime. They are also separate from the persistence promises of device caches, so a fast write completion does not settle every question about power loss.
Logical overwrite is not physical overwrite
A flash translation layer maps host logical addresses to physical flash locations. Updating a logical block can write a fresh physical location and invalidate the old one. To reclaim an erase unit containing both live and obsolete data, garbage collection may copy the live portion elsewhere before erasing it. Those copies add physical writes the application never explicitly issued. The original SSD design literature explains these mechanisms, but its historical chip sizes and timings are not specifications for a current device; separate the durable architectural idea from obsolete numerical examples.
Wear leveling tries to avoid exhausting a small subset of erase units while others remain lightly used. Extra movement, available spare capacity, the hot/cold data mix, device firmware, and workload history influence amplification and latency. Discard or deallocation can tell a device that certain logical contents are no longer needed, helping avoid some unnecessary preservation, but timing and exact behavior depend on the interface and implementation. A filesystem delete therefore should not be equated with immediate physical erasure or with a security-grade sanitization operation.
Endurance is a budget with several qualifications
A simple budget divides an assumed remaining physical-write allowance by physical bytes written per day. It can illuminate why reducing redundant rewrites matters, but it is not a predicted failure date. Real media can fail for other reasons, vendor endurance ratings describe stated workloads and conditions, and exposed counters may count host writes rather than actual NAND writes. Name every numerator and denominator. For AI infrastructure, compare full checkpoint rewrites, incremental formats, optimizer-state volume, and temporary files before trying to infer device health from training step count alone.
Benchmark sustained writes after a controlled preparation period as well as short bursts. A device can temporarily use a faster region or available free space, then behave differently while reclaiming blocks. Garbage collection and thermal or shared-resource effects can produce tail-latency changes that an average hides. Keep temperature, capacity utilization, firmware, workload pattern, and synchronization mode with the result. Avoid extrapolating a sequential empty-device throughput number to small durable random writes or to a nearly full drive receiving concurrent checkpoints.
Persistence commands need an honest end-to-end path
A device with volatile write-back caching may acknowledge an ordinary write before its data is nonvolatile. Linux's block interface distinguishes a preflush, which establishes persistence of previously completed writes before a dependent operation, from force unit access, which requires the flagged write to be nonvolatile at its completion. FUA is not by itself an ordering guarantee for unrelated earlier writes. Filesystems and block layers compose these mechanisms; remapping layers, virtual disks, controllers, and devices must preserve the required semantics. Documented power-loss protection may change which cache is effectively persistent, but the label SSD alone proves none of this.
The queue lab illustrates the demand side only, using equal-sized host-equivalent work units under a fixed conversion. Press Reset, set both arrival to two and effective service to three, predict drainage from four units, then Play or Step. For a separate hypothetical higher-amplification case, Reset, re-enter arrival two and service one, predict growth from four, then Play or Step. Each starts afresh: a rate edit retains elapsed time and recalculates from the initial four, rather than preserving the previous backlog. Lower effective service represents more physical work per host write; the model does not reproduce flash translation, garbage collection, wear, flush, or FUA.
Work it through
Follow amplification through two layers
A training system writes 1 TB of useful checkpoint contents per day. Filesystem and format activity produces 1.5 TB/day of device-visible host writes. Assume the SSD writes 2 TB of NAND for every TB of host writes and has an illustrative 900 TB physical budget remaining. Use decimal TB.
The filesystem/format factor is 1.5/1 = 1.5. Device amplification is two, so physical NAND writes are 1.5 × 2 = 3 TB/day.
End-to-end amplification is 3/1 = 3. Under constant workload and amplification, the illustrative write budget lasts 900/3 = 300 days.
If useful application writes fall to 0.5 TB/day with both factors unchanged, physical demand becomes 1.5 TB/day and the arithmetic budget becomes 600 days. Neither result predicts failure from other causes.
The storage stack turns one useful application TB into three physical TB in this example. Reducing application writes changes the budget, but realistic endurance decisions need vendor definitions and actual telemetry.
The living notebook
Explore the model
Interactive lab · queue
Amplification consumes physical service
Reset, set both λ=2 and μ=3, predict drainage from four host-equivalent work units, then Play or Step. For a separate hypothetical higher-amplification case, Reset, re-enter both λ=2 and μ=1, predict growth from four, then Play or Step. Edits retain elapsed time, so this comparison uses fresh runs. It is not a flash, wear, FUA, or power-loss simulator.
- Fluid backlog
- 4
- Net rate · λ − μ
- −1 /s
- M/M/1 mean residence
- 1 s
Fluid backlog starts at 4 and follows max(0, 4 + (λ − μ)t). The separate M/M/1 residence-time formula assumes Poisson arrivals, exponential service and λ < μ. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forAmplification changes physical work per useful byte, while persistence still depends on a separate correctly honored interface contract.
Pause & reason
Check your understanding
Your turn
Try it yourself
An application produces 400 GB/day, host writes are 600 GB/day, and measured physical NAND writes are 900 GB/day over the same interval. Calculate the device and end-to-end amplification factors.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Choose the denominator that matches each layer's input rather than reusing the application value for both.
Compare with the solution
Device amplification is 900/600 = 1.5 physical bytes per host byte. End-to-end amplification is 900/400 = 2.25 physical bytes per useful application byte. The intermediate host/application factor is 600/400 = 1.5, whose product with the device factor is 2.25. Counter coverage and units must match before interpreting these measurements.
Keep the idea
Take it with you
- Out-of-place flash updates and reclamation can add physical writes beyond host requests.
- Endurance estimates require explicit byte domains, workload assumptions, and counter definitions.
- Flush ordering, FUA completion, and power-loss protection are distinct properties that the whole storage path must honor.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.