Abstract
Non-Uniform Memory Access (NUMA) architectures are standard in modern multi-core systems but present significant performance challenges due to complex memory sharing patterns. NumaPerf is a novel profiling tool that predictively identifies bottlenecks like remote accesses, false sharing, and thread migrations. By focusing on architecture-independent program logic rather than physical hardware data, NumaPerf can detect issues on any machine—even non-NUMA ones—enabling performance speedups of up to 5.94x with manageable overhead.
Introduction
In modern multi-core systems, NUMA is the standard architecture: memory is divided into nodes, and a processor can access its local memory much faster than memory attached to a different node. While this solves scalability issues, it creates a "performance minefield" for developers. Common pitfalls include remote accesses, cache contention (threads fighting over the same cache line), and load imbalance. Existing profiling tools often fall short because they rely on specific hardware topologies, ignore critical issues like thread migration, or fail to provide actionable guidance on how to fix detected bottlenecks.
Methods
NumaPerf breaks away from hardware-dependent profiling by using a "predictive" approach based on program logic. It consists of two main components:
- NumaPerf-Static: An LLVM-based compiler pass that instruments every memory access to heap and global variables at the intermediate representation (IR) level.
- NumaPerf-Dynamic: A runtime library that tracks these accesses. Instead of recording physical node IDs, it tracks which thread first "touched" a memory page (the "first-touch" heuristic).
Because memory sharing patterns are generally invariant to the program's logic, NumaPerf can use this data to simulate how the program would behave on various NUMA configurations. The tool introduces specific Performance Scores for remote access, sharing, and migration, helping developers prioritize bugs that actually impact execution time.
Key Results
The authors evaluated NumaPerf using standard multi-threaded benchmarks (PARSEC 2.0) and high-performance computing (HPC) applications like AMG2006 and Lulesh.
Key findings include:
- Superior Detection: NumaPerf identified 15 performance bugs that were completely missed by state-of-the-art tools like HPCToolkit and NUMAPROF.
- Massive Speedups: Fixing the bugs identified led to significant performance gains, most notably a 5.94x speedup for the
Luleshbenchmark and a 4.29x speedup forfluidanimate. - Efficiency: It operates with a performance overhead of less than 6x. While slower than simple sampling, it is orders of magnitude faster than the 100x–300x overhead typically seen in fine-grained simulators.
- Actionable Fixes: NumaPerf provides specific guidance, such as distinguishing between False Sharing (fixable via data padding) and True Sharing (requiring algorithmic changes).
Conclusion
NumaPerf demonstrates that logic-based, predictive profiling is a powerful way to optimize for NUMA architectures. While currently limited by source code requirements and specific language support (C/C++), it provides a practical and actionable framework for developers to resolve complex memory bottlenecks without requiring access to high-end server hardware during the initial development phase.
Summary updated