1 State Key Laboratory of Computer Architecture, Institute of Computing Technology, Chinese Academy of Sciences Beijing 100190, China;
2 University of Chinese Academy of Sciences, Beijing 100049, China;
3 Institute of Information Engineering, Chinese Academy of Sciences, Beijing 100093, China
Abstract Key-value (KV) stores have become a backbone of large-scale applications in today's data centers. Writeoptimized data structures like the Log-Structured Merge-tree (LSM-tree) and their variants are widely used in KV storage systems like BigTable and RocksDB. Conventional LSM-tree organizes KV items into multiple, successively larger components, and uses compaction to push KV items from one smaller component to another adjacent larger component until the KV items reach the largest component. Unfortunately, current compaction scheme incurs significant write amplification due to repeated KV item reads and writes, and then results in poor throughput. We propose a new compaction scheme, delayed compaction (dCompaction) that decreases write amplification. dCompaction postpones some compactions and gathers them into the following compaction. In this way, it avoids KV item reads and writes during compaction, and consequently improves the throughput of LSM-tree based KV stores. We implement dCompaction on RocksDB, and conduct extensive experiments. Validation using YCSB framework shows that compared with RocksDB, dCompaction has about 40% write performance improvements and also comparable read performance.
This work is supported by the National Key Research and Development Program of China under Grant No. 2016YFB1000202 and the National Natural Science Foundation of China under Grant Nos. 61303056 and 61379042.
About author: Feng-Feng Pan received his B.S. degree in computer science and technology from Central South University, Changsha, in 2010. He is now a Ph.D. candidate in the Institute of Computing Technology, Chinese Academy of Sciences, Beijing. His research interests include big data storage and management, storage systems, and big data analysis.
Cite this article:
Feng-Feng Pan, Yin-Liang Yue, Jin Xiong.dCompaction: Speeding up Compaction of the LSM-Tree via Delayed Compaction[J] Journal of Computer Science and Technology, 2017,V32(1): 41-54
 Sears R, Ramakrishnan R. bLSM:A general purpose log structured merge tree. In Proc. the ACM SIGMOD Inter national Conference on Management of Data, May 2012, pp.217-228. Huang Q, Birman K, van Renesse R, Lloyd W, Kumar S, Li H C. An analysis of Facebook photo caching. In Proc. the 24th ACM Symposium on Operating Systems Princi ples (SOSP), Nov. 2013, pp.167-181. Atikoglu B, Xu Y, Frachtenberg E et al. Workload analysis of a large-scale key-value store. In Proc. ACM SIGMET RICS, Jun. 2012, pp.53-64. O'Neil P, Cheng E, Gawlick D et al. The log-structured merge-tree (LSM-tree). Acta Informatica, 1996, 33(4):351-385. Chang F, Dean J, Ghemawat S, Hsieh W, Wallach D, Bur rows M, Chandra T, Fikes A, Gruber R. Bigtable:A dis tributed storage system for structured data. In Proc. the 7th USENIX Symposium on Operating Systems Design and Implementation (OSDI), Nov. 2006, pp.205-218. Lakshman A, Malik P. Cassandra:A decentralized struc tured storage system. ACM SIGOPS Operating Systems Review, 2010, 44(2):35-40. George L. HBase:The Definitive Guide. O'Reilly Media, 2011. Escriva R, Wong B, Sirer E. HyperDex:A distributed, searchable key-value store. In Proc. ACM SIGCOMM Conf. Applications, Technologies, Architectures, and Protocols for Computer Communication, Aug. 2012, pp.25-36. Cooper B, Ramakrishnan R, Srivastava U, Silberstein A, Bohannon P, Jacobsen H, Puz N, Weaver D, Yerneni R. PNUTS:Yahoo! hosted data serving platform. Proc. the VLDB Endowment, 2008, 1(2):1277-1288. Shetty P, Spillane R, Malpani R et al. Building workloadindependent storage with VT-trees. In Proc. the 11th USENIX Conference on File and Storage Technologies (FAST), Feb. 2013, pp.17-30. Jermaine C, Omiecinski E, Yee W G. The partitioned exponential file for database storage management. The VLDB Journal, 2007, 16(4):417-437. Zhong Z, Yue Y, He B et al. Pipelined compaction for the LSM-tree. In Proc. the 28th International Parallel and Distributed Processing Symposium (IPDPS), May 2014, pp.777-786. Wu X, Xu Y, Shao Z et al. LSM-trie:An LSM-tree-based ultra-large key-value store for small data. In Proc. the USENIX Annual Technical Conference (ATC), Jul. 2015, pp.71-82. Amur H, Andersen D, Kaminsky M et al. Design of a writeoptimized data store. Technical Report GIT-CERCS-13-08, Georgia Tech CERCS, 2013. Cooper B, Silberstein A, Tam E, Ramakrishnan R, Sears R. Benchmarking cloud serving systems with YCSB. In Proc. the 1st ACM Symposium on Cloud Computing (SoCC), Jun. 2010, pp.143-154. Spillane R, Shetty P, Zadok E, Dixit S, Archak S. An efficient multi-tier tablet server storage architecture. In Proc. the 2nd ACM Symposium on Cloud Computing in Conjunction with SOSP (SoCC), Oct. 2011, pp.1-14. Bloom H. Space/time trade-offs in hash coding with allowable errors. Communications of the ACM, 1970, 13(7):422-426. Chazelle B, Guibas L. Fractional cascading:A data structuring technique with geometric applications. In Proc. the 12th International Colloquium on Automata, Languages, and Programming (ICALP), Jul. 1985, pp.90-100. Bender M, Farach-Colton M, Fineman J, Fogel Y, Kuszmaul B, Nelson J. Cache-oblivious streaming B-trees. In Proc. the 19th Annual ACM Symposium on Parallel Algorithms and Architectures (SPAA), Jun. 2007, pp.81-92. Li Y, He B, Yang R J et al. Tree indexing on solid state drives. Proc. the VLDB Endowment, 2010, 3(1/2):1195-1206.
Copyright 2010 by Journal of Computer Science and Technology