Journal of Computer Applications ›› 2016, Vol. 36 ›› Issue (4): 1002-1007.DOI: 10.11772/j.issn.1001-9081.2016.04.1002

Previous Articles     Next Articles

Parallel instance recovery method based on multi-thread

LU Dongdong1, HE Qingfa2   

  1. 1. China Aerospace Engineering Consultation Center, Beijing 100048, China;
    2. Beijing Shenzhou Aerospace Software Technology Company Limited, Beijing 100094, China
  • Received:2015-10-12 Revised:2015-11-10 Online:2016-04-10 Published:2016-04-08
  • Supported by:
    This work is partially supported by the Special Funds for Tianjin Software Industry Development Program (201406101).

基于多线程的并行实例恢复方法

卢栋栋1, 何清法2   

  1. 1. 中国航天工程咨询中心, 北京 100048;
    2. 北京神舟航天软件技术有限公司, 北京 100094
  • 通讯作者: 卢栋栋
  • 作者简介:卢栋栋(1991-),男,河南安阳人,硕士研究生,主要研究方向:数据库; 何清法(1970-),男,浙江江山人,研究员,博士,主要研究方向:数据库、信息安全。
  • 基金资助:
    天津市软件产业发展专项资金资助项目(201406101)。

Abstract: Concerning the low efficiency of serialized execution in database instance recovery and relying on ShenTong database, a parallel instance recovery method based on multi-thread was proposed. First, two steps including "building dirty page table" and "prefetching dirty pages" were added to the original database instance recovery model to get an improved model. Second, the improved model was processed by the multi-threaded parallel processing way and a parallel instance recovery model was generated. Finally, by using rollback segment management strategy, undo log was managed as normal data and the parallel instance recovery could be finished earlier. In the comparison experiments with the original method, Transaction Processing performance Council-C (TPC-C) benchmark test result of the parallel recovery method showed that the efficiency of reading and parsing redo log increased by 2-7 times, the efficiency of redoing increased by 4-9 times, and the total time for recovery reduced to 20%-40%. The results prove that the parallel instance recovery method can accomplish parallel processing of each stage, reduce the time needed for recovery and ensure the high efficiency of database in practical applications.

Key words: instance recovery, parallel recovery, multi-thread, redo log, undo log, Log Sequence Number (LSN)

摘要: 针对数据库实例恢复串行化执行效率低的问题,以神通数据库为基础提出一种基于多线程的并行实例恢复方法。首先,在数据库原有实例恢复模型基础上,增加"构建脏页表"和"脏页预取"两个步骤,得到改进后的实例恢复模型;其次,结合多线程并发处理思想,提出并行实例恢复方法,对改进的实例恢复模型进行并发处理;最后,由于采用回滚段进行undo日志管理,可以实现undo日志的正常数据化管理,提前结束实例恢复。通过进行TPC-C基准测试,并行实例恢复方法的读取、解析redo日志效率与原有方法相比提高了2~7倍,重做redo日志效率提高了4~9倍,整体所用时间减少为原有方法的20%~40%。实验结果表明,并行实例恢复方法实现了各阶段的并行化,减少了实例恢复所需时间,保证了数据库在实际应用中的高效性。

关键词: 实例恢复, 并行恢复, 多线程, redo日志, undo日志, 日志序列号

CLC Number: