Efficient Migrations Between Storage Tiers with PrismDB.

Ashwini Raina, Jianan Lu, Asaf Cidon, Michael J. Freedman

Abstract: In recent years, emerging hardware storage technologies have focused on divergent goals: better performance or lower cost-per-bit of storage. Correspondingly, data systems that employ these new technologies are typically optimized either to be fast (but expensive) or cheap (but slow). We take a different approach: by designing a storage engine to natively utilize two tiers of fast and low-cost storage technologies, we can achieve a Pareto-efficient balance between performance and cost-per-bit. This paper presents the design and implementation of PrismDB, a novel key-value store that exploits two extreme ends of the spectrum of modern NVMe storage technologies (3D XPoint and QLC NAND) simultaneously. Unlike prior work that has retrofitted data structures designed for a single tier to multi-tier storage, PrismDB's data structures and migration mechanism are tailored for different storage layers. The key design contributions of PrismDB is a novel hybrid data structure for tiered storage, and an adaptive and lightweight migration mechanism that is able to efficiently demote cold objects from the fast to the slow storage tier, and promote hot objects to the fast tier. Compared to the standard use of RocksDB on flash in datacenters today, PrismDB's average throughput on tiered storage is 3.3$\times$ faster and its read tail latency is 2$\times$ better, using equivalently-priced hardware.

Introduction: The Tiered Storage Dilemma

Modern storage hardware has split into two extremes: high-performance, expensive Non-Volatile Memory (NVM) and high-density, low-cost QLC NAND flash. While NVM offers near-DRAM speeds, its cost is prohibitive for large-scale data. Conversely, QLC flash is affordable but suffers from slow random writes and limited endurance.

Existing data systems often struggle to bridge this gap. When developers attempt to "retrofit" traditional Log-Structured Merge (LSM) trees like RocksDB to use both tiers—for instance, by using NVM as a cache—they encounter a fundamental efficiency wall.

Comparison of storage layouts: LSM spanning both tiers (left) vs. NVM as a cache (right).

As shown above, simply layering NVM over flash doesn't solve the underlying data movement problem. If "hot" data is pinned in the fast tier, the system eventually runs out of space, triggering massive background compactions to move data to the slow tier. These operations consume significant CPU and I/O resources, often negating the performance benefits of the fast tier.

PrismDB: A Native Multi-Tier Storage Engine

PrismDB is built from the ground up to exploit the strengths of both NVM and QLC flash simultaneously. It employs a "shared-nothing" partitioned architecture and introduces two primary innovations:

1. Hybrid Data Layout

Instead of a uniform LSM tree, PrismDB uses specialized structures for each tier:

  • NVM Tier (Unsorted Slabs): Since NVM handles random writes efficiently, PrismDB stores data in unsorted slabs. This eliminates the heavy CPU overhead associated with constant sorting and merging in the fastest storage layer.
  • Flash Tier (Sorted String Tables): Data is organized into Sorted String Tables (SSTs) on flash to optimize for sequential write patterns, which is critical for maintaining the longevity and performance of QLC NAND.

2. Multi-Tiered Storage Compaction (MSC)

The core of PrismDB is its MSC algorithm, which uses a cost-benefit model to manage data migration.

  • Benefit: Determined by the "coldness" of objects using a multi-bit clock algorithm. Moving cold data to flash frees up expensive NVM space for hotter data.
  • Cost: Calculated based on the Flash I/O required to merge NVM data into existing flash files.
  • Approx-MSC: To ensure the migration logic doesn't become a bottleneck, a lightweight "Approx-MSC" uses buckets to estimate these scores in real-time.

Key Insights: Why Sorting is a Bottleneck

A critical observation in the development of PrismDB is that traditional LSM-trees spend a disproportionate amount of resources on the upper levels of the tree.

Analysis of compaction overhead (a) and data distribution (b) across LSM levels.

As illustrated in the figure above, in a standard tiered LSM setup, the levels typically residing in NVM (L0-L3) account for over 80% of total compactions and compaction CPU time. By moving to unsorted slabs in the NVM tier, PrismDB drastically reduces this overhead, freeing up CPU cycles for user requests.

Performance and Results

Evaluated against standard industry benchmarks (YCSB) and real-world Twitter production traces, PrismDB demonstrates significant advantages:

  • Throughput: PrismDB is 3.3× faster than RocksDB running on TLC flash (the current datacenter standard) at a comparable price point.
  • Latency: It achieves 2× better tail latency, providing more predictable performance for high-demand applications.
  • Flash Longevity: By intelligently selecting data for compaction based on cost-benefit analysis, PrismDB minimizes unnecessary writes to the fragile QLC tier, ensuring hardware meets typical 3-5 year datacenter lifespans.

Conclusion and Future Work

PrismDB proves that a native, multi-tier design can achieve a Pareto-efficient balance between performance and cost. While it currently excels at point queries, future work will focus on improving sequential scan performance through advanced prefetching and optimizing handling for very small objects (<128 bytes) to reduce read amplification.

Summary updated

BibTeX
@inproceedings{raina2023efficient,
  author = {Ashwini Raina and Jianan Lu and Asaf Cidon and Michael J. Freedman},
  title = {{Efficient Migrations Between Storage Tiers with PrismDB.}},
  booktitle = {ASPLOS},
  year = {2023},
  doi = {10.1145/3582016.3582052},
}
Figure