Rangereduce: Query-Driven LSM Compactions
Shubham Kaushik, Manos Athanassoulis, Subhadeep Sarkar
Abstract
Log-structured merge (LSM) trees are widely used in the storage layer of modern ingestion-optimized data stores. The high ingestion throughput, however, comes at the cost of sub-optimal range query (RQ) performance. This is because LSM-trees arrange the data as a hierarchical collection of sorted runs, which implies that every RQ must (i) probe all sorted runs to locate the qualifying entries, (ii) scan and merge the entries from all qualifying runs, (iii) filter out the logically invalidated entries by updates and deletes on the fly, and (iv) return the most recent version of each qualifying key. This leads to high read amplification and significant redundant work in terms of superfluous I/Os to storage and wasted CPU cycles, which is exacerbated in the presence of updates and deletes. Additionally, during compactions, the same data is read and written multiple times, further amplifying the read and write amplification. In this paper, we introduce RangeReduce, an RQ-optimized LSM-engine that uses RQs as a hint to compact data that is already read into memory as part of the query, and thereby, improves the overall performance of the storage engine. The key intuition is to take advantage of the I/Os and CPU cycles spent on reading and merging data from slow storage during RQs and write the RQ-qualifying data back as part of a single sorted run. Such RQ-driven compactions enable RangeReduce to (i) read less data from fewer sorted runs for subsequent RQs, (ii) reduce overall data movement (reads and writes) due to RQs and compactions, and (iii) improve space amplification, while (iv) significantly reducing compaction debt. Experiments show that RangeReduce offers up to 90% lower compaction debt, 12% less data movement, and 20% lower space amplification while improving average RQ latency by up to 18%.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get f74a49c9-3069-45b9-86c3-72efdfad4da4Related papers
- Constructing and Analyzing the LSM Compaction Design SpaceSubhadeep Sarkar, Dimitris Staratzis, Zichen Zhu, Manos AthanassoulisVLDB 2021 · 73 citations
- Disco: A Compact Index for LSM-treesWenshao Zhong, Chen Chen, Xingbo Wu, Jakob ErikssonSIGMOD 2025 · 2 citations
- Rethinking The Compaction Policies in LSM-treesHengrui Wang, Jiansheng Qiu, Fangzhou Yuan, Huanchen ZhangSIGMOD 2025 · 9 citations
- Less is More: De-amplifying I/Os for Key-value Stores with a Log-assisted LSM-treeKecheng Huang, Zhiping Jia, Zhaoyan Shen, Zili Shao et al.ICDE 2021 · 27 citations
- Doux: Decoupling Values from Keys for Real-Time AnalyticsShiming Yang, Yu Luo, Shuang Liu, Wei Lu et al.ICDE 2026
