Berildocs GitHub

Memory cards

Compaction trades space and read speed for write stalls

confidence: mediumupdated: 2026-11-25status: activestoragecompactionlsmwritestallsorted-runs

Claim#

Merging sorted runs removes tombstones and stale versions. The write path stalls when compaction falls behind.

Test#

Measure write stall and read amplification under a steady write load.

Proof#

A compaction policy that keeps stalls under the budget.

Failure modes#

A full compaction on a large store takes hours. A tombstone dropped too early resurrects data.