In a NUMA architecture, each processor or group of cores has its own local memory bank, providing very low-latency access. Accessing memory attached to a remote processor (non-local memory) incurs significantly higher latency and lower bandwidth due to the need to traverse an interconnect fabric. This non-uniformity contrasts with Uniform Memory Access (UMA) systems, where all memory is equidistant from all processors. The primary goal is to scale memory bandwidth with processor count, avoiding the bottleneck of a single, shared memory bus.
Glossary
Non-Uniform Memory Access (NUMA)

What is Non-Uniform Memory Access (NUMA)?
Non-Uniform Memory Access (NUMA) is a multiprocessor memory architecture where access time to memory depends on its physical location relative to the requesting processor core.
For optimal performance, software must be NUMA-aware. This involves thread pinning to keep execution on cores near their data and memory allocation policies that place data in the local memory of the thread that will use it most. Operating systems and runtime libraries provide APIs for managing NUMA affinity. Failure to manage this can lead to severe performance degradation, as applications suffer from constant remote memory accesses. NUMA is fundamental in modern multi-socket servers and high-performance computing systems.
Key Characteristics of NUMA Architecture
Non-Uniform Memory Access (NUMA) is a multiprocessor memory architecture where access latency depends on the memory's physical location relative to the requesting processor. Optimizing for NUMA is critical for maximizing performance on modern multi-socket servers and high-core-count CPUs.
Memory Hierarchy and Access Latency
In a NUMA system, each processor or group of cores (a NUMA node) has its own local memory. Accessing this local memory is fast. Accessing memory attached to a remote NUMA node (remote memory) incurs higher latency due to traversal across an interconnect (e.g., Intel's Ultra Path Interconnect, AMD's Infinity Fabric). The key performance goal is to maximize local memory accesses and minimize costly remote accesses through careful data and thread placement.
NUMA Affinity and Thread Pinning
NUMA affinity is the practice of binding software threads and processes to specific CPU cores and their associated memory nodes. This is achieved via OS or library calls (e.g., numactl on Linux, SetThreadAffinityMask on Windows). Thread pinning ensures a thread's memory allocations come from its local node and its execution stays on cores within that node, preventing the OS scheduler from migrating it across nodes and causing unpredictable remote memory access penalties.
First-Touch Policy and Data Placement
Most operating systems use a first-touch policy for memory allocation in NUMA systems. The physical memory page is allocated from the NUMA node where the thread that first writes to (touches) that page is executing. This makes initialization critical: if a master thread on Node 0 initializes all data, all memory is allocated to Node 0. Subsequent threads on Node 1 will suffer remote accesses. Proper initialization involves touching data in parallel from threads pinned to their respective nodes.
Interconnect Bandwidth and Contention
The NUMA interconnect is a shared resource with finite aggregate bandwidth. When many cores simultaneously access remote memory, they saturate this link, creating contention. This can degrade performance more severely than the base latency increase. Performance profiling must monitor interconnect utilization (e.g., via perf or vendor tools). Optimizations aim to reduce both the volume and the synchronization of remote accesses to avoid flooding the interconnect.
Relationship with Hardware Accelerators
NUMA principles extend to systems with discrete accelerators like GPUs or NPUs. Here, the accelerator's device memory is analogous to a remote NUMA node with very high access latency. Frameworks like Compute Express Link (CXL) aim to create a more NUMA-like, cache-coherent memory space between CPUs and accelerators. For optimal performance, data should reside in the executing processor's local memory, whether it's a CPU core or an accelerator's HBM.
Performance Analysis and Tools
Analyzing NUMA performance requires specific tools:
numactl/numastat: Linux utilities to control policy and view memory allocation statistics per node.likwid-perfctr: Provides detailed performance counter monitoring per NUMA node.- Vendor Profilers: Intel VTune Profiler and AMD uProf have dedicated NUMA analysis views.
- Key Metrics: Local/remote memory access ratios, interconnect bandwidth utilization, and remote cache hit rates. The goal is to identify which processes or data structures are causing excessive remote accesses.
How NUMA Works and the Role of NUMA Affinity
Non-Uniform Memory Access (NUMA) is a critical memory architecture in modern multi-socket servers that directly impacts the performance of high-throughput AI workloads by introducing variable memory access latencies.
Non-Uniform Memory Access (NUMA) is a multiprocessor memory architecture where a processor's access time to memory depends on its physical location. In a NUMA node, a group of CPU cores shares fast, local memory. Accessing memory attached to a remote NUMA node incurs significantly higher latency and lower bandwidth. This non-uniformity makes data and thread placement—NUMA affinity—a primary performance determinant for memory-intensive applications like large model inference.
NUMA affinity is the practice of explicitly binding software processes or threads to specific CPU cores and their associated local memory nodes. This minimizes costly remote memory accesses. In AI systems, optimizing for NUMA involves partitioning model weights, pinning dataloader workers, and configuring inter-process communication to respect node boundaries. Failure to manage affinity can lead to severe, unpredictable performance degradation as memory traffic saturates the interconnect between nodes.
NUMA vs. UMA: A Comparison
A comparison of Non-Uniform Memory Access (NUMA) and Uniform Memory Access (UMA) architectures, detailing their core design principles, performance characteristics, and suitability for different multiprocessing workloads.
| Architectural Feature | Non-Uniform Memory Access (NUMA) | Uniform Memory Access (UMA) |
|---|---|---|
Core Design Principle | Memory is physically partitioned and attached to specific processor nodes (CPU sockets). | All memory is centralized and equidistant from all processors via a shared bus or crossbar. |
Memory Access Latency | Non-uniform. Access to local memory is fast; access to remote memory (on another node) is slower. | Uniform. All memory accesses have statistically identical latency, regardless of the requesting CPU. |
Scalability | High. Scales efficiently to systems with many CPU sockets (e.g., 4, 8, 16+) by adding memory with each node. | Limited. Becomes a bottleneck as more CPUs contend for the shared memory bus, limiting practical socket count. |
Typical Hardware | Modern multi-socket servers, high-end workstations, and large-scale systems. | Traditional symmetric multiprocessing (SMP) systems, single-socket PCs, and some older multi-socket servers. |
Programming & OS Complexity | High. Requires OS and application awareness (NUMA affinity) for optimal performance via careful thread and data placement. | Low. The OS and applications view a single, flat memory space; no special placement logic is required. |
Cost & Design | Higher cost and complexity due to distributed memory controllers and interconnects (e.g., AMD Infinity Fabric, Intel Ultra Path Interconnect). | Lower cost and simpler design with centralized memory controllers. |
Optimal Workload Type | Workloads with strong data locality, where threads can be pinned to a node and work primarily on local data (e.g., large in-memory databases, scientific simulations). | Workloads with inherently shared, frequently accessed data or smaller-scale multiprocessing where simplicity is key. |
Memory Bandwidth | Aggregate bandwidth scales with the number of nodes, as each has its own memory channels. | Total bandwidth is limited by the shared bus or central memory controller, creating a potential bottleneck. |
Implications for AI and Machine Learning Workloads
Non-Uniform Memory Access (NUMA) architectures present unique performance challenges and optimization opportunities for AI/ML systems. Understanding NUMA locality is critical for minimizing latency and maximizing throughput in multi-socket servers running large-scale training or high-throughput inference.
Latency Impact on Distributed Training
In multi-socket NUMA systems, inter-socket memory access can be 2-3x slower than local memory access. For distributed training frameworks like PyTorch DDP or TensorFlow MirroredStrategy, improper process affinity can cause severe bottlenecks.
- DataLoader processes pinned to the wrong NUMA node incur high latency fetching training batches.
- Gradient synchronization across sockets becomes a major throughput limiter.
- Optimal strategy: Bind each training process to a specific socket and allocate its working memory locally using numactl or framework-specific APIs.
Inference Throughput & Batch Scheduling
High-throughput inference servers (e.g., TensorRT, Triton) must manage request batching across NUMA nodes to avoid cross-socket memory transfers.
- Batch composition should group requests being processed on the same socket.
- Model weights should be replicated in each socket's local memory to prevent remote fetches during forward passes.
- Static binding of inference threads to cores prevents expensive migrations that break memory locality.
Large Model Memory Footprint Management
Models exceeding a single socket's memory capacity (e.g., LLMs with >80B parameters) force cross-NUMA memory allocation. This creates a permanent performance penalty.
- Techniques like NUMA-aware model parallelism split layers across sockets, keeping weight gradients local.
- ZeRO-Offload and similar CPU-offload strategies must partition optimizer states according to NUMA topology.
- Transparent Huge Pages (THP) can worsen remote access latency; use explicit 1GB pages allocated locally per node.
GPU Acceleration & NUMA Affinity
GPUs and NPUs connected via PCIe to a specific CPU socket have optimal bandwidth to that socket's local memory. GPU-Direct RDMA performance depends on NUMA alignment.
- CUDA device affinity APIs (
cudaSetDeviceFlags) should bind GPU contexts to the local NUMA node. - Data staging buffers for GPU transfers must be allocated in local CPU memory to avoid extra hops.
- Multi-GPU systems often map GPUs to different sockets; peer-to-peer transfers require careful NUMA-aware placement.
Framework & Runtime Optimizations
Modern ML frameworks provide NUMA controls, but often require explicit configuration.
- PyTorch: Set
torch.set_num_threads()per process and usenumactlwrapper scripts. Thetorch.nn.parallel.DistributedDataParallelbenefits fromtorch.multiprocessingwith correct spawn context. - TensorFlow: Use
tf.config.threadingAPIs and theNUMA_BINDINGenvironment variable for thread placement. - OpenMP: The
OMP_PLACESandOMP_PROC_BINDenvironment variables are critical for math library kernels (e.g., oneDNN, cuBLAS).
Containerization & Orchestration Considerations
Orchestrators like Kubernetes must be configured to respect NUMA topology for AI workloads.
- Kubernetes Topology Manager policy should be set to
restrictedorsingle-numa-nodefor guaranteed locality. - CPU Manager policies align with exclusive CPU allocation for pods.
- Device Plugins (e.g., for GPUs) should expose NUMA node affinity in their resource advertisements.
- Docker supports
--cpuset-cpusand--cpuset-memsflags to pin containers to specific sockets and memory nodes.
Frequently Asked Questions
Non-Uniform Memory Access (NUMA) is a critical memory architecture for modern multi-socket servers and high-core-count CPUs. Understanding NUMA is essential for optimizing the performance of data-intensive workloads, including large-scale machine learning training and inference, by minimizing costly remote memory accesses.
Non-Uniform Memory Access (NUMA) is a computer memory design for multiprocessor systems where memory access time depends on the physical location of the memory relative to the requesting processor core. In a NUMA system, each processor or group of cores (a NUMA node) has its own local memory bank. Accessing this local memory is fast, while accessing memory attached to another processor (remote memory) is slower due to the need to traverse an interconnect (like AMD's Infinity Fabric or Intel's Ultra Path Interconnect). The operating system and applications must be aware of this topology to place threads and data intelligently, a practice known as setting NUMA affinity, to avoid performance degradation from excessive remote accesses.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Non-Uniform Memory Access (NUMA) is a foundational concept for optimizing performance on modern multi-socket servers. Understanding related hardware and software paradigms is essential for effective data and thread placement.
NUMA Affinity
NUMA Affinity is the practice of explicitly binding software processes or threads to specific CPU cores and their associated local memory nodes to minimize access latency. This is a critical manual optimization in high-performance computing (HPC) and database systems.
- Pinning: Using OS or runtime commands (e.g.,
numactl,taskset) to lock a process to a core. - First-Touch Policy: Many OSes allocate memory pages on the node where the thread that first accesses them resides, making initial thread placement crucial.
- Impact: Correct affinity can reduce memory latency by 2-3x compared to unbound execution, directly translating to lower tail latency in latency-sensitive applications.
Uniform Memory Access (UMA)
Uniform Memory Access (UMA) is the contrasting memory architecture to NUMA, where all processors in a system share a single, centralized memory bank via a common bus or crossbar switch. Access time to memory is identical for all processors, regardless of physical proximity.
- Symmetric Multiprocessing (SMP): The classic UMA architecture, prevalent in early multi-core systems.
- Simplified Programming: Eliminates the need for affinity tuning, as all memory accesses have uniform cost.
- Scalability Limit: The shared bus becomes a bottleneck as more cores are added, leading to the adoption of NUMA designs for modern multi-socket servers with tens to hundreds of cores.
Cache Coherence
Cache Coherence is the hardware mechanism that ensures all processor caches in a shared-memory multiprocessor system maintain a consistent view of the same memory location. It is a prerequisite for NUMA systems to function correctly.
- Coherence Protocols: Protocols like MESI (Modified, Exclusive, Shared, Invalid) manage the state of cached data lines across all cores.
- Coherency Domain: In a NUMA system, each node typically has its own coherence domain, and inter-node communication is handled by a coherent interconnect like Intel's QuickPath Interconnect (QPI) or AMD's Infinity Fabric.
- Performance Cost: Maintaining coherence across NUMA nodes introduces additional latency for remote cache misses, a key factor in NUMA performance analysis.
Compute Express Link (CXL)
Compute Express Link (CXL) is an open industry-standard interconnect that provides high-bandwidth, low-latency connectivity between the CPU and devices like accelerators (GPUs, FPGAs) and memory expanders, while maintaining memory coherency. It represents the evolution of interconnect technology critical for heterogeneous systems.
- Memory Pooling: CXL 3.0 enables memory pooling, where a block of CXL-attached memory can be dynamically shared by multiple hosts, creating a new, software-defined NUMA topology.
- Coherent Device Access: Allows accelerators to access host CPU memory coherently, simplifying programming models compared to traditional PCIe.
- Industry Adoption: Supported by Intel, AMD, ARM, and major cloud providers, it is foundational for next-generation data center architectures.
Locality of Reference
Locality of Reference is a fundamental principle of computer science describing the tendency of a processor to access the same set of memory locations repeatedly over a short period (temporal locality) or nearby memory locations (spatial locality). NUMA optimization is essentially the strategic enforcement of this principle at the hardware node level.
- Temporal Locality: Optimized by CPU caches. Data accessed recently is likely to be accessed again.
- Spatial Locality: Optimized by cache line fetches. Accessing one address makes nearby addresses cheap to access.
- NUMA Application: Designing algorithms and data structures to maximize access within a single NUMA node (local locality) minimizes expensive remote accesses, directly improving performance.
Roofline Model
The Roofline Model is an analytical performance model that visualizes the attainable performance of a computational kernel as a function of its Operational Intensity. It is used to diagnose whether a kernel is compute-bound or memory-bound, which is directly influenced by NUMA effects.
- Operational Intensity: Meas in FLOPs/byte, it's the ratio of arithmetic work to data movement from main memory.
- Memory-Bound Kernels: Kernels with low operational intensity hit the memory bandwidth "roof." For these, NUMA remote access latency and reduced effective bandwidth are severe performance limiters.
- NUMA-Aware Analysis: A kernel's performance roofline is lower when data is fetched from remote NUMA nodes, making the model essential for predicting the impact of poor data placement.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us