计算机科学与探索 ›› 2023, Vol. 17 ›› Issue (11): 2777-2783.DOI: 10.3778/j.issn.1673-9418.2208103

• 数据库技术 • 上一篇    下一篇

面向内存表的可动态配置预写日志框架

朱海铭,黄向东,乔嘉林,王建民   

  1. 1. 清华大学 软件学院,北京 100084
    2. 大数据系统软件国家工程研究中心,北京 100084
  • 出版日期:2023-11-01 发布日期:2023-11-01

Dynamic Configurable Write-Ahead Logging Framework for Memory Table

ZHU Haiming, HUANG Xiangdong, QIAO Jialin, WANG Jianmin   

  1. 1. School of Software, Tsinghua University, Beijing 100084, China
    2. National Engineering Laboratory of Big Data System Software, Beijing 100084, China
  • Online:2023-11-01 Published:2023-11-01

摘要: 通常情况下,NoSQL数据库管理系统启动后,其多个数据库或数据分区的预写日志(WAL)会固定地写入一个或多个日志文件,因而形成强耦合的对应关系。由于数据库逻辑模型与分区配置是由应用业务和计算环境所决定的,在预写日志被强耦合的情况下,数据库管理系统无法对预写日志的个数、大小等进行配置以实现性能调优。针对该问题,提出了一种面向内存表的可动态配置预写日志框架,该框架记录了重写日志,内存表可以动态地被分配给不同的预写日志队列,支持可变的对应关系,实现了预写日志与具体应用之间的解耦。在物联网时序数据库Apache IoTDB上实现了该框架,并进行了相关实验,结果表明使用可动态配置预写日志框架后可以找到比强耦合的预写日志更优的配置方案,写入性能可提高8%~19%,说明该框架能针对不同计算环境和应用负载实现动态性能调优。

关键词: 预写日志(WAL), 重写日志, 日志结构合并树(LSM), 时序数据库

Abstract: Normally, the NoSQL database management systems’ databases or data partitions fixedly write their write-ahead logging (WAL) into one or more log files after they are started up, forming a strong-coupled rela-tionship. Since the database logical model and partition configuration are determined by the application business and computing environments, with the write-ahead logging tightly coupled, the database management systems cannot optimize performance via simply configuring parameters such as the number and size of the write-ahead logging. In response to this problem, this paper proposes a dynamic configurable write-ahead logging framework for memory table. This framework records Redo log, and memory tables can be dynamically allocated to different write-ahead logging queues, supporting mutable relationship and decoupling write-ahead logging and applications. This paper implements this framework on the time series database Apache IoTDB, and relevant experiments are conducted. Experimental results show that, compared with strong-coupled write-ahead logging, this dynamic configurable write-ahead logging framework can find a better configuration and improve the write performance by 8% to 19%, indicating that this framework can achieve dynamic performance tuning for different computing environments and application loads.

Key words: write-ahead logging (WAL), Redo log, log-structured merge-tree (LSM), time series database