Tiered compaction
Tiered compaction allows multiple sorted runs to accumulate and merges groups of runs into typically larger runs instead of maintaining one run at every tier.
Policies commonly group similarly sized runs; exact selection rules vary. Tiering generally reduces rewriting relative to leveling while retaining more runs to search and more obsolete data between merges. These are trade-offs, not fixed amplification factors. [1] Universal compaction is RocksDB's implementation in this family, not a synonym for every tiered policy. It selects runs consecutive in age order; one run can span several SST files. Its space trigger is an estimate, not a hard limit on disk use. [2] Run count alone does not determine scan-comparison cost: REMIX retains merge order across runs. [4]
Relations
- related
- Log-structured merge-tree, LSM compaction, Leveled compaction, Read amplification, Space amplification, Sorted run, REMIX, Lazy leveling, Fluid LSM-tree
Citations
- RocksDB project. Compaction: leveled, tiered and hybrid policies.
- RocksDB project. Universal Compaction: run selection, temporary space and amplification heuristic.
- Zhong, Chen, Wu and Jiang. REMIX: Efficient Range Query for LSM-trees. FAST 2021, pp. 51-64; sections 3-5. Author-hosted full paper.