skip to main content
research-article
Open Access

MirrorKV: An Efficient Key-Value Store on Hybrid Cloud Storage with Balanced Performance of Compaction and Querying

Published:12 December 2023Publication History
Skip Abstract Section

Abstract

LSM-based key-value stores have been leveraged in many state-of-the-art data-intensive applications as storage engines. As data volume scales up, a cost-efficient approach is to deploy these applications on hybrid cloud storage with hot/cold separation, which splits the LSM-tree into two parts and thus brings new challenges on how to split and how to close the significant performance gap between these two parts. Existing LSM-tree key-value stores mainly focus on the optimizations of local storage, which incurs sub-optimal performance when directly applied to hybrid storage.

In this paper, we present MirrorKV for efficient compaction and querying on hybrid cloud storage. First, based on the capacities of fast and slow cloud storage, MirrorKV vertically separates hot/cold data of different levels stored in different cloud storage with different compaction mechanisms. To avoid compaction in slow storage being the bottleneck of the write path, MirrorKV proposes a novel virtual split to only compact the metadata during the compaction, which postpones the actual compaction until it reaches deep enough levels. Second, to reduce accessing slow storage during querying, MirrorKV horizontally separates keys and values into two mirrored LSM-trees to differentiate caching priorities; the maintained tree structures preserve the data locality for efficient sequential reading without incurring the overhead of the traditional key-value separation solutions. Finally, MirrorKV leverages cached data to guide the compaction where the hot data is retained in the fast storage while the cold data is compacted to deeper levels in slow storage. Compared with RocksDB-cloud, MirrorKV achieves 2.4× higher random insertion throughput, 29% higher random read throughput, and 99% less compaction time.

References

  1. Matthias Brantner, Daniela Florescu, David Graf, Donald Kossmann, and Tim Kraska. 2008. Building a Database on S3. In Proceedings of the 2008 ACM SIGMOD International Conference on Management of Data (Vancouver, Canada) (SIGMOD '08). Association for Computing Machinery, New York, NY, USA, 251--264. https://doi.org/10.1145/1376616.1376645Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Helen H. W. Chan, Yongkun Li, Patrick P. C. Lee, and Yinlong Xu. 2018. HashKV: Enabling Efficient Updates in KV Storage via Hashing. In 2018 USENIX Annual Technical Conference (USENIX ATC 18). USENIX Association, Boston, MA, 1007--1019. https://www.usenix.org/conference/atc18/presentation/chanGoogle ScholarGoogle Scholar
  3. Subarna Chatterjee, Meena Jagadeesan, Wilson Qin, and Stratos Idreos. 2021. Cosine: A Cloud-Cost Optimized Self-Designing Key-Value Storage Engine. Proc. VLDB Endow. 15, 1 (sep 2021), 112--126. https://doi.org/10.14778/3485450.3485461Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Hao Chen, Chaoyi Ruan, Cheng Li, Xiaosong Ma, and Yinlong Xu. 2021. SpanDB: A Fast, Cost-Effective LSM-tree Based KV Store on Hybrid Storage. In 19th USENIX Conference on File and Storage Technologies (FAST 21). USENIX Association, 17--32. https://www.usenix.org/conference/fast21/presentation/chen-haoGoogle ScholarGoogle Scholar
  5. cockroachdb 2022. CockroachDB. https://www.cockroachlabs.com/product/.Google ScholarGoogle Scholar
  6. Alexander Conway, Abhishek Gupta, Vijay Chidambaram, Martin Farach-Colton, Richard Spillane, Amy Tai, and Rob Johnson. 2020. SplinterDB: Closing the Bandwidth Gap for NVMe Key-Value Stores. In 2020 USENIX Annual Technical Conference (USENIX ATC 20). USENIX Association, 49--63. https://www.usenix.org/conference/atc20/presentation/conwayGoogle ScholarGoogle Scholar
  7. Brian F. Cooper, Adam Silberstein, Erwin Tam, Raghu Ramakrishnan, and Russell Sears. 2010. Benchmarking Cloud Serving Systems with YCSB. In Proceedings of the 1st ACM Symposium on Cloud Computing (Indianapolis, Indiana, USA) (SoCC '10). Association for Computing Machinery, New York, NY, USA, 143--154. https://doi.org/10.1145/1807128.1807152Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Sudipto Das, Amr El Abbadi, and Divyakant Agrawal. 2009. ElasTraS: An Elastic Transactional Data Store in the Cloud. In Workshop on Hot Topics in Cloud Computing (HotCloud 09). USENIX Association, San Diego, CA. https://www.usenix.org/conference/hotcloud-09/elastras-elastic-transactional-data-store-cloudGoogle ScholarGoogle Scholar
  9. Niv Dayan, Manos Athanassoulis, and Stratos Idreos. 2017. Monkey: Optimal Navigable Key-Value Store. In Proceedings of the 2017 ACM International Conference on Management of Data (Chicago, Illinois, USA) (SIGMOD '17). Association for Computing Machinery, New York, NY, USA, 79--94. https://doi.org/10.1145/3035918.3064054Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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 2018 International Conference on Management of Data (Houston, TX, USA) (SIGMOD '18). Association for Computing Machinery, New York, NY, USA, 505--520. https://doi.org/10.1145/3183713.3196927Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Niv Dayan and Stratos Idreos. 2019. The Log-Structured Merge-Bush & the Wacky Continuum. In Proceedings of the 2019 International Conference on Management of Data (Amsterdam, Netherlands) (SIGMOD '19). Association for Computing Machinery, New York, NY, USA, 449--466. https://doi.org/10.1145/3299869.3319903Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Niv Dayan and Moshe Twitto. 2021. Chucky: A Succinct Cuckoo Filter for LSM-Tree. In Proceedings of the 2021 International Conference on Management of Data (Virtual Event, China) (SIGMOD '21). Association for Computing Machinery, New York, NY, USA, 365--378. https://doi.org/10.1145/3448016.3457273Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Niv Dayan, Tamar Weiss, Shmuel Dashevsky, Michael Pan, Edward Bortnikov, and Moshe Twitto. 2022. Spooky: Granulating LSM-Tree Compactions Correctly. Proc. VLDB Endow. 15, 11 (jul 2022), 3071--3084. https://doi.org/10.14778/3551793.3551853Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. ebs 2022. Amazon Elastic Block Store. https://aws.amazon.com/ebs/.Google ScholarGoogle Scholar
  15. ebs_features 2022. Amazon EBS features. https://aws.amazon.com/ebs/features/?nc1=h_ls.Google ScholarGoogle Scholar
  16. efs 2022. Amazon Elastic File System. https://aws.amazon.com/efs/.Google ScholarGoogle Scholar
  17. flink 2022. Apache Flink - Stateful Computations over Data Streams. https://flink.apache.org/.Google ScholarGoogle Scholar
  18. gcs 2022. Google Cloud Storage. https://cloud.google.com/storage/.Google ScholarGoogle Scholar
  19. gfs 2022. Cloud Filestore. https://cloud.google.com/filestore.Google ScholarGoogle Scholar
  20. gpd 2022. Cloud Persistent Disk. https://cloud.google.com/persistent-disk.Google ScholarGoogle Scholar
  21. Shukai Han, Dejun Jiang, and Jin Xiong. 2020. SplitKV: Splitting IO Paths for Different Sized Key-Value Items with Advanced Storage Devices. In 12th USENIX Workshop on Hot Topics in Storage and File Systems (HotStorage 20). USENIX Association. https://www.usenix.org/conference/hotstorage20/presentation/hanGoogle ScholarGoogle Scholar
  22. H. V. Jagadish, P. P. S. Narayan, S. Seshadri, S. Sudarshan, and Rama Kanneganti. 1997. Incremental Organization for Data Recording and Warehousing. In Proceedings of the 23rd International Conference on Very Large Data Bases (VLDB '97). Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 16--25.Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. 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 17th USENIX Conference on File and Storage Technologies (FAST 19). USENIX Association, Boston, MA, 191--205. https://www.usenix.org/conference/fast19/presentation/kaiyrakhmetGoogle ScholarGoogle Scholar
  24. Sudarsun Kannan, Nitish Bhat, Ada Gavrilovska, Andrea Arpaci-Dusseau, and Remzi Arpaci-Dusseau. 2018. Redesigning LSMs for Nonvolatile Memory with NoveLSM. In 2018 USENIX Annual Technical Conference (USENIX ATC 18). USENIX Association, Boston, MA, 993--1005. https://www.usenix.org/conference/atc18/presentation/kannanGoogle ScholarGoogle ScholarDigital LibraryDigital Library
  25. Ana Klimovic, Heiner Litz, and Christos Kozyrakis. 2018. Selecta: Heterogeneous Cloud Storage Configuration for Data Analytics. In 2018 USENIX Annual Technical Conference (USENIX ATC 18). USENIX Association, Boston, MA, 759--773. https://www.usenix.org/conference/atc18/presentation/klimovic-selectaGoogle ScholarGoogle Scholar
  26. Ana Klimovic, Yawen Wang, Patrick Stuedi, Animesh Trivedi, Jonas Pfefferle, and Christos Kozyrakis. 2018. Pocket: Elastic Ephemeral Storage for Serverless Analytics. In 13th USENIX Symposium on Operating Systems Design and Implementation (OSDI 18). USENIX Association, Carlsbad, CA, 427--444. https://www.usenix.org/conference/osdi18/presentation/klimovicGoogle ScholarGoogle ScholarDigital LibraryDigital Library
  27. leveldbbench 2022. LevelDB bench tool. https://github.com/google/leveldb/blob/master/benchmarks/db_bench.cc.Google ScholarGoogle Scholar
  28. Haoyuan Li. 2018. Alluxio: A Virtual Distributed File System.Google ScholarGoogle Scholar
  29. Wenjie Li, Dejun Jiang, Jin Xiong, and Yungang Bao. 2020. HiLSM: An LSM-Based Key-Value Store for Hybrid NVM-SSD Storage Systems. In Proceedings of the 17th ACM International Conference on Computing Frontiers (Catania, Sicily, Italy) (CF '20). Association for Computing Machinery, New York, NY, USA, 208--216. https://doi.org/10.1145/3387902.3392621Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Yongkun Li, Zhen Liu, Patrick P. C. Lee, Jiayu Wu, Yinlong Xu, Yi Wu, Liu Tang, Qi Liu, and Qiu Cui. 2021. Differentiated Key-Value Storage Management for Balanced I/O Performance. In 2021 USENIX Annual Technical Conference (USENIX ATC 21). USENIX Association, 673--687. https://www.usenix.org/conference/atc21/presentation/li-yongkunGoogle ScholarGoogle Scholar
  31. Zhao Lucis Li, Chieh-Jan Mike Liang, Wenjia He, Lianjie Zhu, Wenjun Dai, Jin Jiang, and Guangzhong Sun. 2018. Metis: Robustly Tuning Tail Latencies of Cloud Systems. In 2018 USENIX Annual Technical Conference (USENIX ATC 18). USENIX Association, Boston, MA, 981--992. https://www.usenix.org/conference/atc18/presentation/li-zhaoGoogle ScholarGoogle Scholar
  32. 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 Trans. Storage 13, 1, Article 5 (March 2017), 28 pages. https://doi.org/10.1145/3033273Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Chen Luo and Michael J. Carey. 2019. LSM-Based Storage Techniques: A Survey. The VLDB Journal 29, 1 (jul 2019), 393--418. https://doi.org/10.1007/s00778-019-00555-yGoogle ScholarGoogle ScholarDigital LibraryDigital Library
  34. Chen Luo and Michael J. Carey. 2019. On Performance Stability in LSM-Based Storage Systems. Proc. VLDB Endow. 13, 4 (dec 2019), 449--462. https://doi.org/10.14778/3372716.3372719Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Siqiang Luo, Subarna Chatterjee, Rafael Ketsetsidis, Niv Dayan, Wilson Qin, and Stratos Idreos. 2020. Rosetta: A Robust Space-Time Optimized Range Filter for Key-Value Stores. In Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data (Portland, OR, USA) (SIGMOD '20). Association for Computing Machinery, New York, NY, USA, 2071--2086. https://doi.org/10.1145/3318464.3389731Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. mongodb 2022. MongoDB. https://www.mongodb.com/.Google ScholarGoogle Scholar
  37. Bernhard Mößner, Christian Riegger, Arthur Bernhardt, and Ilia Petrov. 2023. bloomRF: On Performing Range-Queries in Bloom-Filters with Piecewise-Monotone Hash Functions and Prefix Hashing. In Proceedings 26th International Conference on Extending Database Technology, EDBT 2023, Ioannina, Greece, March 28--31, 2023, Julia Stoyanovich, Jens Teubner, Nikos Mamoulis, Evaggelia Pitoura, Jan Mühlig, Katja Hose, Sourav S. Bhowmick, and Matteo Lissandrini (Eds.). OpenProceedings.org, 131--143. https://doi.org/10.48786/edbt.2023.11Google ScholarGoogle ScholarCross RefCross Ref
  38. myrocks 2022. A RocksDB storage engine with MySQL. http://myrocks.io/.Google ScholarGoogle Scholar
  39. Patrick O'Neil, Edward Cheng, Dieter Gawlick, and Elizabeth O'Neil. 1996. The Log-Structured Merge-Tree (LSM-Tree). Acta Inf. 33, 4 (June 1996), 351--385. https://doi.org/10.1007/s002360050048Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. presto 2022. Presto - Distributed SQL Query Engine for Big Data. https://prestodb.io/.Google ScholarGoogle Scholar
  41. 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 26th Symposium on Operating Systems Principles (Shanghai, China) (SOSP '17). Association for Computing Machinery, New York, NY, USA, 497--514. https://doi.org/10.1145/3132747.3132765Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Kai Ren, Qing Zheng, Joy Arulraj, and Garth Gibson. 2017. SlimDB: A Space-Efficient Key-Value Storage Engine for Semi-Sorted Data. Proc. VLDB Endow. 10, 13 (Sept. 2017), 2037--2048. https://doi.org/10.14778/3151106.3151108Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. rocksdbcache 2022. RocksDB Block Cache. https://github.com/facebook/rocksdb/wiki/Block-Cache.Google ScholarGoogle Scholar
  44. rocksdbcloud 2022. RocksDB-Cloud: A Key-Value Store for Cloud Applications. https://github.com/rockset/rocksdb-cloud.Google ScholarGoogle Scholar
  45. s3 2022. Amazon S3. https://aws.amazon.com/s3/.Google ScholarGoogle Scholar
  46. Subhadeep Sarkar, Dimitris Staratzis, Ziehen Zhu, and Manos Athanassoulis. 2021. Constructing and Analyzing the LSM Compaction Design Space. Proc. VLDB Endow. 14, 11 (jul 2021), 2216--2229. https://doi.org/10.14778/3476249.3476274Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. spark 2022. Apache Spark - Lightning-fast unified analytics engine. https://spark.apache.org/.Google ScholarGoogle Scholar
  48. Yuzhe Tang, Arun Iyengar, Wei Tan, Liana Fong, Ling Liu, and Balaji Palanisamy. 2015. Deferred Lightweight Indexing for Log-Structured Key-Value Stores. In 2015 15th IEEE/ACM International Symposium on Cluster, Cloud and Grid Computing. 11--20. https://doi.org/10.1109/CCGrid.2015.150Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. tidb 2022. PingCAP. https://pingcap.com/products/tidb.Google ScholarGoogle Scholar
  50. Kapil Vaidya, Subarna Chatterjee, Eric Knorr, Michael Mitzenmacher, Stratos Idreos, and Tim Kraska. 2022. SNARF: A Learning-Enhanced Range Filter. Proc. VLDB Endow. 15, 8 (apr 2022), 1632--1644. https://doi.org/10.14778/3529337.3529347Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. Ziwei Wang, Zheng Zhong, Jiarui Guo, Yuhan Wu, Haoyu Li, Tong Yang, Yaofeng Tu, Huanchen Zhang, and Bin Cui. [n. d.]. REncoder: A Space-Time Efficient Range Filter with Local Encoder. ([n. d.]).Google ScholarGoogle Scholar
  52. wisckeygithub 2022. Implementation of WiscKey. https://github.com/cld378632668/Wisckey_SeparateKVStorage.Google ScholarGoogle Scholar
  53. 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 2015 USENIX Annual Technical Conference (USENIX ATC 15). USENIX Association, Santa Clara, CA, 71--82. https://www.usenix.org/conference/atc15/technical-session/presentation/wuGoogle ScholarGoogle ScholarDigital LibraryDigital Library
  54. Peng Xu, Nannan Zhao, Jiguang Wan, Wei Liu, Shuning Chen, Yuanhui Zhou, Hadeel Albahar, Hanyang Liu, Liu Tang, and Changsheng Xie. 2021. Building A Fast and Efficient LSM-tree Store by Integrating Local Storage with Cloud Storage. In 2021 IEEE International Conference on Cluster Computing (CLUSTER). 125--134. https://doi.org/10.1109/Cluster48925.2021.00032Google ScholarGoogle ScholarCross RefCross Ref
  55. Ting Yao, Zhihu Tan, Jiguang Wan, Ping Huang, Yiwen Zhang, Changsheng Xie, and Xubin He. 2019. SEALDB: An Efficient LSM-tree Based KV Store on SMR Drives with Sets and Dynamic Bands. IEEE Transactions on Parallel and Distributed Systems 30, 11 (2019), 2595--2607. https://doi.org/10.1109/TPDS.2019.2918219Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. 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 17th USENIX Conference on File and Storage Technologies (FAST 19) (Boston, MA, USA) (FAST'19). USENIX Association, Boston, MA, 159--171. https://www.usenix.org/conference/fast19/presentation/yaoGoogle ScholarGoogle Scholar
  57. Ting Yao, Yiwen Zhang, Jiguang Wan, Qiu Cui, Liu Tang, Hong Jiang, Changsheng Xie, and Xubin He. 2020. MatrixKV: Reducing Write Stalls and Write Amplification in LSM-tree Based KV Stores with Matrix Container in NVM. In 2020 USENIX Annual Technical Conference (USENIX ATC 20). USENIX Association, 17--31. https://www.usenix.org/conference/atc20/presentation/yaoGoogle ScholarGoogle Scholar
  58. Hobin Yoon, Juncheng Yang, Sveinn Fannar Kristjansson, Steinn E. Sigurdarson, Ymir Vigfusson, and Ada Gavrilovska. 2018. Mutant: Balancing Storage Cost and Latency in LSM-Tree Data Stores. In Proceedings of the ACM Symposium on Cloud Computing (Carlsbad, CA, USA) (SoCC '18). Association for Computing Machinery, New York, NY, USA, 162--173. https://doi.org/10.1145/3267809.3267846Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. Huanchen Zhang, Hyeontaek Lim, Viktor Leis, David G. Andersen, Michael Kaminsky, Kimberly Keeton, and Andrew Pavlo. 2018. SuRF: Practical Range Query Filtering with Fast Succinct Tries. In Proceedings of the 2018 International Conference on Management of Data (Houston, TX, USA) (SIGMOD '18). Association for Computing Machinery, New York, NY, USA, 323--336. https://doi.org/10.1145/3183713.3196931Google ScholarGoogle ScholarDigital LibraryDigital Library
  60. Q. Zhang, Y. Li, P. P. C. Lee, Y. Xu, Q. Cui, and L. Tang. 2020. UniKV: Toward High-Performance and Scalable KV Storage in Mixed Workloads via Unified Indexing. In 2020 IEEE 36th International Conference on Data Engineering (ICDE). 313--324. https://doi.org/10.1109/ICDE48307.2020.00034Google ScholarGoogle ScholarCross RefCross Ref
  61. zhichao Cao, Siying Dong, Sagar Vemuri, and David H.C. Du. 2020. Characterizing, Modeling, and Benchmarking RocksDB Key-Value Workloads at Facebook. In 18th USENIX Conference on File and Storage Technologies (FAST 20). USENIX Association, Santa Clara, CA, 209--223. https://www.usenix.org/conference/fast20/presentation/cao-zhichaoGoogle ScholarGoogle Scholar
  62. Jia Zou, Arun Iyengar, and Chris Jermaine. 2019. Pangea: monolithic distributed storage for data analytics. Proceedings of the VLDB Endowment 12 (02 2019), 681--694. https://doi.org/10.14778/3311880.3311885Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. MirrorKV: An Efficient Key-Value Store on Hybrid Cloud Storage with Balanced Performance of Compaction and Querying

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image Proceedings of the ACM on Management of Data
      Proceedings of the ACM on Management of Data  Volume 1, Issue 4
      PACMMOD
      December 2023
      1317 pages
      EISSN:2836-6573
      DOI:10.1145/3637468
      Issue’s Table of Contents

      Copyright © 2023 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 12 December 2023
      Published in pacmmod Volume 1, Issue 4

      Permissions

      Request permissions about this article.

      Request Permissions

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader