skip to main content
research-article

Virtual-Memory Assisted Buffer Management

Published:30 May 2023Publication History
Skip Abstract Section

Abstract

Most database management systems cache pages from storage in a main memory buffer pool. To do this, they either rely on a hash table that translates page identifiers into pointers, or on pointer swizzling which avoids this translation. In this work, we propose vmcache, a buffer manager design that instead uses hardware-supported virtual memory to translate page identifiers to virtual memory addresses. In contrast to existing mmap-based approaches, the DBMS retains control over page faulting and eviction. Our design is portable across modern operating systems, supports arbitrary graph data, enables variable-sized pages, and is easy to implement. One downside of relying on virtual memory is that with fast storage devices the existing operating system primitives for manipulating the page table can become a performance bottleneck. As a second contribution, we therefore propose exmap, which implements scalable page table manipulation on Linux. Together, vmcache and exmap provide flexible, efficient, and scalable buffer management on multi-core CPUs and fast storage devices.

Skip Supplemental Material Section

Supplemental Material

vmcache.mp4

Virtual-Memory Assisted Buffer Management

mp4

57.8 MB

References

  1. 2022. LeanStore - A High-Performance Storage Engine for Modern Hardware. https://leanstore.io/.Google ScholarGoogle Scholar
  2. 2022. Lightning Memory-Mapped Database Manager (LMDB). http://www.lmdb.tech/doc/.Google ScholarGoogle Scholar
  3. 2022. MxKernel - A Bare-Metal Runtime System for Database Operations on Heterogeneous Many-Core Hardware. https://ess.cs.uos.de/research/projects/MxKernel/.Google ScholarGoogle Scholar
  4. 2022. Samsung PCIe Gen 4-enabled PM1733 SSD. https://semiconductor.samsung.com/ssd/enterprise-ssd/pm1733-pm1735/mzwlj3t8hbls-00007/.Google ScholarGoogle Scholar
  5. 2022. WiredTiger Storage Engine. https://docs.mongodb.com/manual/core/wiredtiger/.Google ScholarGoogle Scholar
  6. Nadav Amit. 2017. Optimizing the TLB Shootdown Algorithm with Page Access Tracking. In USENIX ATC. 27--39.Google ScholarGoogle Scholar
  7. Nadav Amit, Amy Tai, and Michael Wei. 2020. Don't shoot down TLB shootdowns!. In EuroSys. 1--14.Google ScholarGoogle Scholar
  8. Lawrence Benson, Hendrik Makait, and Tilmann Rabl. 2021. Viper: An Efficient Hybrid PMem-DRAM Key-Value Store. PVLDB 14, 9 (2021), 1544--1556.Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Jan Böttcher, Viktor Leis, Jana Giceva, Thomas Neumann, and Alfons Kemper. 2020. Scalable and robust latches for database systems. In DaMoN.Google ScholarGoogle Scholar
  10. Jungsik Choi, Jiwon Kim, and Hwansoo Han. 2017. Efficient Memory Mapped File I/O for In-Memory File Systems. In HotStorage.Google ScholarGoogle Scholar
  11. Austin T. Clements, M. Frans Kaashoek, and Nickolai Zeldovich. 2012. Scalable Address Spaces Using RCU Balanced Trees. In ASPLOS. 199--210.Google ScholarGoogle Scholar
  12. Austin T. Clements, M. Frans Kaashoek, and Nickolai Zeldovich. 2013. RadixVM: Scalable Address Spaces for Multi-threaded Applications. In EuroSys. 211--224.Google ScholarGoogle Scholar
  13. Andrew Crotty, Viktor Leis, and Andrew Pavlo. 2022. Are You Sure You Want to Use MMAP in Your Database Management System?. In CIDR.Google ScholarGoogle Scholar
  14. Dominik Durner, Viktor Leis, and Thomas Neumann. 2019. Experimental Study of Memory Allocation for High-Performance Query Processing. In ADMS. 1--9.Google ScholarGoogle Scholar
  15. Wolfgang Effelsberg and Theo Härder. 1984. Principles of Database Buffer Management. ACM Trans. Database Syst. 9, 4 (1984).Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Goetz Graefe, Haris Volos, Hideaki Kimura, Harumi A. Kuno, Joseph Tucek, Mark Lillibridge, and Alistair C. Veitch. 2014. In-Memory Performance for Big Data. PVLDB 8, 1 (2014), 37--48.Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Brendan Gregg. 2016. The flame graph. Commun. ACM 59, 6 (2016), 48--57.Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Gabriel Haas, Michael Haubenschild, and Viktor Leis. 2020. Exploiting Directly-Attached NVMe Arrays in DBMS. In CIDR.Google ScholarGoogle Scholar
  19. Michael Haubenschild, Caetano Sauer, Thomas Neumann, and Viktor Leis. 2020. Rethinking Logging, Checkpoints, and Recovery for High-Performance Storage Engines. In SIGMOD. 877--892.Google ScholarGoogle Scholar
  20. Alfons Kemper and Donald Kossmann. 1995. Adaptable Pointer Swizzling Strategies in Object Bases: Design, Realization, and Quantitative Analysis. VLDB Journal 4, 3 (1995), 519--566.Google ScholarGoogle ScholarCross RefCross Ref
  21. Hideaki Kimura. 2015. FOEDUS: OLTP Engine for a Thousand Cores and NVRAM. In SIGMOD. 691--706.Google ScholarGoogle Scholar
  22. Mohan Kumar, Steffen Maass, Sanidhya Kashyap, Ján Veselý, Zi Yan, Taesoo Kim, Abhishek Bhattacharjee, and Tushar Krishna. 2018. LATR: Lazy Translation Coherence. In ASPLOS. 651--664.Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Viktor Leis, Michael Haubenschild, Alfons Kemper, and Thomas Neumann. 2018. LeanStore: In-Memory Data Management beyond Main Memory. In ICDE. 185--196.Google ScholarGoogle Scholar
  24. Viktor Leis, Michael Haubenschild, and Thomas Neumann. 2019. Optimistic Lock Coupling: A Scalable and Efficient General-Purpose Synchronization Method. IEEE Data Eng. Bull. 42, 1 (2019), 73--84.Google ScholarGoogle Scholar
  25. Viktor Leis, Florian Scheibner, Alfons Kemper, and Thomas Neumann. 2016. The ART of practical synchronization. In DaMoN.Google ScholarGoogle Scholar
  26. Dean De Leo and Peter A. Boncz. 2019. Packed Memory Arrays - Rewired. In ICDE. 830--841.Google ScholarGoogle Scholar
  27. Justin J. Levandoski, David B. Lomet, and Sudipta Sengupta. 2013. The Bw-Tree: A B-tree for new hardware platforms. In ICDE. 302--313.Google ScholarGoogle Scholar
  28. Gang Liu, Leying Chen, and Shimin Chen. 2021. Zen: a High-Throughput Log-Free OLTP Engine for Non-Volatile Main Memory. PVLDB 14, 5 (2021), 835--848.Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. David B. Lomet. 2019. Data Caching Systems Win the Cost/Performance Game. IEEE Data Eng. Bull. 42, 1 (2019), 3--5.Google ScholarGoogle Scholar
  30. Yandong Mao, Eddie Kohler, and Robert Tappan Morris. 2012. Cache craftiness for fast multicore key-value storage. In EuroSys. 183--196.Google ScholarGoogle Scholar
  31. Maged M. Michael. 2004. Hazard Pointers: Safe Memory Reclamation for Lock-Free Objects. IEEE Trans. Parallel Distributed Syst. 15, 6 (2004), 491--504.Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Jan Mühlig and Jens Teubner. 2021. MxTasks: How to Make Efficient Synchronization and Prefetching Easy. In SIGMOD. 1331--1344.Google ScholarGoogle Scholar
  33. Thomas Neumann and Michael Freitag. 2020. Umbra: A Disk-Based System with In-Memory Performance. In CIDR.Google ScholarGoogle Scholar
  34. Anastasios Papagiannis, Giorgos Xanthakis, Giorgos Saloustros, Manolis Marazakis, and Angelos Bilas. 2020. Optimizing Memory-mapped I/O for Fast Storage Devices. In USENIX ATC. 813--827.Google ScholarGoogle Scholar
  35. Ivy Peng, Marty McFadden, Eric Green, Keita Iwabuchi, Kai Wu, Dong Li, Roger Pearce, and Maya Gokhale. 2019. UMap: Enabling application-driven optimizations for page management. In IEEE/ACM Workshop on Memory Centric High Performance Computing (MCHPC). 71--78.Google ScholarGoogle ScholarCross RefCross Ref
  36. Filip Pizlo. 2016. Locking in WebKit. https://webkit.org/blog/6161/locking-in-webkit/.Google ScholarGoogle Scholar
  37. Felix Martin Schuhknecht, Jens Dittrich, and Ankur Sharma. 2016. RUMA has it: Rewired User-space Memory Access is Possible! PVLDB 9, 10 (2016), 768--779.Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Athinagoras Skiadopoulos, Qian Li, Peter Kraft, Kostis Kaffes, Daniel Hong, Shana Mathew, David Bestor, Michael J. Cafarella, Vijay Gadepally, Goetz Graefe, Jeremy Kepner, Christos Kozyrakis, Tim Kraska, Michael Stonebraker, Lalith Suresh, and Matei Zaharia. 2021. DBOS: A DBMS-oriented Operating System. PVLDB 15, 1 (2021), 21--30.Google ScholarGoogle Scholar
  39. Nae Young Song, Yongseok Son, Hyuck Han, and Heon Young Yeom. 2016. Efficient memory-mapped I/O on fast storage device. ACM Transactions on Storage (TOS) 12, 4 (2016), 1--27.Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Michael Stonebraker. 1981. Operating System Support for Database Management. Commun. ACM 24, 7 (1981), 412--418.Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Alexander van Renen, Viktor Leis, Alfons Kemper, Thomas Neumann, Takushi Hashida, Kazuichi Oe, Yoshiyasu Doi, Lilian Harada, and Mitsuru Sato. 2018. Managing Non-Volatile Memory in Database Systems. In SIGMOD. 1541--1555.Google ScholarGoogle Scholar
  42. Ziqi Wang, Andrew Pavlo, Hyeontaek Lim, Viktor Leis, Huanchen Zhang, Michael Kaminsky, and David G. Andersen. 2018. Building a Bw-Tree Takes More Than Just Buzz Words. In SIGMOD. 473--488.Google ScholarGoogle Scholar
  43. Xinjing Zhou, Joy Arulraj, Andrew Pavlo, and David Cohen. 2021. Spitfire: A Three-Tier Buffer Manager for Volatile and Non-Volatile Memory. In SIGMOD. 2195--2207.Google ScholarGoogle Scholar

Index Terms

  1. Virtual-Memory Assisted Buffer Management

    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 ACM on Management of Data
      Proceedings of the ACM on Management of Data  Volume 1, Issue 1
      PACMMOD
      May 2023
      2807 pages
      EISSN:2836-6573
      DOI:10.1145/3603164
      Issue’s Table of Contents

      Copyright © 2023 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 30 May 2023
      Published in pacmmod Volume 1, Issue 1

      Permissions

      Request permissions about this article.

      Request Permissions

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader