All papers
ISMM '23 · 2023

NUMAlloc: A Faster NUMA Memory Allocator

Hanmei Yang, Xin Zhao, Jin Zhou, Wei Wang, Sandip Kundu, Bo Wu, Hui Guan, Tongping Liu

ACM SIGPLAN International Symposium on Memory ManagementMemory Allocators

In one paragraph

On NUMA machines, memory attached to another socket is slower to reach, and most allocators ignore that: they hand threads memory wherever it happens to be, so applications pay for remote accesses and interconnect congestion. NUMAlloc is built around binding: threads are bound to nodes and memory is managed per node. Origin-aware management keeps allocations and frees local to the node they came from, and incremental sharing gets the benefit of transparent huge pages without their memory waste. Linked in without recompilation, it was the fastest allocator in the evaluation and scaled to 128 threads.

Key ideas

  • Binding-based memory management: the first allocator organized around thread-to-node binding, so every allocation is served from the local node.
  • Origin-aware management: freed memory returns to the node it came from, keeping locality on both allocation and deallocation.
  • Incremental sharing: transparent huge pages are shared across size classes gradually, balancing their speed against memory overhead.
  • Drop-in: applications link to it without code changes or recompilation.

Results

  • 15.7% faster than the second-best allocator (mimalloc) and 20.9% faster than the default Linux allocator on average, with up to 4.6× and 5.3× in the best case.
  • 18.4%, 18.2%, and 20.7% faster than TCMalloc, TCMalloc-NUMA, and Intel TBB, which are all NUMA-aware allocators.
  • Scales to 128 threads on an 8-node, 128-core Xeon Platinum machine, with memory overhead the authors call reasonable.

Why it matters for Teyon

Allocation cost is the floor under every overhead number Teyon quotes. This is the craft that lets Watcher's recording and XScope's tracking live inside a training job without slowing it.

Read the original

This page is our summary. The paper itself, peer-reviewed at ISMM '23, is the source of every number above.