Definition · Write and read amplificationWrite amplification is the bytes an engine writes to durable storage for every byte the application hands it. Read amplification is the storage reads a single logical lookup performs.
For a levelled LSM tree with fanout F and L levels these are WA ≈ L·F/2 and RA ≈ L. Both are counts, both are ratios, and neither is a latency.
The F/2 is the part worth slowing down for. It is not F. A merge into a level rewrites whatever part of that level overlaps the incoming run, and a level spends its life filling from empty to full between merges — so averaged over that cycle, a byte passing through is rewritten about half of F times rather than F times. Every figure on this page inherits that word “about”.
memtable 64 MB F = 10 L = 5 ingest 50 MB/s
level capacity = memtable · Fᴸ rewrites a byte bandwidth cumulative
L1 640.00 MB 5 × 250.00 MB/s 5 ×
L2 6.40 GB 5 × 250.00 MB/s 10 ×
L3 64.00 GB 5 × 250.00 MB/s 15 ×
L4 640.00 GB 5 × 250.00 MB/s 20 ×
L5 6.40 TB 5 × 250.00 MB/s 25 ×
WA = L · F/2 = 5 × 5 = 25 compaction = 25 × 50 MB/s = 1.25 GB/s
RA = L = 5 probes on a miss
The last column is the whole lesson. A device sized to the ingest rate needs 50 MB/s; the engine needs 1.25 GB/s, and it needs it whether or not anybody is reading. That factor of twenty-five is not overhead in the loose sense — it is the mechanism by which the writes became sequential in the first place.
Example · How many levels the data actually forcesThe level count is not really a setting. Level capacities are memtable × Fᴸ, so at a 64 MB memtable and F = 10 the levels hold 640 MB, 6.40 GB, 64 GB, 640 GB and 6.40 TB. A terabyte of data does not fit in four levels and does fit in five, so L = 5 — found by the same integer search that gives a B-tree its height, multiplying F in until the capacity covers the data.
The misconception: append-only means cheap
It means sequential, which is a claim about the first term of the read-time formula and a good one: an LSM has no random writes at all on the ingest path, which is exactly what “The Write Cost of an Index” showed a B-tree paying k + 1 of. What it does not mean is few. The engine bought a better access pattern by agreeing to rewrite the data twenty-five times, and both halves of that sentence are the design.
Lowering the fanout lowers the write amplification and raises everything else. At F = 4 the same terabyte over the same memtable forces 7 levels, so WA falls to 14 — 700 MB/s of compaction instead of 1.25 GB/s — and RA rises from 5 probes to 7. There is no setting of F that improves both, which is the shape “The RUM Trade-off” draws as a triangle.
Two caveats the lab carries. WA ≈ L·F/2 describes levelled compaction; a tiered engine merges whole runs instead and pays L rather than L·F/2, in exchange for a much worse read amplification. And compaction is bursty: 1.25 GB/s is the average the device must sustain, while the instantaneous demand during a large merge is higher and the demand between merges is lower.