Skip to main content
QUICK REVIEW

[Paper Review] Learning to Optimize LSM-trees: Towards A Reinforcement Learning based Key-Value Store for Dynamic Workloads

Dingheng Mo, Fanchao Chen|arXiv (Cornell University)|Aug 14, 2023
Advanced Data Storage TechnologiesComputer Science3 citations
TL;DR

RusKey is a reinforcement learning (RL)-enhanced key-value store that dynamically optimizes LSM-tree compaction policies for varying workloads using a novel FLSM-tree structure and a level-based DDPG-based RL model. It achieves up to 4x better end-to-end performance than RocksDB across diverse workloads without prior workload knowledge, demonstrating robustness through adaptive policy learning and efficient policy propagation across levels.

ABSTRACT

LSM-trees are widely adopted as the storage backend of key-value stores. However, optimizing the system performance under dynamic workloads has not been sufficiently studied or evaluated in previous work. To fill the gap, we present RusKey, a key-value store with the following new features: (1) RusKey is a first attempt to orchestrate LSM-tree structures online to enable robust performance under the context of dynamic workloads; (2) RusKey is the first study to use Reinforcement Learning (RL) to guide LSM-tree transformations; (3) RusKey includes a new LSM-tree design, named FLSM-tree, for an efficient transition between different compaction policies -- the bottleneck of dynamic key-value stores. We justify the superiority of the new design with theoretical analysis; (4) RusKey requires no prior workload knowledge for system adjustment, in contrast to state-of-the-art techniques. Experiments show that RusKey exhibits strong performance robustness in diverse workloads, achieving up to 4x better end-to-end performance than the RocksDB system under various settings.

Motivation & Objective

  • To address the challenge of maintaining high performance in LSM-tree-based key-value stores under dynamically changing workloads.
  • To design an online, workload-adaptive system that does not require prior knowledge of workload characteristics.
  • To reduce the high transition cost of switching between compaction policies in LSM-trees, a key bottleneck in dynamic environments.
  • To enable efficient, scalable policy learning across multiple levels of an LSM-tree using reinforcement learning.
  • To develop a new LSM-tree variant, FLSM-tree, that supports efficient and low-cost transitions between compaction policies.

Proposed method

  • Proposes FLSM-tree, a new LSM-tree design that enables efficient transitions between different compaction policies by decoupling policy application from data layout.
  • Introduces a level-based reinforcement learning framework, Lerp, using Deep Deterministic Policy Gradient (DDPG) to learn optimal compaction policies per level.
  • Employs policy propagation across levels to reduce sample complexity and accelerate training by sharing policy knowledge from higher to lower levels.
  • Reduces the action space by modeling policy decisions per level, enabling feasible and scalable RL training.
  • Uses a reward function based on performance metrics (e.g., read/write amplification, latency) to guide policy learning in real-time.
  • Implements online model updates with minimal runtime overhead—less than 1% of total operation cost in most workloads.

Experimental results

Research questions

  • RQ1Can reinforcement learning be effectively used to dynamically tune LSM-tree compaction policies in response to changing workloads?
  • RQ2How can the high cost of transitioning between compaction policies in LSM-trees be minimized to support real-time adaptation?
  • RQ3Can a level-based RL model with policy propagation achieve high performance with reduced training data and faster convergence?
  • RQ4How does the proposed FLSM-tree design improve the efficiency of policy transitions compared to traditional LSM-trees?
  • RQ5To what extent can an RL-based system outperform greedy, static policy selection under diverse and dynamic workloads?

Key findings

  • RusKey achieves up to 4x better end-to-end performance than RocksDB across various workloads, including read-heavy, write-heavy, and balanced workloads.
  • The system demonstrates strong robustness, maintaining near-optimal performance across all workload types without requiring prior workload information.
  • Model update costs are negligible, averaging less than 1% of total operation time, even under high-throughput workloads.
  • Policy propagation significantly reduces sample requirements, enabling effective training where brute-force approaches fail within 24 hours.
  • Greedy policy selection methods fail to achieve optimal performance on balanced or mixed workloads, while RusKey adapts effectively.
  • The FLSM-tree design enables efficient policy transitions, reducing the latency and overhead of switching compaction strategies.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.