Efficient LSM-Tree Key-Value Data Management on Hybrid SSD/HDD Zoned Storage

Jinhong Li, Qiuping Wang, Patrick P. C. LeearXiv 2022 · DOI

Introduction

Modern data centers increasingly rely on Key-Value (KV) stores for high-performance data management. However, the evolution of storage hardware toward Zoned Storage—including Zoned Namespace (ZNS) SSDs and Host-Managed Shingled Magnetic Recording (HM-SMR) HDDs—presents new challenges. Traditional block interfaces are being replaced by sequential-write-only zones, shifting the burden of data management to the software layer. This paper introduces HHZS, a middleware system designed to optimize Log-Structured Merge-tree (LSM-tree) KV stores for hybrid zoned storage environments.

Background: LSM-Trees and Zoned Storage

LSM-trees, used in databases like RocksDB, organize data into multiple levels (L0 to Ln). Data is first written to an in-memory MemTable and a Write-Ahead Log (WAL) for persistence. Once the MemTable is full, it is flushed as a Sorted String Table (SST) to the storage layer, typically starting at L0. Compaction processes then merge these files into deeper levels to maintain performance.

Standard LSM-tree architecture showing data flow from memory to persistent storage levels.

In a hybrid setup, the goal is to place "hot" data on fast ZNS SSDs while utilizing high-capacity HM-SMR HDDs for "cold" data. Existing static placement strategies often fail because LSM-tree level sizes and access patterns are highly dynamic and unpredictable.

The HHZS Middleware

HHZS acts as an intelligent layer between the LSM-tree and physical zoned devices. It leverages application-level hints to guide three core mechanisms:

  1. Hint-Driven Placement: By monitoring "flushing" and "compaction" hints, HHZS dynamically calculates real-time storage demand. It prioritizes SSD allocation for levels that benefit most from high-speed access, rather than relying on fixed level-to-device mappings.
  2. Workload-Aware Migration: HHZS manages background data movement. Capacity migration proactively moves data to HDDs to maintain free space on SSDs for incoming writes. Simultaneously, Popularity migration identifies frequently accessed files on HDDs and promotes them to SSDs.
  3. Application-Hinted Caching: To mitigate the latency of HDD reads, HHZS intercepts blocks evicted from the database's in-memory cache. If the block resides on an HDD, HHZS stores it in a dedicated "cache zone" on the SSD, ensuring that frequently reused data remains on fast media.

Key Insights: The "Target Size" Myth

A critical finding of this research is that database configurations are poor predictors of actual storage requirements. While LSM-trees have theoretical "target sizes" for each level, real-world workloads often cause levels to balloon far beyond these targets.

Box plot illustrating the significant variability in actual data sizes across different LSM-tree levels compared to their theoretical targets.

As shown in the experimental data, a level's actual size can exceed its target by up to 40x during heavy write bursts. This unpredictability necessitates the dynamic "storage demand" monitoring implemented in HHZS to prevent performance degradation when static allocations fail.

Evaluation and Results

The researchers evaluated HHZS using a testbed with a 4-TiB ZNS SSD and a 14-TiB HM-SMR HDD, running standard YCSB workloads. Key results include:

  • Throughput Gains: HHZS achieved throughput gains of 28.0% to 69.3% over SpanDB, a state-of-the-art hybrid system.
  • Efficiency: The system maintained high SSD utilization through dynamic tiering and effectively reduced the bottleneck of slow HDD random reads via its sequential SSD caching mechanism.
  • Latency Management: By rate-limiting background migrations (defaulting to 4 MiB/s), HHZS improved long-term performance without significantly impacting tail latency.

Conclusion

HHZS demonstrates that application-aware middleware can significantly enhance the performance of KV stores on hybrid zoned storage. By moving away from static rules and embracing dynamic, hint-driven management, HHZS bridges the gap between complex LSM-tree behaviors and the strict requirements of modern zoned hardware.

Summary updated

BibTeX
@misc{li2022efficient,
  author = {Jinhong Li and Qiuping Wang and Patrick P. C. Lee},
  title = {{Efficient LSM-Tree Key-Value Data Management on Hybrid SSD/HDD Zoned Storage}},
  year = {2022},
  eprint = {2205.11753},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2205.11753},
}
Figure