Reducing Write Stall and Write Amplification for LSM-Tree Based Key-Value Stores Using a Hybrid Compression Strategy
摘要
The mainstream LSM-tree based key-value stores suffer from periodic performance plunges even near zero availability due to write amplification and write stalls. Byte-addressable non-volatile memory, with its low latency and persistence, offers a new opportunity to address these issues. This paper proposes HyLSM, a persistent key-value storage system based on LSM-tree, under a DRAM-NVM-SSD three-tier architecture. HyLSM divides the Memtable into a DRAM Memtable and an NVM Memtable and separates the LSM-tree into hot tiers (stored in NVM) and cold tiers (stored in SSD). Tailored to the characteristics of NVM and SSD, a hybrid compaction mechanism is introduced: fine-grained compaction for NVM tiers and selective compaction for SSD tiers, improving compaction efficiency and alleviating write amplification and write stalls. Through comparative experiments with LevelDB, NVM-based NoveLSM, our optimized version NoveLSM_B, and NVM-based ThanosKV, the results demonstrate that HyLSM achieves significant improvements.