TL;DR
This paper introduces PrismDB, a novel key-value store designed to efficiently manage data across two distinct storage tiers: fast, expensive Non-Volatile Memory (NVM) and slow, cheap QLC NAND flash. By developing a new multi-tiered compaction algorithm, PrismDB achieves a Pareto-efficient balance of performance and cost, outperforming existing solutions.
What Problem Does This Paper Address?
Modern storage technologies present a dilemma: high-performance options like Intel Optane SSDs (NVM) are expensive, while high-capacity, low-cost options like QLC NAND flash are significantly slower and less durable. Traditional data systems often optimize for one extreme, leading to either high cost or poor performance. Existing attempts to combine these tiers often repurpose single-tier designs (like LSM-trees) with naive tiering strategies, failing to fully leverage the benefits of fast NVM and leading to inefficiencies, particularly in compaction. This paper addresses the challenge of building a storage system that can effectively and affordably utilize both fast and slow storage tiers simultaneously, optimizing for both performance and cost.
Methods
PrismDB employs a hybrid architecture with a novel data layout and a sophisticated multi-tiered storage compaction (MSC) mechanism.
- Hybrid Data Layout: PrismDB uses NVM for hot, frequently accessed data, storing it in unsorted "slab" files optimized for fast random writes and in-place updates. Cold, less frequently accessed data is stored on QLC NAND flash in Sorted String Tables (SSTs), organized as a sorted log to prioritize sequential writes and minimize write amplification. Metadata like indices and bloom filters are stored on NVM for fast lookups.
- Popularity Tracking: A lightweight "clock" algorithm is used to track object popularity. This information is managed by a "tracker" and a "mapper" within each partition.
- Multi-Tiered Storage Compaction (MSC): This is PrismDB's core innovation. It's inspired by classic log cleaning cost-benefit analysis but adapted for a multi-tiered environment. MSC models the "benefit" of reclaiming space by demoting cold data and the "cost" of flash I/O. A novel metric is derived to score key ranges for compaction, balancing the amount of cold data to be moved with the I/O cost on the slower tier. To make this computationally feasible, an "approx-MSC" algorithm is developed, using "buckets" to approximate popularity and overlap statistics.
- Object Lifecycle Management: Objects are initially written to NVM. When NVM nears capacity, a background compaction process demotes cold objects to flash. Crucially, this process can also promote hot objects from flash to NVM, and "read-triggered" compactions proactively move hot data to NVM based on observed access patterns.
Datasets
The paper evaluates PrismDB using:
- YCSB (Yahoo! Cloud Serving Benchmark): Standard benchmarks (YCSB-A, B, C, D, E, F) with various workloads (read-heavy, write-heavy, scan-heavy) and Zipfian distributions to simulate different access patterns.
- Twitter Production Traces: Three real-world traces (write-heavy, mixed, read-heavy) to assess performance on realistic workloads.
No new benchmarks were introduced; the focus was on evaluating PrismDB against existing systems on established benchmarks.
Key Insights and Ideas
- The Tension Between Pinning and Compaction: Simply pinning popular data to fast storage (NVM) can lead to significantly more compactions, ultimately degrading overall performance in LSM-tree based systems. PrismDB's design aims to resolve this tension.
- Cost-Benefit Analysis for Tiered Compaction: Applying a cost-benefit framework to multi-tiered storage is crucial. The "benefit" of reclaiming space on fast tiers must be weighed against the "cost" of I/O on slow tiers, which is orders of magnitude higher.
- Approximation is Key for Compaction Efficiency: Precisely calculating compaction metrics can be too computationally expensive. PrismDB's "approx-MSC" algorithm, using buckets, provides a practical and efficient way to achieve good compaction decisions.
- Read-Awareness is Crucial for Tiered Systems: Traditional LSM-trees are write-optimized. For tiered storage, actively promoting hot data to faster tiers based on read patterns is essential for maximizing performance.
- Partitioning is Vital for NVM Performance: PrismDB's partitioned, shared-nothing architecture minimizes synchronization overheads, allowing it to fully exploit the low latency of NVM.
Key Results
- Significant Performance Gains: PrismDB achieves 3.3x higher throughput and 2x lower tail latency compared to a standard RocksDB deployment on flash, using equivalently priced hardware.
- Cost-Efficiency: PrismDB's het10 configuration (10% NVM, 90% QLC) offers a cost-per-GB ($0.34/GB) close to single-tier TLC flash ($0.31/GB) while delivering vastly superior performance.
- Reduced Flash Write Amplification: PrismDB's MSC algorithm reduces flash write I/O by up to 2.5x compared to a random selection policy.
- Improved Durability: PrismDB can extend the lifetime of QLC NAND flash significantly, making it suitable for many datacenter workloads, even with high write rates.
- Scalability: PrismDB scales well with the number of partitions, up to the number of available CPU cores.
- Workload Adaptability: PrismDB shows strong performance across various workloads, particularly benefiting from its popularity tracking and data placement in Zipfian distributions.
Limitations and Future Work
- QLC Endurance for Write-Heavy Workloads: PrismDB is not ideal for extremely write-heavy workloads on low-endurance QLC NAND. For such scenarios, higher-endurance flash (like TLC NAND) should be provisioned.
- Scan Performance: PrismDB's scan performance is currently suboptimal compared to highly optimized systems like RocksDB, due to a lack of a sophisticated prefetcher.
- Tiny Objects: Handling very small objects (under 128B) incurs high read amplification during compactions due to NVM's 4KB page granularity. Future work includes implementing an application-level page cache to bypass the OS page cache for these cases.
- Automatic Pinning Threshold Tuning: The ideal pinning threshold varies by workload. Future work suggests using a hill-climbing approach to automatically tune this parameter.
- Advanced Features: Features like atomic batched writes, transactions, and snapshots are left for future work.
Summary updated