Research notes / SSD capacity accounting
SSD over-provisioning: the denominator changes the answer
Published / Updated / Literature review and model evaluation
A 20% reserve can mean two different capacities. Specify the denominator before comparing over-provisioning, then specify the workload before predicting write amplification. Neither percentage alone is a performance guarantee.
On this page14 sections
One reserve, two percentages
Let P be physical capacity available to the cleaning model and L its logical data capacity, in identical units. Reserve is P - L. Kingston's published convention divides that reserve by user capacity. [3] Desnoyers instead defines a spare factor using total capacity. [2, section 2]
- Logical-capacity basis:
rho = (P - L) / L. - Physical-capacity basis:
s = (P - L) / P. - Conversion:
s = rho / (1 + rho), andrho = s / (1 - s).
For an invented 100-unit device exposing 80 units, the same 20-unit reserve is 20% of physical capacity and 25% of logical capacity. Conversely, 20% on the logical basis gives 83.333 logical units out of 100 physical units, not 80.
Keep byte units explicit: GB and GiB are not interchangeable. Also keep the capacity boundary explicit. Do not assume every byte absent from advertised capacity is available for garbage collection; our P describes a mathematical pool, not a reverse-engineered accounting of a commercial SSD.
What the equation actually predicts
Xiang and Kurkoski assume independent, uniformly distributed page writes and greedy collection, which chooses the block with the most invalid pages. Their asymptotic equation 12 approximates stationary write amplification. We evaluate that equation, not their simulator. [1]
For a fixed reclaimed fraction q, one copy-and-refill cycle provides q blocks of host-write space while programming one block in total: new data plus relocated valid data. Thus A = 1 / q. Variable cycles need pooled accounting. The asymptotic equation becomes:
q = 1 - exp(-(1 + rho) q), 0 < q < 1
Our code solves the equivalent finite-A equation by bisection. The zero-reclamation root is excluded. At 30% logical-basis OP it yields 2.364, consistent with the paper's rounded analytical value 2.36. Its reported simulation value 2.35 is not a hardware measurement. [1, Table I]
| Reserve / logical | Reserve / physical | Model A | Victim pages reclaimed |
|---|---|---|---|
| 7% | 6.54% | 7.817 | 12.79% |
| 10% | 9.09% | 5.677 | 17.61% |
| 20% | 16.67% | 3.188 | 31.37% |
| 25% | 20.00% | 2.693 | 37.14% |
| 30% | 23.08% | 2.364 | 42.30% |
| 50% | 33.33% | 1.716 | 58.28% |
| 100% | 50.00% | 1.255 | 79.68% |
Download the CSV, provenance JSON and evaluator. The supported input range is 1%-100% OP on the logical basis. No device I/O or third-party runtime package is required.
Why this is not a universal SSD curve
Desnoyers gives the same algebraic form for LRU cleaning, but a different finite-block greedy model. At spare factor 0.07, his analytical tables give 7.318 for LRU and 6.623 for greedy cleaning with 64-page blocks. These are different cleaning assumptions, not competing measurements of one drive. [2, sections 3.1-3.2, Tables 1-2]
The two papers should therefore not be flattened into the statement "OP determines WAF." Desnoyers also studies separating frequently and rarely updated data, showing that placement and allocation of spare space between pools matter. Temperature here means update frequency, not degrees Celsius. [2, sections 4-6]
Our curve excludes metadata writes, parity, wear-leveling traffic, compression, cache folding and firmware-specific scheduling. It supplies neither latency nor a lifetime estimate. A real counter measurement must name what its numerator counts and use the same interval for host and physical writes.
Which addresses does TRIM select?
The same fraction of TRIM requests can produce different valid-data populations. Frankie, Hughes and Kreutz-Delgado choose writes uniformly across all logical addresses, but TRIM targets only addresses still in use. Their finite-state model tracks valid pages rather than erased blocks. [4, sections 3-4]
Here t is the probability that a model step attempts TRIM, not the reclaimed fraction q above. With L logical pages and x valid pages, an upward transition has probability (1-t)(L-x)/L; a downward transition has probability t when x > 0. Our implementation makes an empty-state TRIM a no-op. For 0 < t < 1, normalizing the recurrence below evaluates the paper's equation 1 without a Gaussian approximation:
pi[x+1] / pi[x] = (1-t)(L-x)/(L*t)
For comparison, we changed just the TRIM target rule: choose from all addresses, allowing an already-invalid address to be selected. The downward probability becomes t*x/L. Its stationary distribution is binomial with mean L*(1-t). This is a different synthetic workload, not a correction to the authors' model.
| TRIM steps | Valid pages: live-only target | Valid pages: any-address target | Effective spare: live-only |
|---|---|---|---|
| 0% | 1000.00 | 1000.00 | 20.00% |
| 10% | 888.89 | 900.00 | 28.89% |
| 25% | 666.67 | 750.00 | 46.67% |
| 40% | 333.33 | 600.00 | 73.33% |
| 50% | 24.81 | 500.00 | 98.02% |
| 60% | 1.98 | 400.00 | 99.84% |
At 40% TRIM steps, the target rule alone changes mean occupancy from 333.33 to 600.00 pages. The live-target model's effective spare factor is (P-E[X])/P, here 73.33%. The fixed factory reserve remains 20% of physical capacity. Invalid pages can still require block erasure before reuse; effective spare is not an erased-block counter.
The empty-state boundary matters
The familiar interior approximation is E[X] = L*(1-2t)/(1-t). The dissertation derives it through an asymptotic expansion. [5, chapter 3] Extending that expression to 50% would give zero, yet our finite-chain calculation gives 24.81 valid pages. At 60%, the extrapolation becomes negative while the finite result is 1.98.
We can check this without trusting the recurrence implementation. Stationarity requires expected births to equal expected deaths: (1-t)*(1-E[X]/L) = t*(1-pi[0]). The interior approximation drops the empty-state probability. At t = 0.5, the exact identity instead gives E[X] = L*pi[0]. Our tests check this balance, every neighboring transition and a separate transition-matrix iteration. Near the boundary, even a value below 50% is not enough to establish that the approximation is accurate.
Computed CSV, method, variances and hashes, and finite-state evaluator are available with the generator. The original seven-row WAF dataset is unchanged. This supplement predicts occupancy only, not WAF, throughput or endurance.
Do not estimate t by dividing a count of fstrim calls by write calls: one call handles free ranges, and repeated verbose output can report the same potential discard bytes. [6] A workload comparison needs address-selection rules, page/range sizes and the state visible to the controller.
Corpus definition: effective spare factor.
The next victim depends on placement
Valid-page occupancy does not tell us how those pages are distributed across blocks. Desnoyers explicitly distinguishes the distribution over all blocks from the distribution of blocks selected for cleaning. [2, Figure 3] The following counterexample makes that distinction concrete.
| Layout / eligible blocks | Valid pages per block | Pages copied | Pages reclaimed | Copy-and-refill WAF |
|---|---|---|---|---|
| Balanced / all blocks | 4, 4, 4, 4 | 4 | 4 | 2.000 |
| Uneven / all blocks | 2, 4, 4, 6 | 2 | 6 | 1.333 |
| Uneven / last two blocks | 2, 4, 4, 6 | 4 | 4 | 2.000 |
| Segregated / all blocks | 0, 0, 8, 8 | 0 | 8 | 1.000 |
Greedy selection picks the eligible block with the fewest valid pages. In the uneven layout it copies two pages when all blocks are eligible, but four when restricted to the last two. The population total has not changed. For the segregated layout, an entirely invalid block needs erasure but no valid-page copying. Neither result predicts how the layout will evolve.
For a victim with B pages and v valid pages, the net reclaimed space is B-v. Copy the valid data through an auxiliary buffer, erase the victim, program those v pages once, then fill the remaining space with B-v host writes. That accounting gives A = B/(B-v), following the paper's simplified program-count boundary. [1, section II, equation 2] Auxiliary-buffer traffic is outside that count. A real flash staging copy, metadata write or other program operation must be added if the implementation performs it.
An all-valid victim reclaims nothing. The denominator is zero, so its copy-and-refill ratio is undefined. Our evaluator returns null, preserving the copying cost rather than reporting a zero-cost collection.
This is why substituting mean occupancy into a nonlinear WAF curve does not establish a finite-block cleaning result. Even the next victim requires a layout and candidate set; long-run WAF also requires a workload, placement policy and observation interval.
Pool writes before dividing
With variable reclamation, the per-cycle ratio and the ratio over several cycles answer different questions. For completed copy-and-refill cycles with a common block size B and reclaimed counts r_i:
A_total = (n*B) / sum(r_i) = B / mean(r_i)
It is not the unweighted mean(B/r_i). For two prescribed 64-page cycles reclaiming 1 and 63 pages, the physical-program numerator is 128 and the host-write denominator is 64: pooled WAF is 2.000. The unweighted mean is 32.508. These are accounting examples, not an asserted sequence from a greedy FTL.
For arbitrary counter intervals, use sum(physical writes) / sum(host writes) with matching units and boundaries. A host-write-weighted average gives the same result only when every local ratio is defined. An idle interval with 64 physical page programs and zero host writes has no local WAF, but those 64 programs still belong in the pooled numerator. Follow it with 64 physical and 64 host writes: the combined ratio is 2, not 1.
Record deltas over disjoint intervals, account for resets and wraparound, and retain intervals with zero host traffic. Do not average dashboard WAF samples without the underlying counts.
Layout CSV, assumptions, counters and hashes, accounting code and generator. The original WAF and TRIM datasets are unchanged. See also write amplification and greedy cleaning.
An older version need not be closer to overwrite
Block invalidation time is an endpoint, not an elapsed lifetime. Equal-lived versions written at different times can expire separately. [7, section 3.4]
SepBIT separates user-written blocks from GC survivors, then estimates invalidation behavior within those groups. Its clock counts user-written blocks, not seconds; GC copies do not advance it. The paper's age argument depends on workload skew: its uniform model has no age effect. [8, sections 3.1-3.3]
Our independent, hypothetical two-address calculation makes the conditioning explicit. Each model write replaces one block and independently targets address A with probability 3/4 and B with probability 1/4. Sample a version at its user write, so its initial address probabilities are also 3/4 and 1/4. After surviving g subsequent user writes without overwrite, ask whether the next write replaces it. For probabilities p_i:
S(g) = sum_i p_i * (1-p_i)^g; P(next overwrite | survived g) = 1 - S(g+1)/S(g)
| Survived writes | Horizon, writes | Uniform 1/2, 1/2 | Skewed 3/4, 1/4 |
|---|---|---|---|
| 0 | 1 | 50.000% | 62.500% |
| 1 | 1 | 50.000% | 50.000% |
| 2 | 1 | 50.000% | 37.500% |
| 4 | 1 | 50.000% | 26.786% |
The skewed result changes from 62.500% to 26.786% because survivors increasingly come from the less frequently updated address. Each address still has a constant per-write overwrite probability. This is selection among versions, not physical aging or a guarantee for an individual block.
The fixed-probability, independent-write assumption excludes shifting hot sets and sequential phases. This is not a SepBIT implementation, WAF forecast or trace reproduction. The original FAST 2022 study used 186 selected Alibaba volumes, not the entire 1,000-volume trace; volumes had to exceed 10 GiB write working set and twice that set in writes. [8, section 2.3]
Download the CC0 evaluator and exhaustive small-sequence tests. Run node --test invalidation-age.test.mjs with both files in one directory. Corpus: block invalidation time.
A write sample and an address snapshot answer different questions
For the same 3/4, 1/4 workload, a newly written version has a 62.5% chance of being overwritten by the next write. A uniformly selected current address has a 50% chance. Neither number is a device measurement: frequent writers contribute more versions to the first sample, while each live address contributes once to the second.
Now suppose the fixed, independent-write process is stationary, with one current version at each of n initialized addresses. Observe it immediately after a write. Define age A as the number of subsequent workload writes since that address was last written; the just-written address has age zero. Writing q_i = 1 - p_i, the last-write event gives P(A = g | i) = p_i q_i^g, whereas absence from the last g writes gives P(A >= g | i) = q_i^g.
Consequently, an exact-age snapshot uses the same address weights as the write-selected survivors above. A minimum-age snapshot does not: it also includes versions older than g. For a future horizon of h writes, the independent model gives:
P(overwrite within h | A = g) = sum_i p_i q_i^g (1-q_i^h) / sum_i p_i q_i^g
P(overwrite within h | A >= g) = sum_i q_i^g (1-q_i^h) / sum_i q_i^g
| g, writes | Exact age A = g | Minimum age A >= g |
|---|---|---|
| 0 | 62.500% | 50.000% |
| 1 | 50.000% | 37.500% |
| 2 | 37.500% | 30.000% |
| 4 | 26.786% | 25.610% |
For one future write at g = 0, uniform address sampling gives 1/n for any positive address probabilities summing to one, while write sampling gives sum_i p_i^2. Their gap is sum_i (p_i - 1/n)^2, so it vanishes for a uniform workload. This is an algebraic sampling effect, not improved physical endurance.
SepBIT's section 3.3 models long-lived user-written versions as a proxy for GC rewrites; it explicitly notes that actual GC selection depends on policy. Its write-weighted formula must not be silently relabeled as a uniform inventory forecast. [8, section 3.3]
For a placement decision, record whether telemetry sampled writes, current addresses or GC victims, and whether the age filter means exactly or at least. Neither snapshot formula models the extra selection imposed by a GC victim policy, TRIM, changing hot sets or an uninitialized address range. The derivation assumes stationarity; it does not validate a firmware policy or reproduce the paper's traces.
The CC0 evaluator provides overwriteProbability(p, g, h) for write-selected survivors or stationary exact-age snapshots, and inventoryOverwriteProbability(p, g, h) for stationary minimum-age snapshots. The enumeration tests independently sum short histories and future writes for both conditions.
Cache writes and device writes use different denominators
RIPQ groups cache objects by approximate priority. Memory-only priority updates defer copying until block eviction. Reinsertion still costs host writes; the paper separates this implementation overhead from FTL amplification. Its original interface excludes arbitrary object deletion and overwrite. [9, sections 4.2-4.4]
The evaluation used sampled photo-cache traces: ten days for warm-up and five for measurement. Those results do not establish a universal write-size threshold or device ranking. [9, section 6.1]
For a separate historical design, Kangaroo addresses tiny objects by combining a small log with a larger set-associative cache. It balances DRAM indexing against write traffic; that is a different workload/design question, not a head-to-head result here. [10, sections 2-3]
Keep all three byte counters
In our independent accounting examples, M counts payload bytes associated with newly admitted cache misses, H counts all host-to-device write bytes and N counts all media-programmed bytes. These are interval deltas, not cumulative counter readings. Use the same interval and device scope, with explicit metadata and padding treatment.
(H / M) * (N / H) = N / M, when M > 0 and H > 0
The intermediate host-write count cancels only when it is the same counter on both sides. Multiplying a cache estimate from one workload by a device ratio from another does not establish end-to-end amplification. Neither factor is the hit ratio, and M is not all bytes requested by readers.
| Interval | M, bytes | H, bytes | N, bytes | H / M | N / H | N / M |
|---|---|---|---|---|---|---|
| Batched writes | 100 | 120 | 240 | 1.20 | 2.00 | 2.40 |
| More host rewriting | 100 | 300 | 600 | 3.00 | 2.00 | 6.00 |
| More device copying | 100 | 120 | 360 | 1.20 | 3.00 | 3.60 |
| Drain earlier buffered data | 0 | 64 | 128 | - | 2.00 | - |
| Internal work only | 0 | 0 | 64 | - | - | - |
| New data still buffered | 100 | 0 | 0 | 0.00 | - | 0.00 |
The first two ledgers have equal device amplification, yet the second programs 2.5 times as many bytes. A priority policy cannot be judged from device WAF alone. Conversely, unchanged host traffic can coexist with more internal copying, as the third ledger shows.
Buffering breaks a simple per-interval causal story. A drain can write earlier data when no new miss bytes arrive; internal work can continue without host writes. A zero ratio in the final row records a temporarily buffered interval, not a write-free cache. Pool compatible, disjoint intervals by summing counters, retaining the drain and idle rows.
Do not multiply unweighted mean ratios either. For two invented ledgers (M,H,N) = (100,100,200) and (900,2700,2700), the mean factors are 2 and 1.5, whose product is 3. Pooled counters give 2900 / 1000 = 2.9. This is arithmetic, not a statistical estimate.
Downloads: generated JSON, CC0 accounting code, tests and generator. Run node --test ripq-write-ledger.test.mjs with the model beside it. No RIPQ execution, trace replay or SSD measurement was performed.
Cache admission can lower writes by dropping objects
Kangaroo stages tiny objects in a log before grouping them into set writes. Its threshold controls how many objects must share a set before a group is admitted. Hit-driven log readmission softens rejection in the complete design. [10, sections 3-4]
The pinned simulator counts group members, then weights the set-write factor by admitted bytes before adding the log factor. Object admission percentage and byte admission percentage can differ for variable-size objects. Warm-up also changes which admission paths run. [simulator insertion and accounting]
Consider one invented terminal drain of forty distinct 100-byte payloads into initially empty sets. The log packs them into one 4,096-byte write. Each accepted group fits in one 4,096-byte set page; threshold 1 means admit all. No hits, readmission, metadata, old-set victims, reads or FTL copying are modeled. These are host writes, not measured NAND writes.
| Grouping and policy | Set-write bytes | Total host-write bytes | Retained objects | Host / input bytes |
|---|---|---|---|---|
| 40 singleton sets, admit all | 163840 | 167936 | 40 | 41.984 |
| 40 singleton sets, threshold 2 | 0 | 4096 | 0 | 1.024 |
| 20 paired sets, threshold 2 | 81920 | 86016 | 40 | 21.504 |
| One 40-object set, threshold 2 | 4096 | 8192 | 40 | 2.048 |
Rejecting every singleton leaves the log write in the numerator but no retained object in the set tier. Dividing those writes by promoted bytes is undefined, not zero. Pairs retain all objects but still incur twenty set rewrites. Larger groups amortize that page cost in this empty-set example; occupied sets and future requests require a fuller model.
The paper's production trials measured application writes, not device-level amplification. The random-admission and learned-admission trials used different request streams. Do not combine their results into a same-workload NAND-endurance comparison. [10, section 5.5]
Reproduce the exact ledger with the CC0 model, tests and generator; JSON records every assumption. Run node --test model.test.mjs with the model beside it. This is a byte-accounting illustration, not a Kangaroo implementation or a reproduction of the paper's miss ratios.
A cache read miss can create an SSD write
SieveStore filters admissions to a shared block cache. Its discrete variant selects blocks from access logs; its continuous variant tracks repeated misses before admitting data. A replacement policy alone cannot remove the write needed to fill an admitted block. [12, section 3]
Reconstruct Table 2 with 400 normalized block accesses: 140 hits and 260 misses, with three reads per write in each group. That gives 105 read hits, 35 write hits, 195 read misses and 65 write misses. Identical hits are an imposed oracle assumption, not a prediction that admission leaves hit ratio unchanged. [12, section 3.1 and Table 2]
| Admission policy | Allocation writes | Total SSD writes | Writes / input accesses |
|---|---|---|---|
| Allocate on every miss (AOD) | 260 | 295 | 73.75% |
| Allocate on read misses (WMNA) | 195 | 230 | 57.50% |
For WMNA, total writes are 230 / 35 = 6.57 times the write-hit baseline. Added allocation writes are 195 / 35 = 5.57 times that baseline. The paper's roughly 5.6-fold wording matches the increment, not the total. Its ideal-selective row retains a small, unspecified fill cost; it does not assume zero allocation writes. [12, section 3.1 and Table 2]
These are operation ratios, not the NAND-byte / host-byte WAF discussed above. The separate trace evaluation used seven days from 13 servers, spanning eight calendar dates; its minute-level drive-demand model ignores queueing. Neither this table nor that model establishes request tail latency. [12, sections 2 and 4]
Run node --test ledger.test.mjs beside the CC0 accounting code and tests. This reconstructs published arithmetic, not SieveStore's simulator. The similarly named SIEVE eviction policy is a different design.
Griffin: fewer SSD writes is not a lifetime measurement
Griffin reverses the familiar hybrid hierarchy: an HDD buffers writes for an SSD. Its FAST 2010 evaluation separates simulated write savings, modeled erasures under two FTLs, and hardware latency measurements. The latter replay two selected two-hour desktop segments, not a device lifetime test. Linux traces are examined separately and excluded from the subsequent analysis. [13, sections 4.5, 5.4 and 6.3-6.4]
For our own sensitivity example, let H be baseline SSD host-written bytes for a fixed logical workload. After external buffering, the SSD receives f * H bytes, where 0 < f <= 1. Let A0 and A1 be positive device-level byte WAFs before and after that change. Account for all SSD writes over matched, fully drained workloads. Then M0 = H * A0 and M1 = f * H * A1.
M1 / M0 = f * A1 / A0
| Candidate WAF A1 | Media bytes M1 / M0 | Fixed-budget workload multiplier |
|---|---|---|
| 1.00 | 0.25 | 4.00 |
| 2.00 | 0.50 | 2.00 |
| 5.00 | 1.25 | 0.80 |
With an unchanged media-write budget and repeatable workload, the number of workloads that fit scales inversely with media bytes. This conditional multiplier is not calendar lifetime, a warranty forecast or a failure probability. The last row sends half as many bytes to the SSD but programs 25% more media bytes. It shows what the missing WAF can change, not what Griffin's hardware did.
This arithmetic excludes the HDD's own writes, energy, latency and failures. Griffin explicitly discusses loss of unmigrated updates after HDD failure; buffering is not replication. [13, section 5.3] Zero host traffic has undefined WAF and is outside this example, not evidence of infinite life.
Reproduce the three rows with the standalone model and Node test file. Run node --test griffin-accounting.test.mjs with both files together. The tests include direct byte ledgers and invalid-input controls; they validate arithmetic, not an FTL or an endurance mechanism.
How to use the result
Use the conversion when reading a paper or capacity claim. Use the model as an explicit baseline for a uniform random overwrite workload, not as a rule to reserve a particular percentage on every SSD. Model agreement verifies arithmetic; it does not validate a controller implementation.
A follow-up experiment should hold firmware, workload and preparation constant, report the address range and valid-data occupancy, and record supported write counters. Filesystem free space alone does not establish what the controller considers invalid. See discard semantics and steady-state measurement. We performed no drive writes or hardware experiment here.
Corpus: over-provisioning, greedy garbage collection, and hot/cold data separation.
Primary sources
- Luojie Xiang and Brian M. Kurkoski. An Improved Analytic Expression for Write Amplification in NAND Flash. arXiv:1110.4245v1 (19 October 2011), sections II-IV, equation 12 and Table I.
- Peter Desnoyers. Analytic Modeling of SSD Write Performance. SYSTOR 2012, sections 2-6, Tables 1-2. DOI: 10.1145/2367589.2367603.
- Kingston. Understanding SSD Over-provisioning (OP). March 2019; user-capacity denominator.
- Tasha Frankie, Gordon Hughes and Ken Kreutz-Delgado. Analysis of Trim Commands on Overprovisioning and Write Amplification in Solid State Drives. arXiv:1208.1794v1 (2012), sections 3-4, equation 1.
- Tasha Christine Frankie. Model and Analysis of Trim Commands in Solid State Drives. UC San Diego doctoral dissertation (2012), chapter 3.
- util-linux: fstrim manual, discard ranges and repeated verbose byte counts.
- He et al. The Unwritten Contract of Solid State Drives. EuroSys 2017, section 3.4. DOI: 10.1145/3064176.3064187.
- Wang et al. Separating Data via Block Invalidation Time Inference for Write Amplification Reduction in Log-Structured Storage. FAST 2022, pp. 429-444, sections 2.3 and 3.1-3.3.
- Tang et al. RIPQ: Advanced Photo Caching on Flash for Facebook. FAST 2015, pp. 373-386; sections 3.1, 4.2-4.4 and 6.1-6.2.
- McAllister et al. Kangaroo: Caching Billions of Tiny Objects on Flash. SOSP 2021, sections 2-5. DOI: 10.1145/3477132.3483568.
- Kangaroo simulator, commit 48397846: MemLogSetsCache insertion, warm-up and calcFlashWriteAmp.
- Pritchett and Thottethodi. SieveStore: A Highly-Selective, Ensemble-level Disk Cache for Cost-Performance. ISCA 2010, pp. 163-174, sections 2-4 and Table 2. DOI: 10.1145/1815961.1815982.
- Soundararajan, Prabhakaran, Balakrishnan and Wobber. Extending SSD Lifetimes with Disk-Based Write Caches. FAST 2010, sections 3-6.
Original model reviewed 11 October; TRIM and cleaning supplements reviewed 18 October 2026 UTC. Original code and computed rows: CC0. Source publications retain their rights. No observed sample, confidence interval, vendor ranking or new empirical discovery is claimed.