Nova: Safe Off-Heap Memory Allocation and Reclamation

Authors Ramy Fakhoury, Anastasia Braginsky, Idit Keidar, Yoav Zuriel



PDF
Thumbnail PDF

File

LIPIcs.OPODIS.2023.15.pdf
  • Filesize: 1.89 MB
  • 20 pages

Document Identifiers

Author Details

Ramy Fakhoury
  • Technion, Haifa, Israel
Anastasia Braginsky
  • Red Hat Research, Ra'anana, Israel
Idit Keidar
  • Technion, Haifa, Israel
Yoav Zuriel
  • Technion, Haifa, Israel

Cite As Get BibTex

Ramy Fakhoury, Anastasia Braginsky, Idit Keidar, and Yoav Zuriel. Nova: Safe Off-Heap Memory Allocation and Reclamation. In 27th International Conference on Principles of Distributed Systems (OPODIS 2023). Leibniz International Proceedings in Informatics (LIPIcs), Volume 286, pp. 15:1-15:20, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2024) https://doi.org/10.4230/LIPIcs.OPODIS.2023.15

Abstract

In recent years, we begin to see Java-based systems embrace off-heap allocation for their big data demands. As of today, these system rely on simple ad-hoc garbage-collection solutions, which restrict the usage of off-heap data. This paper introduces the abstraction of safe off-heap memory allocation and reclamation (SOMAR), a thread-safe memory allocation and reclamation scheme for off-heap data in otherwise managed environments. SOMAR allows multi-threaded Java programs to use off-heap memory seamlessly. To realize this abstraction, we present Nova, Novel Off-heap Versioned Allocator, a lock-free SOMAR implementation. Our experiments show that Nova can be used to store off-heap data in Java data structures with better performance than ones managed by Java’s automatic GC. We further integrate Nova into the open-source Oak concurrent map library, which allows Oak to reclaim keys while the data structure is being accessed.

Subject Classification

ACM Subject Classification
  • Software and its engineering
Keywords
  • memory reclamation
  • concurrency
  • performance
  • off-heap allocation

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads

References

  1. Dan Alistarh, William M. Leiserson, Alexander Matveev, and Nir Shavit. Threadscan: Automatic and scalable memory reclamation. In Proceedings of the 27th ACM Symposium on Parallelism in Algorithms and Architectures, SPAA '15, pages 123-132, New York, NY, USA, 2015. Association for Computing Machinery. URL: https://doi.org/10.1145/2755573.2755600.
  2. Daniel Anderson, Guy E. Blelloch, and Yuanhao Wei. Concurrent deferred reference counting with constant-time overhead. In Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation, PLDI 2021, pages 526-541, New York, NY, USA, 2021. Association for Computing Machinery. URL: https://doi.org/10.1145/3453483.3454060.
  3. Oana Balmau, Rachid Guerraoui, Maurice Herlihy, and Igor Zablotchi. Fast and robust memory reclamation for concurrent data structures. In Proceedings of the 28th ACM Symposium on Parallelism in Algorithms and Architectures, SPAA '16, pages 349-359, New York, NY, USA, 2016. Association for Computing Machinery. URL: https://doi.org/10.1145/2935764.2935790.
  4. Edward Bortnikov, Anastasia Braginsky, Eshcar Hillel, Idit Keidar, and Gali Sheffi. Accordion: Better memory organization for LSM key-value stores. PVLDB, 11(12):1863-1875, 2018. URL: https://doi.org/10.14778/3229863.3229873.
  5. Anastasia Braginsky, Alex Kogan, and Erez Petrank. Drop the anchor: Lightweight memory management for non-blocking data structures. In Proceedings of the Twenty-Fifth Annual ACM Symposium on Parallelism in Algorithms and Architectures, SPAA '13, pages 33-42, New York, NY, USA, 2013. Association for Computing Machinery. URL: https://doi.org/10.1145/2486159.2486184.
  6. Trevor Brown. Reclaiming memory for lock-free data structures: there has to be a better way, 2017. URL: https://arxiv.org/abs/1712.01044.
  7. Maurizio Cimadamore. Bytebuffers are dead, long live bytebuffers! https://www.youtube.com/watch?v=RYrk4wvar6g&t=172s&ab_channel=FOSDEM, 2020.
  8. Nachshon Cohen and Erez Petrank. Automatic memory reclamation for lock-free data structures. SIGPLAN Not., 50(10):260-279, oct 2015. URL: https://doi.org/10.1145/2858965.2814298.
  9. Nachshon Cohen and Erez Petrank. Efficient memory management for lock-free data structures with optimistic access. In Proceedings of the 27th ACM Symposium on Parallelism in Algorithms and Architectures, SPAA '15, pages 254-263, New York, NY, USA, 2015. Association for Computing Machinery. URL: https://doi.org/10.1145/2755573.2755579.
  10. Andreia Correia, Pedro Ramalhete, and Pascal Felber. Orcgc: Automatic lock-free memory reclamation. In Proceedings of the 26th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP '21, pages 205-218, New York, NY, USA, 2021. Association for Computing Machinery. URL: https://doi.org/10.1145/3437801.3441596.
  11. Dave Dice, Maurice Herlihy, and Alex Kogan. Fast non-intrusive memory reclamation for highly-concurrent data structures. In Proceedings of the 2016 ACM SIGPLAN International Symposium on Memory Management, ISMM 2016, pages 36-45, New York, NY, USA, 2016. Association for Computing Machinery. URL: https://doi.org/10.1145/2926697.2926699.
  12. Larry Dignan. The most popular programming languages and where to learn them. https://www.zdnet.com/article/best-programming-language/, may 2021.
  13. Docs Druid. Basic cluster tuning. https://druid.apache.org/docs/latest/operations/basic-cluster-tuning.html, retrived in April, 2022.
  14. Jonathan Ellis. Off-heap memtables in cassandra 2.1. https://www.datastax.com/blog/heap-memtables-cassandra-21, 2014.
  15. Keir Fraser. Practical lock-freedom. technical report ucam-cltr-579. In Technical Report, UCAM-CL-TR-579 ISSN 1476-2986, 2004. URL: https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-579.pdf.
  16. Anders Gidenstam, Marina Papatriantafilou, Håkan Sundell, and Philippas Tsigas. Efficient and reliable lock-free memory reclamation based on reference counting. IEEE Transactions on Parallel and Distributed Systems, 20(8):1173-1187, 2009. URL: https://doi.org/10.1109/TPDS.2008.167.
  17. Vincent Gramoli. More than you ever wanted to know about synchronization: Synchrobench, measuring the impact of the synchronization on concurrent algorithms. In Proceedings of the 20th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP 2015, pages 1-10, New York, NY, USA, 2015. Association for Computing Machinery. URL: https://doi.org/10.1145/2688500.2688501.
  18. Rachid Guerraoui, Alex Kogan, Virendra J. Marathe, and Igor Zablotchi. Efficient multi-word compare and swap, 2020. URL: https://arxiv.org/abs/2008.02527.
  19. Timothy L. Harris. A pragmatic implementation of non-blocking linked-lists. In Proceedings of the 15th International Conference on Distributed Computing, DISC '01, pages 300-314, Berlin, Heidelberg, 2001. Springer-Verlag. URL: https://doi.org/10.1007/3-540-45414-4_21.
  20. Reference Guide Hbase. Hbase offheap read/write path. https://hbase.apache.org/book.html#offheap_read_write, retrived in April, 2022.
  21. Maurice Herlihy, Victor Luchangco, Paul Martin, and Mark Moir. Nonblocking memory management support for dynamic-sized data structures. ACM Trans. Comput. Syst., 23(2):146-196, may 2005. URL: https://doi.org/10.1145/1062247.1062249.
  22. Docs Java. Interface memorysegment. https://docs.oracle.com/en/java/javase/17/docs/api/jdk.incubator.foreign/jdk/incubator/foreign/MemorySegment.html, 2021.
  23. Jeehoon Kang and Jaehwang Jung. A marriage of pointer- and epoch-based reclamation. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2020, pages 314-328, New York, NY, USA, 2020. Association for Computing Machinery. URL: https://doi.org/10.1145/3385412.3385978.
  24. Artem Khyzha, Hagit Attiya, Alexey Gotsman, and Noam Rinetzky. Safe privatization in transactional memory. SIGPLAN Not., 53(1):233-245, feb 2018. URL: https://doi.org/10.1145/3200691.3178505.
  25. Yu Li, Yu Sun, Anoop Sam John, and Ramkrishna S Vasudevan. Offheap read-path in production the Alibaba story. https://blog.cloudera.com/blog/2017/03/, 2017.
  26. Paul E. McKenney and John D. Slingwine. Read-copy update: Using execution history to solve concurrency problems. Parallel and Distributed Computing and Systems, 1998. Google Scholar
  27. Hagar Meir, Dmitry Basin, Edward Bortnikov, Anastasia Braginsky, Yonatan Gottesman, Idit Keidar, Eran Meir, Gali Sheffi, and Yoav Zuriel. Oak: A scalable off-heap allocated key-value map. In Proceedings of the 25th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP '20, pages 17-31, New York, NY, USA, 2020. Association for Computing Machinery. URL: https://doi.org/10.1145/3332466.3374526.
  28. Maged M. Michael. Hazard pointers: Safe memory reclamation for lock-free objects. IEEE Trans. Parallel Distrib. Syst., 15(6):491-504, jun 2004. URL: https://doi.org/10.1109/TPDS.2004.8.
  29. Ruslan Nikolaev and Binoy Ravindran. Snapshot-free, transparent, and robust memory reclamation for lock-free data structures. In Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation, PLDI 2021, pages 987-1002, New York, NY, USA, 2021. Association for Computing Machinery. URL: https://doi.org/10.1145/3453483.3454090.
  30. Pedro Ramalhete and Andreia Correia. Brief announcement: Hazard eras - non-blocking memory reclamation. In Proceedings of the 29th ACM Symposium on Parallelism in Algorithms and Architectures, SPAA '17, pages 367-369, New York, NY, USA, 2017. Association for Computing Machinery. URL: https://doi.org/10.1145/3087556.3087588.
  31. Gali Sheffi, Maurice Herlihy, and Erez Petrank. Vbr: Version based reclamation. In Proceedings of the 33rd ACM Symposium on Parallelism in Algorithms and Architectures, SPAA '21, pages 443-445, New York, NY, USA, 2021. Association for Computing Machinery. URL: https://doi.org/10.1145/3409964.3461817.
  32. Ajay Singh, Trevor Brown, and Ali Mashtizadeh. Nbr: Neutralization based reclamation, 2020. URL: https://arxiv.org/abs/2012.14542.
  33. Michael F. Spear, Virendra J. Marathe, Luke Dalessandro, and Michael L. Scott. Privatization techniques for software transactional memory. In Proceedings of the Twenty-Sixth Annual ACM Symposium on Principles of Distributed Computing, PODC '07, pages 338-339, New York, NY, USA, 2007. Association for Computing Machinery. URL: https://doi.org/10.1145/1281100.1281161.
  34. Haosen Wen, Joseph Izraelevitz, Wentao Cai, H. Alan Beadle, and Michael L. Scott. Interval-based memory reclamation. In Proceedings of the 23rd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP '18, pages 1-13, New York, NY, USA, 2018. Association for Computing Machinery. URL: https://doi.org/10.1145/3178487.3178488.
  35. Benjamin Zhu, Kai Li, and Hugo Patterson. Avoiding the disk bottleneck in the data domain deduplication file system. In 6th USENIX Conference on File and Storage Technologies (FAST 08), San Jose, CA, feb 2008. USENIX Association. URL: https://www.usenix.org/conference/fast-08/avoiding-disk-bottleneck-data-domain-deduplication-file-system.
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail