skip to main content
10.1145/3572848.3577508acmconferencesArticle/Chapter ViewAbstractPublication PagesppoppConference Proceedingsconference-collections
research-article
Open access

Practically and Theoretically Efficient Garbage Collection for Multiversioning

Published: 21 February 2023 Publication History

Abstract

Multiversioning is widely used in databases, transactional memory, and concurrent data structures. It can be used to support read-only transactions that appear atomic in the presence of concurrent update operations. Any system that maintains multiple versions of each object needs a way of efficiently reclaiming them. We experimentally compare various existing reclamation techniques by applying them to a multiversion tree and a multiversion hash table.
Using insights from these experiments, we develop two new multiversion garbage collection (MVGC) techniques. These techniques use two novel concurrent version list data structures. Our experimental evaluation shows that our fastest technique is competitive with the fastest existing MVGC techniques, while using significantly less space on some workloads. Our new techniques provide strong theoretical bounds, especially on space usage. These bounds ensure that the schemes have consistent performance, avoiding the very high worst-case space usage of other techniques.

References

[1]
Dan Alistarh, Patrick Eugster, Maurice Herlihy, Alexander Matveev, and Nir Shavit. 2014. StackTrack: An Automated Transactional Approach to Concurrent Memory Reclamation. In Proc. 9th European Conference on Computer Systems. 25:1--25:14.
[2]
Daniel Anderson, Guy E. Blelloch, and Yuanhao Wei. 2021. Concurrent deferred reference counting with constant-time overhead. In Proc. 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation. 526--541.
[3]
Hagit Attiya and Eshcar Hillel. 2013. Built-in coloring for highly-concurrent doubly-linked lists. Theory of Computing Systems 52, 4 (2013), 729--762.
[4]
Dmitry Basin, Edward Bortnikov, Anastasia Braginsky, Guy Golan-Gueta, Eshcar Hillel, Idit Keidar, and Moshe Sulamy. 2020. KiWi: A Key-Value Map for Scalable Real-Time Analytics. ACM Trans. Parallel Comput. 7, 3, Article 16 (June 2020), 28 pages.
[5]
Naama Ben-David, Guy E. Blelloch, Panagiota Fatourou, Eric Ruppert, Yihan Sun, and Yuanhao Wei. 2021. Space and Time Bounded Multi-version Garbage Collection. In Proc. 35th International Symposium on Distributed Computing. 12:1--12:20. A full version is available from https://arxiv.org/abs/2108.02775.
[6]
Philip A. Bernstein and Nathan Goodman. 1983. Multiversion Concurrency Control-Theory and Algorithms. ACM Trans. Database Syst. 8, 4 (Dec. 1983), 465--483.
[7]
Jan Böttcher, Viktor Leis, Thomas Neumann, and Alfons Kemper. 2019. Scalable garbage collection for in-memory MVCC systems. Proceedings of the VLDB Endowment 13, 2 (2019), 128--141.
[8]
Trevor Brown, Faith Ellen, and Eric Ruppert. 2014. A General Technique for Non-Blocking Trees. In Proc. ACM Symposium on Principles and Practice of Parallel Programming. 329--342.
[9]
Trevor Alexander Brown. 2015. Reclaiming Memory for Lock-Free Data Structures: There Has to Be a Better Way. In Proc. ACM Symposium on Principles of Distributed Computing. 261--270.
[10]
Brian F. Cooper, Adam Silberstein, Erwin Tam, Raghu Ramakrishnan, and Russell Sears. 2010. Benchmarking Cloud Serving Systems with YCSB. In Proc. 1st ACM Symposium on Cloud Computing. 143--154.
[11]
Andreia Correia, Pedro Ramalhete, and Pascal Felber. 2021. OrcGC: automatic lock-free memory reclamation. In Proc. 26th ACM Symposium on Principles and Practice of Parallel Programming. 205--218.
[12]
David L. Detlefs, Paul A. Martin, Mark Moir, and Guy L. Steele. 2001. Lock-Free Reference Counting. In Proc. 20th ACM Symposium on Principles of Distributed Computing. 190--199.
[13]
Aleksandar Dragojević, Maurice Herlihy, Yossi Lev, and Mark Moir. 2011. On the Power of Hardware Transactional Memory to Simplify Memory Management. In Proc. 30th ACM Symposium on Principles of Distributed Computing. 99--108.
[14]
Panagiota Fatourou and Nikolaos D Kallimanis. 2014. Highly-efficient wait-free synchronization. Theory of Computing Systems 55, 3 (2014), 475--520.
[15]
Panagiota Fatourou, Elias Papavasileiou, and Eric Ruppert. 2019. Persistent Non-Blocking Binary Search Trees Supporting Wait-Free Range Queries. In Proc. 31st ACM Symposium on Parallelism in Algorithms and Architectures. 275--286.
[16]
Sérgio Miguel Fernandes and João Cachopo. 2011. Lock-Free and Scalable Multi-Version Software Transactional Memory. In Proc. 16th ACM Symposium on Principles and Practice of Parallel Programming. 179--188.
[17]
Mikhail Fomitchev and Eric Ruppert. 2004. Lock-Free Linked Lists and Skip Lists. In Proc. 23rd ACM Symposium on Principles of Distributed Computing. 50--59.
[18]
Keir Fraser. 2004. Practical Lock-freedom. Technical Report UCAM-CL-TR-579. University of Cambridge, Computer Laboratory.
[19]
Michael Greenwald. 2002. Two-handed emulation: how to build non-blocking implementations of complex data-structures using DCAS. In Proc. 21st ACM Symposium on Principles of Distributed Computing. 260--269.
[20]
Rachid Guerraoui, Alex Kogan, Virendra J. Marathe, and Igor Zablotchi. 2020. Efficient Multi-Word Compare and Swap. In Proc. 34th International Symposium on Distributed Computing (LIPIcs, Vol. 179).
[21]
Timothy L. Harris. 2001. A pragmatic implementation of non-blocking linked-lists. In Proc. International Symposium on Distributed Computing. Springer, 300--314.
[22]
Timothy L. Harris, Keir Fraser, and Ian A. Pratt. 2002. A practical multiword compare-and-swap operation. In Proc. International Symposium on Distributed Computing (LNCS, Vol. 2508). 265--279.
[23]
Maurice Herlihy, Victor Luchangco, Paul Martin, and Mark Moir. 2005. Nonblocking Memory Management Support for Dynamic-Sized Data Structures. ACM Trans. Comput. Syst. 23, 2 (May 2005), 146--196.
[24]
Maurice P. Herlihy and Jeannette M. Wing. 1990. Linearizability: A correctness condition for concurrent objects. ACM Transactions on Programming Languages and Systems 12, 3 (1990), 463--492.
[25]
Idit Keidar and Dmitri Perelman. 2015. Multi-versioning in Transactional Memory. In Transactional Memory. Foundations, Algorithms, Tools, and Applications. LNCS, Vol. 8913. Springer, 150--165.
[26]
Jaeho Kim, Ajit Mathew, Sanidhya Kashyap, Madhava Krishnan Ramanathan, and Changwoo Min. 2019. MV-RLU: Scaling Read-Log-Update with Multi-Versioning. In Proc. 24th International Conference on Architectural Support for Programming Languages and Operating Systems. 779--792.
[27]
Tadeusz Kobus, Maciej Kokociński, and Paweł T. Wojciechowski. 2022. Jiffy: A Lock-Free Skip List with Batch Updates and Snapshots. In Proc. 27th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming. 400--415.
[28]
Priyanka Kumar, Sathya Peri, and K. Vidyasankar. 2014. A TimeStamp Based Multi-version STM Algorithm. In Proc. International Conference on Distributed Computing and Networking. 212--226.
[29]
Per-Åke Larson, Mike Zwilling, and Kevin Farlee. 2013. The Hekaton Memory-Optimized OLTP Engine. IEEE Data Eng. Bull. 36, 2 (2013), 34--40.
[30]
Juchang Lee, Hyungyu Shin, Chang Gyoo Park, Seongyun Ko, Jaeyun Noh, Yongjae Chuh, Wolfgang Stephan, and Wook-Shin Han. 2016. Hybrid Garbage Collection for Multi-Version Concurrency Control in SAP HANA. In Proc. International Conference on Management of Data. 1307--1318.
[31]
Viktor Leis, Alfons Kemper, and Thomas Neumann. 2013. The adaptive radix tree: ARTful indexing for main-memory databases. In Proc. 29th IEEE International Conference on Data Engineering. 38--49.
[32]
Hyeontaek Lim, Michael Kaminsky, and David G Andersen. 2017. Cicada: Dependably fast multi-core in-memory transactions. In Proc. ACM International Conference on Management of Data. 21--35.
[33]
Li Lu and Michael L Scott. 2013. Generic multiversion STM. In Proc. International Symposium on Distributed Computing (LNCS, Vol. 8205). 134--148.
[34]
M.M. Michael. 2004. Hazard pointers: safe memory reclamation for lock-free objects. IEEE Transactions on Parallel and Distributed Systems 15, 6 (2004), 491--504.
[35]
Maged M. Michael. 2002. High Performance Dynamic Lock-Free Hash Tables and List-Based Sets. In Proc. 14th ACM Symposium on Parallel Algorithms and Architectures. 73--82.
[36]
Jacob Nelson-Slivon, Ahmed Hassan, and Roberto Palmieri. 2022. Bundling linked data structures for linearizable range queries. In Proc. 27th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming. 368--384.
[37]
Thomas Neumann, Tobias Mühlbauer, and Alfons Kemper. 2015. Fast serializable multi-version concurrency control for main-memory database systems. In Proc. ACM SIGMOD International Conference on Management of Data. 677--689.
[38]
Christos H. Papadimitriou and Paris C. Kanellakis. 1984. On Concurrency Control by Multiple Versions. ACM Transactions on Database Systems 9, 1 (1984), 89--99.
[39]
Dmitri Perelman, Anton Byshevsky, Oleg Litmanovich, and Idit Keidar. 2011. SMV: Selective Multi-Versioning STM. In Proc. International Symposium on Distributed Computing (LNCS, Vol. 6950). 125--140.
[40]
Dmitri Perelman, Rui Fan, and Idit Keidar. 2010. On Maintaining Multiple Versions in STM. In Proc. ACM Symposium on Principles of Distributed Computing. 16--25.
[41]
Pedro Ramalhete and Andreia Correia. 2017. Brief Announcement: Hazard Eras-Non-Blocking Memory Reclamation. In Proc. 29th ACM Symposium on Parallelism in Algorithms and Architectures. 367--369.
[42]
D. Reed. 1978. Naming and synchronization in a decentralized computer system. Technical Report LCS/TR-205. EECS Dept., MIT.
[43]
Niloufar Shafiei. 2015. Non-Blocking Doubly-Linked Lists with Good Amortized Complexity. In Proc. 19th Int. Conference on Principles of Distributed Systems (LIPIcs, Vol. 46). 35:1--35:17.
[44]
Gali Sheffi, Maurice Herlihy, and Erez Petrank. 2021. VBR: Version Based Reclamation. In Proc. 35th International Symposium on Distributed Computing (LIPIcs, Vol. 209). 35:1--35:18.
[45]
Gali Sheffi, Pedro Ramalhete, and Erez Petrank. 2022. EEMARQ: Efficient Lock-Free Range Queries with Memory Reclamation.
[46]
Ajay Singh, Trevor Brown, and Ali Mashtizadeh. 2021. NBR: Neutralization Based Reclamation. In Proc. 26th ACM Symp. on Principles and Practice of Parallel Programming. 175--190.
[47]
Håkan Sundell and Philippas Tsigas. 2008. Lock-free deques and doubly linked lists. J. Parallel and Distributed Computing 68, 7 (2008), 1008--1020.
[48]
John D. Valois. 1995. Lock-free linked lists using compare-and-swap. In Proc. 14th ACM Symposium on Principles of Distributed Computing. 214--222.
[49]
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 Proceedings of the 2018 International Conference on Management of Data. 473--488.
[50]
Yuanhao Wei, Naama Ben-David, Guy E. Blelloch, Panagiota Fatourou, Eric Ruppert, and Yihan Sun. 2021. Constant-Time Snapshots with Applications to Concurrent Data Structures. In Proc. ACM Symposium on Principles and Practice of Parallel Programming. 31--46. A full version is available from https://arxiv.org/abs/2007.02372.
[51]
Yuanhao Wei, Guy E. Blelloch, Panagiota Fatourou, and Eric Ruppert. 2022. Practically and Theoretically Efficient Garbage Collection for Multiversioning.
[52]
Haosen Wen, Joseph Izraelevitz, Wentao Cai, H. Alan Beadle, and Michael L. Scott. 2018. Interval-Based Memory Reclamation. In Proc. 23rd ACM Symp. on Principles and Practice of Parallel Programming. 1--13.
[53]
Yingjun Wu, Joy Arulraj, Jiexi Lin, Ran Xian, and Andrew Pavlo. 2017. An Empirical Evaluation of In-memory Multi-version Concurrency Control. Proc. of the VLDB Endowment 10, 7 (March 2017), 781--792.

Index Terms

  1. Practically and Theoretically Efficient Garbage Collection for Multiversioning

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    PPoPP '23: Proceedings of the 28th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming
    February 2023
    480 pages
    ISBN:9798400700156
    DOI:10.1145/3572848
    This work is licensed under a Creative Commons Attribution International 4.0 License.

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 21 February 2023

    Check for updates

    Badges

    Qualifiers

    • Research-article

    Funding Sources

    Conference

    PPoPP '23

    Acceptance Rates

    Overall Acceptance Rate 230 of 1,014 submissions, 23%

    Upcoming Conference

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • 0
      Total Citations
    • 694
      Total Downloads
    • Downloads (Last 12 months)376
    • Downloads (Last 6 weeks)40
    Reflects downloads up to 17 Feb 2025

    Other Metrics

    Citations

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Login options

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media