Metall: A persistent memory allocator for data-centric analytics

Keita Iwabuchi, Karim Youssef, Kaushik Velusamy, Maya Gokhale, Roger Pearce · DOI

Abstract

Modern data-centric analytics often face a significant performance bottleneck during the data ingestion phase, where raw data is loaded and indexed into complex structures. This paper presents Metall, a high-performance persistent memory allocator designed to bridge the gap between volatile DRAM and persistent storage (NVMe SSDs, Intel Optane). By leveraging a chunk-based allocation strategy and memory-mapped files, Metall allows applications to treat persistent storage as a seamless extension of memory, enabling instant data reattachment and eliminating the "reconstruction tax" associated with large-scale analytics.

Introduction

In data science, the time spent loading raw data and building indices often exceeds the time spent on actual analysis. As datasets scale beyond DRAM capacity, efficient use of persistent storage becomes critical. Existing solutions like standard serialization or specialized NVRAM libraries often suffer from poor scalability, high complexity, or hardware lock-in. Metall addresses these challenges by providing a C++ memory allocator that enables complex data structures to persist on non-volatile storage using a simple mmap-based interface, achieving up to 48x speedups over traditional allocators.

System Architecture and Methods

Metall is built upon the mmap(2) system call, which maps files directly into a process's virtual memory space. This approach allows the operating system to manage data movement between storage and memory transparently.

High-level architecture of Metall showing the relationship between the allocator, DRAM, and Persistent Memory (PM).

Memory Management Strategy

Metall employs several key technical innovations to optimize performance:

  • Chunk-based Allocation: Inspired by Supermalloc, Metall uses 2MB chunks for allocation. Management metadata is kept in DRAM during execution to ensure low latency and is only serialized to persistent storage upon application closure.
  • Offset Pointers: To ensure data structures remain valid across different memory mappings, Metall uses relative offset pointers instead of absolute raw pointers.
  • Snapshotting via Reflink: By leveraging the reflink feature of modern filesystems (e.g., XFS, ZFS), Metall can create efficient, copy-on-write snapshots of data structures.
  • Batch Synchronized mmap (bs-mmap): For network-attached storage, Metall introduces a custom synchronization method that identifies and flushes "dirty" pages in bulk, overcoming the performance limitations of standard mmap on distributed systems.
Internal data structures of Metall, including the Chunk Directory and Bin Directory for managing small and large allocations.

Evaluation and Key Results

The authors evaluated Metall using massive real-world datasets, including a 1.8 billion edge Wikipedia graph and a 4.4 billion edge Reddit comment graph. Key findings include:

  • Performance Gains: In dynamic graph construction on NVMe SSDs, Metall outperformed Boost.Interprocess by 11.7x and memkind by 48.3x.
  • Hardware Versatility: Metall proved competitive with specialized NVDIMM allocators like Ralloc on Intel Optane hardware, demonstrating its effectiveness across both next-gen memory and standard SSDs.
  • Application Impact: Integration with the GraphBLAS Template Library (GBTL) allowed users to skip graph construction entirely, resulting in a 3.5x faster total execution time for Breadth-First Search (BFS) compared to DRAM-only approaches.

Conclusion and Future Work

Metall demonstrates that the "reconstruction tax" in data analytics is optional. By keeping metadata local to DRAM and optimizing I/O patterns through user-level dirty page detection, Metall provides a robust framework for persistent, large-scale data structures. Current limitations include a single-process access model and constraints against using virtual functions or raw pointers within persisted structures. Future work will focus on developing automated tools to assess C++ data structure compatibility with the Metall framework.

Summary updated

BibTeX
@inproceedings{iwabuchi2022metall,
  author = {Keita Iwabuchi and Karim Youssef and Kaushik Velusamy and Maya Gokhale and Roger Pearce},
  title = {{Metall: A persistent memory allocator for data-centric analytics}},
  booktitle = {Parallel},
  year = {2022},
  doi = {10.1016/j.parco.2022.102905},
}
Figure