6.1.7 · D1Parallelism & Multicore

Foundations — NUMA architectures

2,756 words13 min readBack to topic

This page assumes you have seen none of the notation on the parent note. We build every letter, every symbol, every fraction from the ground up, in an order where each idea leans on the one before it. Return here whenever a symbol on NUMA architectures confuses you.


0. The picture behind everything

Before any letters, look at the map of the machine. Hold this image in your head — every symbol later is just a distance or a count on this picture.

Figure — NUMA architectures

1. Processor, core, node — the three "things"

Why the topic needs these words: NUMA is defined relative to a node. "Local" means "same node", "remote" means "different node". If you don't have the word node, you cannot even say what local means.

We will count nodes with a letter. Let

The little subscript is just a label reminding us what we are counting — it is not multiplication, not a power, just a note-to-self written small. Read it aloud as "N-nodes".


2. Memory, address, and DRAM

The picture: imagine every book on every shelf has a unique sticker number. is that sticker number. The whole shelf, node by node, is one long numbered strip — but chopped into pieces, one piece per desk.

Figure — NUMA architectures

Why the topic needs : to decide which desk a book lives at, the machine looks at its sticker number and does arithmetic on it. That arithmetic is the "address mapping" formulas on the parent page — we prepare for them in §6.


3. Time and the letter

Everything expensive in NUMA is measured in time. We use the letter for "how long something takes", always with a small label saying which thing:

Picture: a stopwatch you start when the processor asks for a book and stop when the book arrives. Different journeys → different stopwatch readings → different 's. That difference is the "Non-Uniform" in NUMA.


4. Local vs remote — and the "cases" bracket

The parent writes access time with a big curly brace. First, what is access time?

Why the topic needs it: memory access does not have one cost anymore — it has two cases. The bracket is the honest way to write "it depends".

Figure — NUMA architectures

5. Fractions, ratios, and the " faster" idea

The parent says remote is "1.3x to 3x slower" and defines a NUMA factor. Both are ratios — one number divided by another.


6. Floor, modulo, and address mapping

To decide which node holds address , the parent uses two operators most 12-year-olds haven't met: floor and mod.

Figure — NUMA architectures

Why the topic needs floor & mod: they are the only tools that turn a smooth stream of addresses into a repeating pattern of node numbers. That repeating pattern is exactly how hardware splits memory across desks.


7. Fraction of remote accesses , and the average

The parent's performance model mixes local and remote trips using a fraction .


8. Speedup — what the ratio is comparing


The prerequisite map

node = processor + local memory

local vs remote access

address A of a box

floor and modulo mapping

which node holds A

time t in nanoseconds

NUMA factor F = remote over local

fraction f of remote trips

average time t_avg

speedup S

NUMA topic

Every arrow is a "you need this first". Notice node and address are the twin roots; everything else grows from knowing what a desk is and how a book's number picks its desk.


Connected notes

  • Parent: NUMA architectures
  • Same idea in Hinglish: 6.1.07 NUMA architectures (Hinglish)
  • What "coherence" and shared memory really promise: 6.1.05-memory-consistencymodels
  • Keeping cores from stepping on each other: 6.1.06-multicore-synchronization
  • Deciding which desk a thread sits at: 6.2.03-thread-scheduling
  • Using all this to go fast in practice: 6.3.01-parallel-algorithms

Equipment checklist

Cover the right side; can you answer before revealing?

What does a node physically contain?
One or more cores + a local memory bank + a memory controller — one "desk".
What is an address ?
The unique house-number of one box of memory.
What does the memory controller (clerk) do?
Opens the requested box of memory and hands back its contents; each desk has its own.
What is ?
The total time a processor waits from asking for a box until its contents arrive.
Read aloud — is it a product?
"Local time"; it is a single quantity, not times "local".
What is ?
The wait for the far desk's memory controller to open its box, one of the extra legs in a remote trip.
Why can never be less than ?
A remote trip does everything a local trip does plus extra wire and far-clerk time — you only add legs.
What does the "cases" bracket mean?
A written-out if/else: pick the line whose condition is true.
Compute and .
and .
In interleaved mapping, why divide by first?
Books travel one cache-line at a time, so we choose a node per line-slot, not per byte.
Define in words.
Remote latency divided by local latency — how many times slower a remote trip is.
If , what fraction of trips are local?
, i.e. 80%.
Give for in units of .
.
Give the speedup for those same numbers.
.
Are and the same thing?
No — one is per-trip slowness, the other is whole-program gain from locality.
Recall Self-test: state the ONE core idea in a sentence

Memory is split into per-node piles; your own pile is fast, others are slower because you must cross the interconnect — that gap is what all the symbols measure. One-sentence answer ::: NUMA = local memory fast, remote memory slow, and the topic is the arithmetic of that gap.