Improve the Performance of LSM-Tree based on Key-Value via Multithreading
Yuan Gao, Ping Xie, Wendi Hua, Meng Lv, LU Jia-ting · 2021
In the era of big data, key-value storage systems based on Log-Structure Merge tree (LSM-tree) are widely used in numerous industries. LSM-Tree is divided into two parts, one part is in the memory and the other part is on the hard disk. When writing data, first write to the memory, when the Immutable Memtable in the memory is full of data, then write to the disk to output a Sorted String Table (SSTable) file. However, the use of writing data from memory to disk is single-threaded. When the Immutable Memtable writes data to the disk, it will block other threads. This article uses multiple Immutable Memtables and multi-threaded writing to solve the single-thread blocking problem. By running the benchmarks of LevelDB to analyze the experiment, the experimental results indicate a higher improvement.