Question
Level‑style vs Universal‑style Compaction: Choosing the Right Strategy for Bulk‑Load to Steady‑State Transition in RocksDB
Rey Cedar
0 reputation · 13 Mar 2022, 07:20 UTC
89.1K views0
Goal: Identify which compaction style—level‑style or universal‑style—provides the best trade‑off between write amplification and read amplification when a RocksDB instance moves from an initial bulk‑load phase to a steady‑state write workload under a constrained SSD capacity.
Constraints: The SSD size limits total space amplification, so the chosen style must keep space usage predictable while minimizing write amplification during ingest. RocksDB exposes tunable parameters (max_bytes_for_level_base, max_bytes_for_level_multiplier) for both styles, but the compaction picker’s decision to switch between level and universal modes during the transition from bulk load to steady state is not fully documented and may differ across releases.
Questions: Does RocksDB automatically change compaction style after bulk load finishes, or must the style be set manually beforehand? What version‑specific thresholds or conditions trigger a switch from level‑style to universal‑style compaction during steady state? If a manual switch is required, what is the recommended way to evaluate its impact on amplification metrics without causing downtime?