Numa Calculator






Numa Calculator | Non-Uniform Memory Access Performance Tool


Numa Calculator

Optimize your Non-Uniform Memory Access architecture for peak performance.



Latency for a CPU to access memory on its own NUMA node.
Please enter a positive value.


Latency for a CPU to access memory on a different NUMA node.
Remote latency must be greater than local latency.


Percentage of memory requests that are served from remote nodes.
Must be between 0 and 100.


Total number of physical NUMA domains in the system.

Effective System Latency
68.0 ns
NUMA Locality Ratio: 1.67

Factor of remote vs local access delay.

Efficiency Score: 88.2%

Performance relative to a perfect local-only system.

Performance Penalty: 13.3%

Estimated slowdown due to cross-node traffic.

Latency Distribution Chart

Visualizing Local vs Remote vs Effective System Latency.

Comparative Performance Table


Metric Value Description

What is a Numa Calculator?

A numa calculator is a specialized tool used by systems engineers, database administrators, and software developers to quantify the performance implications of Non-Uniform Memory Access (NUMA) architectures. In modern multi-socket server environments, memory is not a single uniform pool. Instead, memory is physically attached to specific processors. While any processor can access all memory, accessing memory attached to a different processor (a “remote” node) takes significantly longer than accessing memory attached directly to the local processor.

Using a numa calculator allows you to predict the “Effective Latency” of your applications based on how frequently they hit remote memory. Professionals use these metrics to decide whether to implement NUMA pinning (affinity), adjust memory allocation policies, or redesign multi-threaded algorithms to be “NUMA-aware.”

Numa Calculator Formula and Mathematical Explanation

The mathematical core of a numa calculator relies on weighted averages and ratio analysis. The primary goal is to find the aggregate cost of non-local memory operations.

The Effective Latency Formula

The main calculation for effective latency is derived as follows:

Effective Latency (L_e) = (Local Latency × % Local Access) + (Remote Latency × % Remote Access)

Variable Meaning Unit Typical Range
L_l Local Latency Nanoseconds (ns) 40 – 90 ns
L_r Remote Latency Nanoseconds (ns) 100 – 300 ns
P_r Remote Access Pct Percentage (%) 0 – 50%
N_f NUMA Factor Ratio 1.2 – 3.0

Practical Examples (Real-World Use Cases)

Example 1: High-Performance Database Server

Imagine a SQL server running on a dual-socket AMD EPYC system. The local latency is 80ns, but remote access jumps to 140ns. Due to poor query optimization, the numa calculator shows that 30% of memory requests are remote.

Calculation: (80 * 0.70) + (140 * 0.30) = 56 + 42 = 98ns Effective Latency.
This represents a 22.5% increase in memory access time compared to a fully local workload.

Example 2: Virtualization Host (VMware/KVM)

A virtualization admin wants to check the penalty of “spanning” a VM across two NUMA nodes. If the local latency is 60ns and remote is 120ns, and the VM accesses memory randomly (50% remote), the numa calculator produces 90ns. The efficiency score drops to 66%, prompting the admin to resize the VM to fit within a single NUMA domain.

How to Use This Numa Calculator

  1. Enter Local Latency: Input the base latency of your CPU socket. You can find this using tools like mlc (Memory Latency Checker) on Linux.
  2. Enter Remote Latency: Input the hop latency between sockets.
  3. Estimate Remote Access: Use performance counters (like perf or numastat) to see how much cross-node traffic is occurring.
  4. Select Node Count: Choose your physical topology to adjust the comparative metrics.
  5. Analyze Results: Look at the Efficiency Score. Anything below 85% usually indicates a need for optimization.

Key Factors That Affect Numa Calculator Results

  • Interconnect Bandwidth: The speed of the QPI, UPI, or Infinity Fabric directly dictates the Remote Latency variable in our numa calculator.
  • Memory Interleaving: BIOS settings that interleave memory across nodes can turn a NUMA system into a pseudo-UMA system, increasing average latency but balancing load.
  • OS Scheduler Policy: Modern kernels try to schedule threads near the memory they own, which reduces the Remote Access Frequency input.
  • Application Memory Footprint: Large datasets that exceed a single node’s capacity force remote access, which the numa calculator will highlight as a penalty.
  • CPU Architecture: Different generations (e.g., Cascade Lake vs Sapphire Rapids) have vastly different NUMA distance matrices.
  • Workload Locality: Whether the code is written with “First Touch” allocation policies drastically changes the locality percentage.

Frequently Asked Questions (FAQ)

What is a “good” NUMA ratio?

In a professional numa calculator, a ratio under 1.5 is considered excellent for multi-socket systems. Ratios above 2.0 often indicate significant bottlenecks in the fabric interconnect.

Can a numa calculator help with gaming PCs?

Most consumer gaming PCs use a single socket (UMA), so the calculator isn’t needed. However, high-end workstations (Threadripper/Xeon W) definitely benefit from NUMA analysis.

How do I find my local and remote latency?

Use the Intel Memory Latency Checker (MLC) tool. It provides a matrix of latencies between all nodes in your system which you can plug into the numa calculator.

Does higher remote access frequency always mean bad performance?

Not necessarily. If the bandwidth is high enough, latency might be hidden. However, for latency-sensitive apps like HFT or real-time processing, the numa calculator metrics are critical.

How does “First Touch” allocation affect results?

Linux allocates memory on the node where the thread first writes to it. This improves locality and lowers the remote access percentage in your calculations.

What is “NUMA Distance”?

It is a relative scale (often starting at 10 for local) used by the BIOS to describe hops. Our numa calculator uses actual nanoseconds for better real-world precision.

Is there a software fix for high NUMA penalties?

Yes, tools like numactl allow you to bind processes to specific nodes, effectively reducing the remote access frequency to near zero.

Does the number of nodes change the formula?

Yes, as you add nodes, the probability of hitting a “very remote” node (multiple hops) increases, potentially requiring a more complex numa calculator model.

© 2023 Numa Performance Tools. All rights reserved.


Leave a Reply

Your email address will not be published. Required fields are marked *