Pidoku

Power, Heat and the Host Link

Module 4 Lesson 4.g 40 min Difficulty 2/5

Prerequisites 4.a, 4.e


Before you start: words you need#

WordPlain meaning
HostThe ordinary computer (CPU and its RAM) that the GPU is plugged into.
PCIeThe standard slot-and-bus that connects a GPU to the host’s motherboard.
DMA (direct memory access)Hardware copying data between host RAM and the GPU without the CPU moving each byte.
Pinned memoryHost memory the operating system promises never to move or swap, so DMA can read it directly.
TDP / power limitThe most power a GPU is allowed to draw, in watts.
ThrottlingThe GPU lowering its own clock speed to stay within power or temperature limits.
PUE (power usage effectiveness)Data-center overhead: total facility power ÷ IT power. 1.3 means 30% extra for cooling and conversion.
ECC / XidError-correcting memory, and the numbered error events NVIDIA’s driver writes to the kernel log.

1. What is it?#

A GPU does not float in space. It is plugged into a host through PCIe, it draws hundreds to over a thousand watts, and every watt becomes heat that has to be removed. These physical facts set real limits on inference: how fast a model loads, how many GPUs fit in a server or a rack, and whether a GPU quietly slows down under load.

flowchart LR
  subgraph HOST["Host"]
    APP["Inference server<br/>user space"] --> DRV["NVIDIA driver<br/>kernel space"]
    RAM[("Pinned host memory")]
  end
  PCIE["PCIe x16<br/>~32–64 GB/s each way"]
  subgraph DEV["GPU"]
    CQ["Command queue"] --> SMS["SMs"]
    HBM[("HBM")]
  end
  DRV -->|"commands"| PCIE --> CQ
  RAM <-->|"DMA: data"| PCIE
  PCIE <--> HBM
  PSU["Power: 70 W to 1,400 W+"] --> DEV
  DEV --> HEAT["Heat out<br/>air or liquid"]
  class APP,DRV,SMS compute
  class RAM,HBM memory
  class PCIE,CQ queue
  class PSU,HEAT warn

2. Why does it exist?#

Because these limits cause real, confusing production problems:

  • A server takes four minutes to start because a 140 GB model has to cross a disk, a network and PCIe before the first request.
  • Node 7 is 25% slower than node 6 running identical code, because it sits in a hot spot and its GPUs throttle.
  • A new data hall can host only half the GPUs planned, because the power feed runs out before the floor space does.

None of these show up in a kernel profile. You find them by knowing the physics.


3. Simple analogy#

The GPU is a racing engine. PCIe is the fuel line from the tank (host RAM): far narrower than the engine’s internal plumbing (HBM). Power is the fuel supply, and heat is the exhaust — if the radiator cannot keep up, the engine’s computer cuts power to protect itself. A fast engine with a thin fuel line, a weak fuel pump and a clogged radiator is not fast.


4. Tiny example#

Estimate model load time and running cost from the numbers on the label:

Go
// physical.go — load time and electricity, from the facts on the label.
package main

import "fmt"

func main() {
	// 1. How long to get a model onto the GPU?
	const modelGB = 140.0 // a 70B model in BF16
	for _, link := range []struct {
		name string
		gbps float64
	}{
		{"network storage -> RAM (10 Gb/s)", 1.2},
		{"local NVMe -> RAM", 5},
		{"RAM -> GPU, pageable memory", 12},
		{"RAM -> GPU, pinned (PCIe 5)", 40},
	} {
		fmt.Printf("%-34s %6.1f s\n", link.name, modelGB/link.gbps)
	}

	// 2. What does a server cost to power?
	const (
		gpus, wattsPerGPU = 8, 700.0
		otherWatts        = 2500.0 // CPUs, fans, drives, network
		pue               = 1.3    // data-center overhead: cooling, power conversion
		dollarsPerKWh     = 0.10
	)
	kw := (gpus*wattsPerGPU + otherWatts) * pue / 1000
	fmt.Printf("\nserver draw incl. cooling: %.1f kW\n", kw)
	fmt.Printf("electricity per year:      $%.0f\n", kw*24*365*dollarsPerKWh)
}

Output:

network storage -> RAM (10 Gb/s)    116.7 s
local NVMe -> RAM                    28.0 s
RAM -> GPU, pageable memory          11.7 s
RAM -> GPU, pinned (PCIe 5)           3.5 s

server draw incl. cooling: 10.5 kW
electricity per year:      $9224

The slowest step in loading is storage, not PCIe — the main reason cold starts take minutes, and the reason 3.g and 20.g spend so much effort on model loading. And an 8-GPU server draws as much power as several homes.


5. Technical explanation#

PCIe speed depends on the generation and the number of lanes; GPUs use 16 lanes (x16):

Generationx16, each directionSeen with
PCIe 4.0~32 GB/sA100 era
PCIe 5.0~64 GB/sH100, B200 servers
PCIe 6.0~128 GB/sB300 / ConnectX-8 and newer platforms

Real copies reach roughly 60–85% of these figures. Compared with 3–8 TB/s inside the GPU, PCIe is a narrow bridge: data should cross it once, not on every request. Two details matter:

  • Pinned memory. DMA can only read host memory that the OS will not move. Copies from ordinary (“pageable”) memory go through a hidden staging copy and run at roughly half speed. Engines allocate pinned buffers for anything that crosses often.
  • Commands cross too. Every kernel launch is a small message from the driver to the GPU’s command queue, costing a few microseconds (5.d). Thousands of tiny kernels can spend more time launching than computing — the problem CUDA graphs solve (5.f).

Grace-based systems (GH200, GB200, GB300) replace PCIe between CPU and GPU with NVLink-C2C at 900 GB/s, which makes host memory usable as a fast overflow tier for KV cache (7.c). Lesson 9.b covers PCIe, DMA and the host interconnect in depth.

Power#

GPUPower limit (typical)
L472 W
L40S350 W
RTX 5090575 W
A100 SXM400 W
H100 / H200 SXM700 W
B200~1,000 W
B300 (in GB300)up to ~1,400 W
Rubinhigher still; liquid-cooled only (7.e)

Power is now the scarcest resource in AI infrastructure. New capacity is planned in megawatts and gigawatts, and the power feed — not the chips or the floor space — often decides how many GPUs a site can host (7.l).

So performance per watt is a first-class metric: tokens per joule, not just tokens per second. Small cards like the L4 are much slower than an H100 but can do more work per joule on small models, which is why they exist.

Operators also cap power deliberately. Lowering an H100 from 700 W to around 500 W often costs only 10–15% of decode throughput (decode waits on memory, not arithmetic), letting more GPUs fit in the same power budget. Measure on your workload before deciding.

Heat and throttling#

All input power becomes heat. If cooling cannot keep up, the GPU lowers its clock: thermal throttling. It also lowers clocks when it hits its power limit: power throttling. Nothing crashes. The GPU is simply 10–40% slower, often only under sustained load, often only in the hottest slot of the chassis.

This is the classic “the same code is slower on node 7” mystery. The evidence is in monitoring: temperature near the limit, clocks below nominal, and a non-zero reason in nvidia-smi -q -d PERFORMANCE (clocks_event_reasons: SW power cap, HW slowdown, thermal).

Above roughly 40 kW per rack, air can no longer carry the heat away, and data centers switch to direct liquid cooling (cold plates on the chips). NVL72 racks draw well over 100 kW and are liquid-cooled by design (7.d, 7.l).

Reliability#

At fleet scale, hardware faults are routine. HBM uses ECC to fix single-bit errors; repeated or uncorrectable errors trigger row remapping, which needs a GPU reset to take effect. Link and driver failures appear as numbered Xid events in the kernel log (for example “GPU has fallen off the bus”). Production systems watch these with NVIDIA’s DCGM (Data Center GPU Manager) and drain the GPU from service automatically (23.e).


6. Under the hood#

Where a data-center GPU’s power goes, roughly: arithmetic and tensor cores take the largest share under heavy compute, but moving data — reading HBM, crossing on-chip wires and caches — takes a large fraction too, especially in decode. That is why the energy cost of a token tracks bytes moved, and why quantization and caching save power as well as time.

Clock and power are linked: power grows roughly with frequency × voltage², so the last few hundred megahertz cost disproportionate watts. GPUs run near the point where extra clock buys little — which is why power caps cost less performance than you might expect.


7. Performance implications#

  • Model load time is set by the slowest link on the path (usually storage). Lesson 3.g and 20.g cover the fixes: local NVMe caches, parallel loading, streaming weights from a running replica.
  • Throttled GPUs make tensor-parallel groups as slow as their slowest member (14.c).
  • Power-capped fleets shift the best batch size and the best GPU choice; measure tokens per joule alongside tokens per second.

8. Production implications#

  • Export temperature, power, clocks and throttle reasons for every GPU (DCGM exporter → Prometheus), and alert on throttling — Observability module 5 shows the dashboards.
  • Pin and pre-allocate host buffers that cross PCIe repeatedly.
  • Check nvidia-smi -q for the negotiated PCIe link: a GPU running at x8 or Gen4 instead of x16 Gen5 because of a bad riser or BIOS setting loads models at half speed.
  • Drain GPUs on uncorrectable ECC errors and fatal Xid events; do not let them keep serving.

9. Common mistakes#

  1. Blaming software for a throttling GPU. Check temperatures and clocks first.
  2. Copying from pageable memory in a hot path. Half speed for no reason.
  3. Planning capacity by floor space or budget, then finding out the power runs out first.
  4. Assuming PCIe is the cold-start bottleneck when storage is.
  5. Ignoring PCIe link width and generation after hardware changes.

10. Hands-on exercise#

  1. Run physical.go with your region’s electricity price and your actual GPU count and power.
  2. On a GPU machine, run nvidia-smi -q and find: temperature, power draw and limit, the PCIe link generation and width, throttle reasons, and ECC error counts.
  3. Time a 1 GB copy to the GPU from pageable and from pinned memory (torch.empty(..., pin_memory=True) or cudaMallocHost). What is the ratio?
  4. A rack can supply 40 kW. How many 8×H100 servers fit, electrically, with PUE 1.3? How many GB300 NVL72 racks fit in a 10 MW hall?

11. Interview questions#

  1. Why must host memory be pinned for the fastest transfers?
  2. What happens when a GPU overheats or hits its power limit? How would you notice?
  3. Which step is usually slowest when cold-loading a large model, and how would you speed it up?
  4. Why does capping power often cost decode throughput less than you would expect?
  5. What do you do when a GPU reports uncorrectable ECC errors?

12. Further reading#

Checked on 11 November 2026.

↑↓ navigate↵ openesc close

100% drag to pan · scroll or pinch to zoom · double-click to zoom in