ABSTRACT
This paper presents a simple design approach that can be easily integrated into existing mature log-structured key-value (KV) stores (e.g., RocksDB) to mitigate the impact of background compaction. Reducing compaction-induced performance degradation has been widely studied, and most prior work focused on developing innovative data structures and algorithms to directly reduce the compaction-induced write amplification. Nevertheless, it is non-trivial or even practically infeasible for existing mature KV stores to adopt these new data structures and algorithms. Meanwhile, in the presence of well-established ecosystem and community around existing ones, it is a challenge to build and grow a new log-structured KV store with meaningful real-world adoption. Therefore, this work focuses on mitigating the impact of compaction while keeping the data structures and algorithms in existing KV stores completely intact. Instead of directly reducing the write amplification, this work applies the simple memory/storage tiering concept to mitigate the impact of compaction at the cost of larger write-ahead log (WAL) and host memory capacity usage. This paper presents design approaches to effectively reduce the WAL size and memory cost. We integrated this solution into RocksDB by only adding about 1,200 lines of code, without touching its core data structure and algorithm. Using 100GB and 1TB datasets as test vehicles, we carried out experiments with db_bench and YCSB workloads, and the results show that the modified RocksDB can improve the ops/s by up to 100.7% and meanwhile reduce the 99-percentile tail latency by up to 82%.
- Apache Cassandra. [n.d.]. . http://cassandra.apache.org/.Google Scholar
- Manos Athanassoulis, Michael S Kester, Lukas M Maas, Radu Stoica, Stratos Idreos, Anastasia Ailamaki, and Mark Callaghan. 2016. Designing Access Methods: The RUM Conjecture. In Proceedings of the International Conference on Extending Database Technology (EDBT). 461–466.Google Scholar
- David F. Bacon, Nathan Bales, Nico Bruno, Brian F. Cooper, Adam Dickinson, Andrew Fikes, Campbell Fraser, Andrey Gubarev, Milind Joshi, Eugene Kogan, Alexander Lloyd, Sergey Melnik, Rajesh Rao, David Shue, Christopher Taylor, Marcel van der Holst, and Dale Woodford. 2017. Spanner: Becoming a SQL System. In Proceedings of the ACM SIGMOD International Conference on Management of Data. 331–343.Google ScholarDigital Library
- Oana Balmau, Diego Didona, Rachid Guerraoui, Willy Zwaenepoel, Huapeng Yuan, Aashray Arora, Karan Gupta, and Pavan Konka. 2017. TRIAD: Creating Synergies Between Memory, Disk and Log in Log Structured Key-Value Stores. In Proceedings of USENIX Annual Technical Conference (ATC). 363–375.Google Scholar
- Oana Balmau, Florin Dinu, Willy Zwaenepoel, Karan Gupta, Ravishankar Chandhiramoorthi, and Diego Didona. 2019. SILK: Preventing Latency Spikes in Log-Structured Merge Key-Value Stores. In Proceedings of USENIX Annual Technical Conference (ATC). 753–766.Google Scholar
- Edward Bortnikov, Anastasia Braginsky, Eshcar Hillel, Idit Keidar, and Gali Sheffi. 2018. Accordion: Better memory organization for LSM key-value stores. Proceedings of the VLDB Endowment 11, 12 (2018), 1863–1875.Google ScholarDigital Library
- Helen HW Chan, Chieh-Jan Mike Liang, Yongkun Li, Wenjia He, Patrick PC Lee, Lianjie Zhu, Yaozu Dong, Yinlong Xu, Yu Xu, Jin Jiang, 2018. HashKV: Enabling Efficient Updates in KV Storage via Hashing. In Proceedings of USENIX Annual Technical Conference (ATC). 1007–1019.Google Scholar
- Compute Express Link (CXL). [n.d.]. . https://www.computeexpresslink.org.Google Scholar
- Brian F Cooper, Adam Silberstein, Erwin Tam, Raghu Ramakrishnan, and Russell Sears. 2010. Benchmarking cloud serving systems with YCSB. In Proceedings of the ACM Symposium on Cloud Computing (SoCC). ACM, 143–154.Google ScholarDigital Library
- Niv Dayan, Manos Athanassoulis, and Stratos Idreos. 2017. Monkey: Optimal navigable key-value store. In Proceedings of the ACM SIGMOD International Conference on Management of Data. ACM, 79–94.Google ScholarDigital Library
- Niv Dayan and Stratos Idreos. 2018. Dostoevsky: Better space-time trade-offs for LSM-tree based key-value stores via adaptive removal of superfluous merging. In Proceedings of the ACM SIGMOD International Conference on Management of Data. ACM, 505–520.Google ScholarDigital Library
- Assaf Eisenman, Darryl Gardner, Islam AbdelRahman, Jens Axboe, Siying Dong, Kim Hazelwood, Chris Petersen, Asaf Cidon, and Sachin Katti. 2018. Reducing DRAM footprint with NVM in Facebook. In Proceedings of the Thirteenth European Conference on Computer Systems (EuroSys). ACM, 42.Google ScholarDigital Library
- Gen-Z. [n.d.]. . https://genzconsortium.org.Google Scholar
- John L Hennessy and David A Patterson. 2019. A new golden age for computer architecture.Commun. ACM 62, 2 (2019), 48–60.Google ScholarDigital Library
- Gui Huang, Xuntao Cheng, Jianying Wang, Yujie Wang, Dengcheng He, Tieying Zhang, Feifei Li, Sheng Wang, Wei Cao, and Qiang Li. 2019. X-Engine: An optimized storage engine for large-scale E-commerce transaction processing. In Proceedings of the ACM SIGMOD International Conference on Management of Data. ACM, 651–665.Google ScholarDigital Library
- Intel Optane DC Persistent Memory Architecture Overview. [n.d.]. . https://techfieldday.com/video/intel-optane-dc-persistent-memory-architecture-overview/.Google Scholar
- Olzhas Kaiyrakhmet, Songyi Lee, Beomseok Nam, Sam H Noh, and Young-ri Choi. 2019. SLM-DB: single-level key-value store with persistent memory. In Proceedings of USENIX Conference on File and Storage Technologies (FAST). 191–205.Google Scholar
- Sudarsun Kannan, Nitish Bhat, Ada Gavrilovska, Andrea Arpaci-Dusseau, and Remzi Arpaci-Dusseau. 2018. Redesigning LSMs for nonvolatile memory with NoveLSM. In Proceedings of USENIX Annual Technical Conference (ATC). 993–1005.Google Scholar
- Chunbo Lai, Song Jiang, Liqiong Yang, Shiding Lin, Guangyu Sun, Zhenyu Hou, Can Cui, and Jason Cong. 2015. Atlas: Baidu’s key-value storage system for cloud data. In Proceedings of the Symposium on Mass Storage Systems and Technologies (MSST). IEEE, 1–14.Google ScholarCross Ref
- S. Lee, B. Jeon, K. Kang, D. Ka, N. Kim, Y. Kim, Y. Hong, M. Kang, J. Min, M. Lee, C. Jeong, K. Kim, D. Lee, J. Shin, Y. Han, Y. Shim, Y. Kim, Y. Kim, H. Kim, J. Yun, B. Kim, S. Han, C. Lee, J. Song, H. Song, I. Park, Y. Kim, J. Chun, and J. Oh. 2019. 512GB 1.1V Managed DRAM Solution with 16GB ODP and Media Controller. In IEEE International Solid- State Circuits Conference (ISSCC). 384–386.Google Scholar
- Lucas Lersch, Ismail Oukid, Wolfgang Lehner, and Ivan Schreter. 2017. An analysis of LSM caching in NVRAM. In Proceedings of the 13th International Workshop on Data Management on New Hardware. 1–5.Google ScholarDigital Library
- Lanyue Lu, Thanumalayan Sankaranarayana Pillai, Hariharan Gopalakrishnan, Andrea C Arpaci-Dusseau, and Remzi H Arpaci-Dusseau. 2017. WiscKey: Separating keys from values in SSD-conscious storage. ACM Transactions on Storage (TOS) 13, 1 (2017), 5.Google ScholarDigital Library
- Chen Luo and Michael J Carey. 2018. LSM-based Storage Techniques: A Survey. arXiv preprint arXiv:1812.07527(2018).Google Scholar
- Open Coherent Accelerator Processor Interface (OpenCAPI). [n.d.]. . https://opencapi.org.Google Scholar
- Patrick O’Neil, Edward Cheng, Dieter Gawlick, and Elizabeth O’Neil. 1996. The log-structured merge-tree (LSM-tree). Acta Informatica 33, 4 (1996), 351–385.Google ScholarDigital Library
- Anastasios Papagiannis, Giorgos Saloustros, Pilar González-Férez, and Angelos Bilas. 2016. Tucana: Design and implementation of a fast and efficient scale-up key-value store. In Proceedings of USENIX Annual Technical Conference (ATC). 537–550.Google Scholar
- Anastasios Papagiannis, Giorgos Saloustros, Pilar González-Férez, and Angelos Bilas. 2018. An efficient memory-mapped key-value store for flash storage. In Proceedings of the ACM Symposium on Cloud Computing (SoCC). ACM, 490–502.Google ScholarDigital Library
- Pandian Raju, Rohan Kadekodi, Vijay Chidambaram, and Ittai Abraham. 2017. PebblesDB: Building Key-Value Stores Using Fragmented Log-Structured Merge Trees. In Proceedings of the Symposium on Operating Systems Principles (SOSP). 497–514.Google ScholarDigital Library
- Kai Ren, Qing Zheng, Joy Arulraj, and Garth Gibson. 2017. SlimDB: A space-efficient key-value storage engine for semi-sorted data. Proceedings of the VLDB Endowment 10, 13 (2017), 2037–2048.Google ScholarDigital Library
- RocksDB. [n.d.]. . https://github.com/facebook/rocksdb.Google Scholar
- Pradeep J Shetty, Richard P Spillane, Ravikant R Malpani, Binesh Andrews, Justin Seyster, and Erez Zadok. 2013. Building workload-independent storage with VT-trees. In Proceedings of USENIX Conference on File and Storage Technologies (FAST). 17–30.Google Scholar
- Xingbo Wu, Yuehai Xu, Zili Shao, and Song Jiang. 2015. LSM-trie: An LSM-tree-based ultra-large key-value store for small data items. In Proceedings of USENIX Annual Technical Conference (ATC). 71–82.Google Scholar
- Fei Xia, Dejun Jiang, Jin Xiong, and Ninghui Sun. 2017. HiKV: a hybrid index key-value store for DRAM-NVM memory systems. In Proceedings of USENIX Annual Technical Conference (ATC). 349–362.Google Scholar
- Ting Yao, Jiguang Wan, Ping Huang, Xubin He, Qingxin Gui, Fei Wu, and Changsheng Xie. 2017. A light-weight compaction tree to reduce I/O amplification toward efficient key-value stores. In Proceedings of the International Conference on Massive Storage Systems and Technology (MSST).Google Scholar
- Ting Yao, Jiguang Wan, Ping Huang, Yiwen Zhang, Zhiwen Liu, Changsheng Xie, and Xubin He. 2019. GearDB: a GC-free key-value store on HM-SMR drives with gear compaction. In Proceedings of USENIX Conference on File and Storage Technologies (FAST). 159–171.Google Scholar
- Yinliang Yue, Bingsheng He, Yuzhe Li, and Weiping Wang. 2016. Building an efficient put-intensive key-value store with skip-tree. IEEE Transactions on Parallel and Distributed Systems 28, 4 (2016), 961–973.Google ScholarDigital Library
Recommendations
Leveraging NVMe SSDs for Building a Fast, Cost-effective, LSM-tree-based KV Store
Key-value (KV) stores support many crucial applications and services. They perform fast in-memory processing but are still often limited by I/O performance. The recent emergence of high-speed commodity non-volatile memory express solid-state drives (NVMe ...
Revisiting Log-Structured Merging for KV Stores in Hybrid Memory Systems
ASPLOS 2023: Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 2We present MioDB, a novel LSM-tree based key-value (KV) store system designed to fully exploit the advantages of byte-addressable non-volatile memories (NVMs). Our experimental studies reveal that the performance bottleneck of LSM-tree based KV stores ...
Splaying Log-Structured Merge-Trees
SIGMOD '18: Proceedings of the 2018 International Conference on Management of DataModern persistent key-value stores typically use a log-structured merge-tree (LSM-tree) design, which allows for high write throughput. Our observation is that the LSM-tree, however, has suboptimal performance during read-intensive workload windows with ...
Comments