LESSON 1.16 · 5 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
CPU affinity and NUMA
Pin workers to CPUs, place their memory, and see which reads cross nodes.
Needs1.15 System calls
Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 3 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 1.16 · NUMA BAY2 NODES · 4 CPUS · DISTANCE 10 / 21
01
Stage 1 of 5 · Two nodes
This machine has 2 NUMA nodes. Each node has 2 CPUs and its own memory.
Explain it simply
Big servers have two or more CPU sockets. Each socket has its own CPUs and its own memory, and together they make a node. A CPU reads its own node's memory fastest. A read from the other node crosses the link between them, so it takes about twice as long.
Node 0 holds CPU 0, CPU 1 and memory 0. Node 1 holds CPU 2, CPU 3 and memory 1. Main runs on CPU 0. The distance is 10 inside a node and 21 between the nodes.
page, page readaffinity mask, distanceremote read, extra timewaits for its CPUworker, run time
Toy: 2 NUMA nodes × 2 CPUs · 8 pages of 4 KiB · a read takes distance × 0.1 µs (10 local, 21 remote)
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
A page read takes the node distance times 0.1 µs.
PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
- 4 more stages and 3 live controls
- 2 mix-up cards and 3 predict-then-reveal checks
- Watch it as a narrated video, in three voices
- Every Pro lesson and capstone · 656 in total
$99 a year, or $15 a month. Cancel any time.