Computer Engineering and Applications ›› 2021, Vol. 57 ›› Issue (19): 123-128.DOI: 10.3778/j.issn.1002-8331.2009-0508

Previous Articles     Next Articles

Research on Realizing Relational Database In-Memory Storage Model

ZHANG Jun, LIAO Xuehua, YU Xuling, LEI Meng   

  1. 1.School of Computer Science, Sichuan Normal University, Chengdu 610101, China
    2.School of Physics and Electronic Engineering, Sichuan Normal University, Chengdu 610101, China
  • Online:2021-10-01 Published:2021-09-29

关系型数据库内存化存储模型研究

张俊,廖雪花,余旭玲,雷蒙   

  1. 1.四川师范大学 计算机科学学院,成都 610101
    2.四川师范大学 物理与电子工程学院,成都 610101

Abstract:

In a big data environment, the disk database has I/O bottleneck in high concurrent scenarios, while disk data memorization is an effective solution to solve this, and existing memory technologies have problems such as data loss, complex configuration. Based on the in-memory database Redis and taking MySQL as an example, it proposes a lightweight memorization scheme that solves the disk read-write bottleneck of relational databases. This scheme not only improves the database's throughput in high-concurrency scenarios, but also enables access to massive hotspot data efficiently. Row-Based Key-Value storage conversion Model(RB-KVM) and Piecewise Column-Based Key-Value Cross storage conversion Model(PCB-KVCM) are constructed to realize the transformation of heterogeneous database storage model and automated data migration. Finally, it analyzes and compares the two models, and shows RB-KVM has higher data access efficiency, and PCB-KVCM has higher memory utilization and lower time cost.

Key words: MySQL database, distributed Redis cluster, data migration, model transformation, memory storage technology

摘要:

大数据环境下,磁盘数据库存在高并发I/O瓶颈,磁盘数据内存化是解决传统关系型磁盘数据库I/O瓶颈的有效方案。已有的内存化技术存在数据丢失、配置复杂等问题。基于内存数据库Redis,以典型开源关系型数据库MySQL为例,提出一种解决关系型数据库磁盘I/O瓶颈的轻量级内存化解决方案,实现MySQL的内存化存储。同时构建行式键值(RB-KVM)和分段列式键值交叉(PCB-KVCM)存储转换模型,实现异构数据库存储模型的转换和自动化数据迁移。通过分析对比,RB-KVM数据存取效率更高,而PCB-KVCM具有更高的内存利用率且在时间开销上优于RB-KVM。通过实际运行分析,该技术不仅提高了数据库在高并发场景下的吞吐能力,实现了海量热点数据的高效存取,在实际应用中也更加快捷,实施成本更低。

关键词: MySQL数据库, 分布式Redis集群, 数据迁移, 模型转换, 数据内存存储技术