The 13th KIR: Improving the Read Performance of KV database in Klaytn (Milestone 4): Progress Report(4)
The blockchain system such as Klaytn is used by a huge amount of users and nodes. Due to the large number of users, a lot of data items are generated and processed. These items are both globally and locally managed by different types of nodes in the blockchain system. Each node in the system manages the data and such data items are written and read when operations related to block processing in the system are executed. When the data items are required to be written or read, the underlying KV (Key-Value) database, which manages the data, executes I/O operations according to its own implementation and mechanism. However, due to an excessive amount of data or a large number of requests, the KV database is prone to cause bottlenecks in the process of blockchain operations and this leads to delays and even instability of the blockchain network consisting of multiple nodes.
The purpose of this project is to analyze various aspects of KV database in Klaytn. This research (Milestone 4) is to design features in terms of the algorithms and data structure in KV database and examine the performance of the modified design. In the previous research activities, we studied the I/O characteristics and performance of Klaytn’s KV database (LevelDB) and impacts of characteristics of the database, such as the compaction and data structure. We found that a different data structure such as B+tree has benefits for the read performance but it has to give up a lot more on the write performance. Thus, it is important to investigate and try read-friendly features from B+tree, to the LSMT (Log Structured Merge Tree)-based KV database. In addition, we showed that the compactions interfere with normal KV operations, and confirmed that multi-threaded compactions can help Klaytn reduce the level of interference with normal and compaction operations. Using those results, we aim to make a final form of KV database design that can lead to an improvement in the read performance of the KV database in Klaytn.
The milestone (revised) and schedule is presented below. The detailed explanation of the milestone is described in the attached report.
As the last stage of our project (Milestone 4), we provide the progress report which contains a description of additional features we implemented and experimental results.
Additionally, we share the Github repository for LevelDB source code which has newly implemented and modified portions of codes. We will upload and update the GitHub repository.
Please refer to the attached report for any details.