skip to main content
research-article

Index checkpoints for instant recovery in in-memory database systems

Published:01 April 2022Publication History
Skip Abstract Section

Abstract

We observe that the time bottleneck during the recovery phase of an IMDB (In-Memory DataBase system) shifts from log replaying to index rebuilding after the state-of-art techniques for instant recovery have been applied. In this paper, we investigate index checkpoints to eliminate this bottleneck. However, improper designs may lead to inconsistent index checkpoints or incur severe performance degradation. For the correctness challenge, we combine two techniques, i.e., deferred deletion of index entries, and on-demand clean-up of dangling index entries after recovery, to achieve data correctness. For the efficiency challenge, we propose three wait-free index checkpoint algorithms, i.e., ChainIndex, MirrorIndex, IACoW, for supporting efficient normal processing and fast recovery. We implement our proposed solutions in HiEngine, an IMDB being developed as part of Huawei's next-generation cloud-native database product. We evaluate the impact of index checkpoint persistence on recovery and transaction performance using two workloads (i.e., TPC-C and Microbench). We analyze the pros and cons of each algorithm. Our experimental results show that HiEngine can be recovered instantly (i.e., in ~10 s) with only slight (i.e., 5% - 11%) performance degradation. Therefore, we strongly recommend integrating index checkpointing into IMDBs if recovery time is a crucial product metric.

References

  1. Joy Arulraj, Matthew Perron, and Andrew Pavlo. 2016. Write-Behind Logging. Proc. VLDB Endow. 10 (2016), 337--348.Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Robert Binna, Eva Zangerle, M. Pichl, Günther Specht, and Viktor Leis. 2018. HOT: A Height Optimized Trie Index for Main-Memory Database Systems. In SIGMOD.Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Tuan Cao, M. V. Salles, B. Sowell, Yao Yue, A. Demers, J. Gehrke, and Walker M. White. 2011. Fast checkpoint recovery algorithms for frequently consistent applications. In SIGMOD.Google ScholarGoogle Scholar
  4. D. DeWitt, R. Katz, F. Olken, Leonard D. Shapiro, M. Stonebraker, and D. Wood. 1984. Implementation techniques for main memory database systems. In SIGMOD.Google ScholarGoogle Scholar
  5. J. Gehrke and Tuan Cao. 2013. Fault tolerance for main-memory applications in the cloud.Google ScholarGoogle Scholar
  6. Goetz Graefe. 2012. A survey of B-tree logging and recovery techniques. ACM Transactions on Database Systems (TODS) 37 (2012), 1 -- 35.Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Theo Haerder and Andreas Reuter. 1983. Principles of transaction-oriented database recovery. ACM Comput. Surv. 15 (1983), 287--317.Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Michael Haubenschild, Caetano Sauer, Thomas Neumann, and Viktor Leis. 2020. Rethinking Logging, Checkpoints, and Recovery for High-Performance Storage Engines. In SIGMOD.Google ScholarGoogle Scholar
  9. Hironobu. [n.d.]. The internals of postgresql for database administrators and system developers. http://www.interdb.jp/pg/Google ScholarGoogle Scholar
  10. A. Kemper and Thomas Neumann. 2011. HyPer: A hybrid OLTP&OLAP main memory database system based on virtual memory snapshots. In ICDE. 195--206.Google ScholarGoogle Scholar
  11. Kangnyeon Kim, Tianzheng Wang, R. Johnson, and I. Pandis. 2016. ERMIA: Fast Memory-Optimized Database System for Heterogeneous Workloads. In SIGMOD.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. P. Larson, Spyros Blanas, C. Diaconu, C. Freedman, J. M. Patel, and Mike Zwilling. 2011. High-Performance Concurrency Control Mechanisms for Main-Memory Databases. Proc. VLDB Endow. 5 (2011), 298--309.Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Viktor Leis, Michael Haubenschild, A. Kemper, and Thomas Neumann. 2018. LeanStore: In-Memory Data Management beyond Main Memory. ICDE, 185--196.Google ScholarGoogle Scholar
  14. Viktor Leis, Michael Haubenschild, and T. Neumann. 2019. Optimistic Lock Coupling: A Scalable and Efficient General-Purpose Synchronization Method. IEEE TKDE 42 (2019), 73--84.Google ScholarGoogle Scholar
  15. Viktor Leis, A. Kemper, and Thomas Neumann. 2013. The adaptive radix tree: ARTful indexing for main-memory databases. ICDE, 38--49.Google ScholarGoogle Scholar
  16. Viktor Leis, Florian Scheibner, A. Kemper, and T. Neumann. 2016. The ART of practical synchronization. In DaMoN '16.Google ScholarGoogle Scholar
  17. Justin J. Levandoski, D. Lomet, and S. Sengupta. 2013. The Bw-Tree: A B-tree for new hardware platforms. ICDE, 302--313.Google ScholarGoogle Scholar
  18. Justin J. Levandoski, D. Lomet, and S. Sengupta. 2013. LLAMA: A Cache/Storage Subsystem for Modern Hardware. Proc. VLDB Endow. 6 (2013), 877--888.Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. L. Li, Guoren Wang, Gang Wu, and Ye Yuan. 2018. Consistent Snapshot Algorithms for In-Memory Database Systems: Experiments and Analysis. ICDE, 1284--1287.Google ScholarGoogle Scholar
  20. L. Li, Guoren Wang, Gang Wu, Ye Yuan, Lei Chen, and Xiang Lian. 2021. A Comparative Study of Consistent Snapshot Algorithms for Main-Memory Database Systems. IEEE TKDE 33 (2021), 316--330.Google ScholarGoogle Scholar
  21. Antti-Pekka Liedes and A. Wolski. 2006. SIREN: A Memory-Conserving, Snapshot-Consistent Checkpoint Algorithm for in-Memory Databases. ICDE, 99--99.Google ScholarGoogle Scholar
  22. Hyeontaek Lim, M. Kaminsky, and D. Andersen. 2017. Cicada: Dependably Fast Multi-Core In-Memory Transactions. In SIGMOD.Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Gangcai Liu, Leying Chen, and Shimin Chen. 2021. Zen: a High-Throughput Log-Free OLTP Engine for Non-Volatile Main Memory. Proc. VLDB Endow. 14 (2021), 835--848.Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. David B. Lomet and Betty Salzberg. 1997. Concurrency and recovery for index trees. The VLDB Journal 6 (1997), 224--240.Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Yunus Ma, Siphrey Xie, Henry Zhong, Leon Lee, and King Lv. 2022. HiEngine: How to Architect a Cloud-Native Memory-Optimized Database Engine.. In SIGMOD.Google ScholarGoogle Scholar
  26. Arlino Magalhães, Angelo Brayner, José Maria S. Monteiro, and Gustavo Moraes. 2021. Indexed Log File: Towards Main Memory Database Instant Recovery. In EDBT.Google ScholarGoogle Scholar
  27. Nirmesh Malviya, Ariel Weisberg, S. Madden, and M. Stonebraker. 2014. Rethinking main memory OLTP recovery. ICDE, 604--615.Google ScholarGoogle Scholar
  28. Yandong Mao, E. Kohler, and R. Morris. 2012. Cache craftiness for fast multicore key-value storage. In EuroSys '12.Google ScholarGoogle Scholar
  29. C. Mohan, Donald J. Haderle, B. Lindsay, H. Pirahesh, and P. Schwarz. 1992. ARIES: a transaction recovery method supporting fine-granularity locking and partial rollbacks using write-ahead logging. ACM Trans. Database Syst. 17 (1992), 94--162.Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Thomas Neumann, Tobias Mühlbauer, and A. Kemper. 2015. Fast Serializable Multi-Version Concurrency Control for Main-Memory Database Systems. In SIGMOD.Google ScholarGoogle Scholar
  31. Andrew Pavlo, Gustavo Angulo, Joy Arulraj, Haibin Lin, Jiexi Lin, Lin Ma, Prashanth Menon, T. Mowry, Matthew Perron, Ian Quah, Siddharth Santurkar, A. Tomasic, S. Toor, D. V. Aken, Ziqi Wang, Yingjun Wu, Ran Xian, and Tieying Zhang. 2017. Self-Driving Database Management Systems. In CIDR.Google ScholarGoogle Scholar
  32. PMDK. [n.d.]. using-persistent-memory-devices-with-the-linux-device-mapper. https://pmem.io/2018/05/15/using_persistent_memory_devices_with_the_linux_device_mapper.htmlGoogle ScholarGoogle Scholar
  33. J. Rao and K. A. Ross. 2000. Making B+- trees cache conscious in main memory. In SIGMOD.Google ScholarGoogle Scholar
  34. Kun Ren, Thaddeus Diamond, D. Abadi, and Alexander Thomson. 2016. Low-Overhead Asynchronous Checkpointing in Main-Memory Database Systems. In SIGMOD.Google ScholarGoogle Scholar
  35. K. Salem and H. Garcia-Molina. 1990. System M: A Transaction Processing Testbed for Memory Resident Data. IEEE TKDE 2 (1990), 161--172.Google ScholarGoogle Scholar
  36. M. V. Salles, Tuan Cao, B. Sowell, A. Demers, J. Gehrke, Christoph E. Koch, and Walker M. White. 2009. An Evaluation of Checkpoint Recovery for Massively Multiplayer Online Games. Proc. VLDB Endow. 2 (2009), 1258--1269.Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Caetano Sauer. 2019. Modern techniques for transaction-oriented database recovery1.Google ScholarGoogle Scholar
  38. Caetano Sauer, G. Graefe, and T. Härder. 2017. Instant Restore After a Media Failure. In ADBIS.Google ScholarGoogle Scholar
  39. Caetano Sauer, G. Graefe, and T. Härder. 2018. FineLine: log-structured transactional storage and recovery. Proc. VLDB Endow. 11 (2018), 2249--2262.Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Stephen Tu, Wenting Zheng, E. Kohler, B. Liskov, and S. Madden. 2013. Speedy transactions in multicore in-memory databases. Proceedings of the Twenty-Fourth ACM Symposium on Operating Systems Principles.Google ScholarGoogle Scholar
  41. Alexandre Verbitski, Anurag Gupta, D. Saha, Murali Brahmadesam, K. Gupta, Raman Mittal, S. Krishnamurthy, Sandor Maurice, T. Kharatishvili, and Xiaofeng Bao. 2017. Amazon Aurora: Design Considerations for High Throughput Cloud-Native Relational Databases. In SIGMOD.Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Ziqi Wang, Andrew Pavlo, Hyeontaek Lim, Viktor Leis, Huanchen Zhang, M. Kaminsky, and D. Andersen. 2018. Building a Bw-Tree Takes More Than Just Buzz Words. In SIGMOD.Google ScholarGoogle Scholar
  43. Yingjun Wu, Joy Arulraj, Jiexi Lin, R. Xian, and A. Pavlo. 2017. An Empirical Evaluation of In-Memory Multi-Version Concurrency Control. Proc. VLDB Endow. 10 (2017), 781--792.Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. Yingjun Wu, Wentian Guo, Chee-Yong Chan, and Kian-Lee Tan. 2017. Fast Failure Recovery for Main-Memory DBMSs on Multicores. In SIGMOD (Chicago, Illinois, USA) (SIGMOD '17). Association for Computing Machinery, New York, NY, USA, 267--281. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Yu Xia, Xiangyao Yu, A. Pavlo, and S. Devadas. 2020. Taurus: Lightweight Parallel Logging for In-Memory Database Management Systems (Extended Version). ArXiv abs/2010.06760 (2020).Google ScholarGoogle Scholar
  46. Chang Yao, D. Agrawal, G. Chen, B. Ooi, and Sai Wu. 2016. Adaptive Logging: Optimizing Logging and Recovery Costs in Distributed In-memory Databases. In SIGMOD.Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Hao Zhang, Gang Chen, B. Ooi, K. Tan, and Meihui Zhang. 2015. In-Memory Big Data Management and Processing: A Survey. IEEE TKDE 27 (2015), 1920--1948.Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. L. Zhang, Matthew Butrovich, Tianyu Li, Yash Nannapanei, A. Pavlo, John Rollinson, Huanchen Zhang, Ambarish Balakumar, Daniel Biales, Ziqi Dong, Emmanuel Eppinger, J. González, Wan Shen Lim, Jianqiao Liu, Prashanth Menon, Soumil Mukherjee, Tanuj Nayak, Amadou Ngom, Jeff Niu, Deepayan Patra, Poojita Raj, Stephanie Wang, Wuwen Wang, Yao Yu, and W. Zhang. 2020. Everything is a Transaction: Unifying Logical Concurrency Control and Physical Data Structure Maintenance in Database Management Systems.Google ScholarGoogle Scholar
  49. Wenting Zheng, Stephen Tu, E. Kohler, and B. Liskov. 2014. Fast Databases with Fast Durability and Recovery Through Multicore Parallelism. In OSDI.Google ScholarGoogle Scholar

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in

Full Access

  • Published in

    cover image Proceedings of the VLDB Endowment
    Proceedings of the VLDB Endowment  Volume 15, Issue 8
    April 2022
    220 pages
    ISSN:2150-8097
    Issue’s Table of Contents

    Publisher

    VLDB Endowment

    Publication History

    • Published: 1 April 2022
    Published in pvldb Volume 15, Issue 8

    Qualifiers

    • research-article

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader