sorted-run · shipping · also LSM sorted run

Sorted run

In an LSM-tree, a disk-resident sorted run is a logical sequence of key-ordered records stored in one immutable SST file or range-partitioned across multiple SST files.

Layout: RocksDB's nonzero leveled levels each form one run, while L0 can contain overlapping runs. Individual files being sorted does not make an arbitrary overlapping collection one globally ordered run. [1]

Counting: The documented Universal-compaction example has three one-file L0 runs, a four-file L4 run and an eight-file L5 run: five runs across fifteen files. This is a layout illustration, not a benchmark or a required configuration. [2]

Visibility: Sorted records are not necessarily only the latest values visible to a reader. LevelDB retains deletion markers to hide older values and merges tables during compaction. Ordering, visibility and reclamation are separate concerns. [3]

Relations

related
Log-structured merge-tree, Sorted string table, Leveled compaction, Tiered compaction

Limitations

  • Run count is not a physical-read count: key-range selection, filters, caching and the query type affect which data must actually be read. [4, 6]
  • A Bloom-negative probe can still require filter metadata. Measure key-present/key-absent mix and metadata-cache residency; the cited study's mixed-query latency is an experiment-specific result, not a consequence of run count alone. [4]

Citations

  1. RocksDB project. Leveled Compaction: Structure of the files. (accessed 2026-10-25)
  2. RocksDB project. Universal Compaction: Overview and Data Layout / Sorted Runs. (accessed 2026-10-25)
  3. LevelDB 1.23 implementation note: Sorted tables and Compactions. (accessed 2026-10-25)
  4. Sarkar et al. Constructing and Analyzing the LSM Compaction Design Space. PVLDB 14(11), 2216-2229 (2021), sections 2 and 5.1.2. DOI: 10.14778/3476249.3476274. (accessed 2026-10-25)
  5. RocksDB project. Tuning Guide: Amplification factors and cached versus physical reads. (accessed 2026-10-25)

Further reading

  1. Hesela: Bloom filters, compaction and lookup measurement boundaries. (accessed 2026-10-25)
Sources & caveats
  • The term describes a logical storage unit, not a specific on-disk format. RocksDB layout examples do not define every LSM implementation. [1] [2]

JSON: /data/terms/sorted-run.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Sorted run. Hesela. 2026-10-25. https://hesela.dev/terms/sorted-run/