skip to main content
10.1145/3423211.3425671acmconferencesArticle/Chapter ViewAbstractPublication PagesmiddlewareConference Proceedingsconference-collections
research-article

Poseidon: Safe, Fast and Scalable Persistent Memory Allocator

Published:11 December 2020Publication History

ABSTRACT

Persistent memory allocator is an essential component of any Non-Volatile Main Memory (NVMM) application. A slow memory allocator can bottleneck the entire application stack, while an unsecure memory allocator can render applications inconsistent upon program bugs or system failure. Unlike DRAM-based memory allocators, it is indispensable for an NVMM allocator to guarantee its heap metadata safety from both internal and external errors. An effective NVMM memory allocator should be 1) safe, 2) scalable, and 3) high performing. Unfortunately, none of the existing persistent memory allocators achieve all three requisites. For example, we found that even Intel's de-facto NVMM allocator-libpmemobj is vulnerable to silent data corruption and persistent memory leaks resulting from a simple heap overflow.

In this paper, we propose Poseidon, a safe, fast, and scalable persistent memory allocator. The premise of Poseidon revolves around providing a user application with per-CPU sub-heaps for scalability and high performance, while managing the heap metadata in a segregated fashion and efficiently protecting the metadata using a scalable hardware-based protection scheme, Intel's Memory Protection Keys (MPK). We evaluate Poseidon with a wide array of microbenchmarks and real-world benchmarks, noting: Poseidon outperforms the state-of-art allocators by a significant margin, showing improved scalability and performance, while also guaranteeing heap metadata protection.

References

  1. Anandtech. 2018. Intel Launches Optane DIMMs Up To 512GB: Apache Pass Is Here! https://www.anandtech.com/show/12828/intel-launches-optane-dimms-up-to-512gb-apache-pass-is-hereGoogle ScholarGoogle Scholar
  2. Emery D Berger, Kathryn S McKinley, Robert D Blumofe, and Paul R Wilson. 2000. Hoard: A Scalable Memory Allocator for Multithreaded Applications. In Proceedings of the 9th ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS). Cambridge, MA, 117--128.Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Emery D. Berger and Benjamin G. Zorn. 2006. DieHard: Probabilistic Memory Safety for Unsafe Languages. In Proceedings of the 2006 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI). Ottawa, Canada, 158--168.Google ScholarGoogle Scholar
  4. Kumud Bhandari, Dhruva R. Chakrabarti, and Hans-J. Boehm. 2016. Makalu: Fast Recoverable Allocation of Non-volatile Memory. In Proceedings of the 27th Annual ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA). ACM, Amsterdam, Netharlands, 677--694.Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Dave Chinner. 2015. xfs: updates for 4.2-rc1. https://lwn.net/Articles/635514/Google ScholarGoogle Scholar
  6. Brian F. Cooper, Adam Silberstein, Erwin Tam, Raghu Ramakrishnan, and Russell Sears. 2010. Benchmarking Cloud Serving Systems with YCSB. In Proceedings of the 1st ACM Symposium on Cloud Computing (SoCC) (Indianapolis, Indiana, USA). ACM, Indianapolis, Indiana, USA, 143--154.Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Andreia Correia, Pascal Felber, and Pedro Ramalhete. 2018. Romulus: Efficient Algorithms for Persistent Transactional Memory. In Proceedings of the ACM symposium on Parallelism in algorithms and architectures (SPAA). Vienna, Austria, 271--282.Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Moritz Eckert, Antonio Bianchi, Ruoyu Wang, Yan Shoshitaishvili, Christopher Kruegel, and Giovanni Vigna. 2018. Heaphopper: bringing bounded model checking to heap implementation security. In Proceedings of the 27th USENIX Security Symposium (Security). Baltimore, MD, 99--116.Google ScholarGoogle Scholar
  9. Jason Evans. 2006. A Scalable Concurrent malloc (3) Implementation for FreeBSD. In Proceedings of the BSDCan. Ottawa, Canada.Google ScholarGoogle Scholar
  10. Google. 2007. TCMalloc: Thread-Caching Malloc. http://goog-perftools.sourceforge.net/doc/tcmalloc.html.Google ScholarGoogle Scholar
  11. Mohammad Hedayati, Spyridoula Gravani, Ethan Johnson, John Criswell, Michael L Scott, Kai Shen, and Mike Marty. 2019. Hodor: Intra-Process Isolation for High-Throughput Data Plane Libraries. In Proceedings of the 2019 USENIX Annual Technical Conference (ATC). Renton, WA, 489--503.Google ScholarGoogle Scholar
  12. Deukyeon Hwang, Wook-Hee Kim, Youjip Won, and Beomseok Nam. 2018. Endurable Transient Inconsistency in Byte-addressable Persistent B+-tree. In Proceedings of the 16th USENIX Conference on File and Storage Technologies (FAST). Oakland, California, USA, 187--200.Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Intel. 2016. C++ bindings for libpmemobj (part 6) - transactions. http://pmem.io/2016/05/25/cpp-07.htmlGoogle ScholarGoogle Scholar
  14. INTEL. 2019. Persistent Memory Development Kit. http://pmem.io/Google ScholarGoogle Scholar
  15. INTEL. 2019. PMDK man page: pmemobj_alloc. http://pmem.io/pmdk/manpages/linux/v1.5/libpmemobj/pmemobj_alloc.3Google ScholarGoogle Scholar
  16. INTEL. 2020. PMDK man page: libpmemobj - persistent memory transactional object store. https://pmem.io/pmdk/manpages/linux/master/libpmemobj/libpmemobj.7.html.Google ScholarGoogle Scholar
  17. Intel Corporation. 2019. Intel 64 and IA-32 Architectures Software Developer's Manual. https://software.intel.com/en-us/articles/intel-sdm.Google ScholarGoogle Scholar
  18. Joseph Izraelevitz, Jian Yang, Lu Zhang, Juno Kim, Xiao Liu, Amir-saman Memaripour, Yun Joon Soh, Zixuan Wang, Yi Xu, Subramanya R. Dulloor, Jishen Zhao, and Steven Swanson. 2019. Basic Performance Measurements of the Intel Optane DC Persistent Memory Module. https://arxiv.org/abs/1903.05714v2Google ScholarGoogle Scholar
  19. Jaegeuk Kim. 2012. f2fs: introduce flash-friendly file system. https://lwn.net/Articles/518718/.Google ScholarGoogle Scholar
  20. R. Madhava Krishnan, Jaeho Kim, Ajit Mathew, Xinwei Fu, Anthony Demeri, Changwoo Min, and Sudarsun Kannan. 2020. Durable Transactional Memory Can Scale with Timestone. In Proceedings of the 25th ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS). Lausanne, Switzerland, 335--349.Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Changman Lee, Dongho Sim, Jooyoung Hwang, and Sangyeun Cho. 2015. F2FS: A new file system for flash storage. In Proceedings of the 13th USENIX Conference on File and Storage Technologies (FAST). Santa Clara, California, USA, 273--286.Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Mengxing Liu, Mingxing Zhang, Kang Chen, Xuehai Qian, Yongwei Wu, Weimin Zheng, and Jinglei Ren. 2017. DudeTM: Building Durable Transactions with Decoupling for Persistent Memory. In Proceedings of the 22nd ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS). Xi'an, China, 329--343.Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Ran Liu and Haibo Chen. 2012. SSMalloc: A Low-latency, Locality-conscious Memory Allocator with Stable Performance Scalability. In Proceedings of the 3rd Asia-Pacific Workshop on Systems (APSys). Seoul, South Korea, 1--6.Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Micro. 2019. 3D XPoint Technology. https://www.micron.com/products/advanced-solutions/3d-xpoint-technologyGoogle ScholarGoogle Scholar
  25. Gene Novark and Emery D Berger. 2010. DieHarder: Securing the Heap. In Proceedings of the 17th ACM Conference on Computer and Communications Security (CCS). Chicago, IL, 573--584.Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Ismail Oukid, Daniel Booss, Adrien Lespinasse, Wolfgang Lehner, Thomas Willhalm, and Grégoire Gomes. 2017. Memory Management Techniques for Large-scale Persistent-main-memory Systems. In Proceedings of the 43rd International Conference on Very Large Data Bases (VLDB). TU Munich, Germany, 1166--1177.Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Soyeon Park, Sangho Lee, Wen Xu, Hyungon Moon, and Taesoo Kim. 2019. Libmpk: Software Abstraction for Intel Memory Protection Keys (Intel MPK). In Proceedings of the 2019 USENIX Annual Technical Conference (ATC). Renton, WA, 241--254.Google ScholarGoogle Scholar
  28. Andrew T Phillips and Jack SE Tan. 2003. Exploring Security Vulnerabilities by Exploiting Buffer Overflow using the MIPS ISA. ACM SIGCSE Bulletin 35 (2003), 172--176. https://doi.org/10.1145/792548.611962Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Mustapha Refai. 2006. Exploiting a Buffer Overflow using Metasploit Framework. In Proceedings of the 2006 International Conference on Privacy, Security and Trust: Bridge the Gap Between PST Technologies and Business Services. New York, USA, 1--4.Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. David Schwalb, Tim Berning, Martin Faust, Markus Dreseler, and Hasso Plattner. 2015. nvm malloc: Memory Allocation for NVRAM. In Proceedings of the International Workshop on Accelerating Analytics and Data Management Systems Using Modern Processor and Storage Architectures (ADMS). Kohala Coast, HI, 61--72.Google ScholarGoogle Scholar
  31. Sam Silvestro, Hongyu Liu, Corey Crosser, Zhiqiang Lin, and Tongping Liu. 2017. FreeGuard: A Faster Secure Heap Allocator. In Proceedings of the 24th ACM Conference on Computer and Communications Security (CCS). Dallas, TX, 2389--2403.Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Sam Silvestro, Hongyu Liu, Tianyi Liu, Zhiqiang Lin, and Tongping Liu. 2018. Guarder: A Tunable Secure Allocator. In Proceedings of the 27th USENIX Security Symposium (Security). Baltimore, MD, 117--133.Google ScholarGoogle Scholar
  33. Anjo Vahldiek-Oberwagner, Eslam Elnikety, Nuno O Duarte, Michael Sammler, Peter Druschel, and Deepak Garg. 2019. ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK). In Proceedings of the 28th USENIX Security Symposium (Security). Santa Clara, CA, 1221--1238.Google ScholarGoogle Scholar
  34. Haris Volos, Andres Jaan Tack, and Michael M. Swift. 2011. Mnemosyne:Lightweight Persistent Memory. In Proceedings of the 16th ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS). Newport Beach, CA, 91--104.Google ScholarGoogle Scholar
  35. 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 ACM SIGMOD/PODS Conference. Houston, TX, USA, 473--488.Google ScholarGoogle Scholar
  36. Matthew Wilcox. 2014. Add Support for NV-DIMMs to Ext4. https://lwn.net/Articles/613384/Google ScholarGoogle Scholar
  37. Jian Xu and Steven Swanson. 2016. NOVA: A Log-structured File System for Hybrid Volatile/Non-volatile Main Memories. In Proceedings of the 14th USENIX Conference on File and Storage Technologies (FAST). Santa Clara, California, USA, 323--338.Google ScholarGoogle Scholar
  38. Jian Yang, Juno Kim, Morteza Hoseinzadeh, Joseph Izraelevitz, and Steve Swanson. 2020. An Empirical Guide to the Behavior and Use of Scalable Persistent Memory. In Proceedings of the 18th USENIX Conference on File and Storage Technologies (FAST). Santa Clara, CA, 169--182.Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Lu Zhang and Steven Swanson. 2019. Pangolin: A Fault-Tolerant Persistent Memory Programming Library. In Proceedings of the 2019 USENIX Annual Technical Conference (ATC). Renton, WA, 897--912.Google ScholarGoogle Scholar
  40. Pengfei Zuo and Yu Hua. 2018. SecPM: a Secure and Persistent Memory System for Non-volatile Memory. In Proceedings of the USENIX Workshop on Hot Topics in Storage and File Systems (HotStorage). Boston, MA.Google ScholarGoogle Scholar

Index Terms

  1. Poseidon: Safe, Fast and Scalable Persistent Memory Allocator

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
  • Published in

    cover image ACM Conferences
    Middleware '20: Proceedings of the 21st International Middleware Conference
    December 2020
    455 pages
    ISBN:9781450381536
    DOI:10.1145/3423211

    Copyright © 2020 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 ACM 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: 11 December 2020

    Permissions

    Request permissions about this article.

    Request Permissions

    Check for updates

    Qualifiers

    • research-article
    • Research
    • Refereed limited

    Acceptance Rates

    Overall Acceptance Rate203of948submissions,21%

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader