# CAMAL: Optimizing LSM-trees via Active Learning

arXiv: https://arxiv.org/abs/2409.15130 · HTML: https://mlsanity.com/paper/2409.15130/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 15 of its 93 references that are in the map.
- First posted on arXiv 23 Sep 2024.

## Builds on (most cited first, 15 of 15)

- [PyTorch: An Imperative Style, High-Performance Deep Learning Library](https://mlsanity.com/paper/1912.01703/) (2019)
- [The Case for Learned Index Structures](https://mlsanity.com/paper/1712.01208/) (2017)
- [Model Complexity of Deep Learning: A Survey](https://mlsanity.com/paper/2103.05127/) (2021)
- [An End-to-End Learning-based Cost Estimator](https://mlsanity.com/paper/1906.02560/) (2019)
- [Plan-Structured Deep Neural Network Models for Query Performance Prediction](https://mlsanity.com/paper/1902.00132/) (2019)
- [Are We Ready For Learned Cardinality Estimation?](https://mlsanity.com/paper/2012.06743/) (2020)
- [Learned Indexes for a Google-scale Disk-based Database](https://mlsanity.com/paper/2012.12501/) (2020)
- [Learning to Optimize LSM-trees: Towards A Reinforcement Learning based Key-Value Store for Dynamic Workloads](https://mlsanity.com/paper/2308.07013/) (2023)
- [Endure: A Robust Tuning Paradigm for LSM Trees Under Workload Uncertainty](https://mlsanity.com/paper/2110.13801/) (2021)
- [Constructing and Analyzing the LSM Compaction Design Space (Updated Version)](https://mlsanity.com/paper/2202.04522/) (2022)
- [On Performance Stability in LSM-based Storage Systems (Extended Version)](https://mlsanity.com/paper/1906.09667/) (2019)
- [An LSM-based Tuple Compaction Framework for Apache AsterixDB (Extended Version)](https://mlsanity.com/paper/1910.08185/) (2019)
- [Breaking Down Memory Walls: Adaptive Memory Management in LSM-based Storage Systems (Extended Version)](https://mlsanity.com/paper/2004.10360/) (2020)
- [Proteus: A Self-Designing Range Filter](https://mlsanity.com/paper/2207.01503/) (2022)
- [Towards Flexibility and Robustness of LSM Trees](https://mlsanity.com/paper/2311.10005/) (2023)

## Built on by (most cited first, 1 of 1)

- [StorageXTuner: An LLM Agent-Driven Automatic Tuning Framework for Heterogeneous Storage Systems](https://mlsanity.com/paper/2510.25017/) (2025)

## Abstract (arXiv)

We use machine learning to optimize LSM-tree structure, aiming to reduce the cost of processing various read/write operations. We introduce a new approach Camal, which boasts the following features: (1) ML-Aided: Camal is the first attempt to apply active learning to tune LSM-tree based key-value stores. The learning process is coupled with traditional cost models to improve the training process; (2) Decoupled Active Learning: backed by rigorous analysis, Camal adopts active learning paradigm based on a decoupled tuning of each parameter, which further accelerates the learning process; (3) Easy Extrapolation: Camal adopts an effective mechanism to incrementally update the model with the growth of the data size; (4) Dynamic Mode: Camal is able to tune LSM-tree online under dynamically changing workloads; (5) Significant System Improvement: By integrating Camal into a full system RocksDB, the system performance improves by 28% on average and up to 8x compared to a state-of-the-art RocksDB design.
