L1 Beginner · Module 2: Why GPUs: hardware first principles

2.6The memory wall and HBM

Each GPU generation adds arithmetic faster than it adds memory bandwidth. That widening gap, the memory wall, is why HBM exists, why it is the most expensive part of an accelerator, and why LLM decode is limited by memory.

~15 min

By the end you will be able to

  • ✓Describe the memory wall with numbers from recent GPU generations
  • ✓Explain how HBM achieves its bandwidth, and what it costs
  • ✓Compare HBM with GDDR and say where each is used
  • ✓Connect the memory wall to decode speed and to the roofline ridge point

Arithmetic is easy to add to a chip: more lanes, wider tensor cores, lower precision. Bandwidth is hard to add, because every byte has to cross the edge of the chip through physical wires. Over time, the two have drifted apart.

The gap, in numbers

GPUYearDense FP16/BF16 tensorMemory bandwidthFLOP per byte (ridge)
V100 SXM22017125 TFLOP/s0.90 TB/s139
A100 SXM 80GB2020312 TFLOP/s2.04 TB/s153
H100 SXM2022989 TFLOP/s3.35 TB/s295
H200 SXM2024989 TFLOP/s4.8 TB/s206
B2002024~2,250 TFLOP/s~8 TB/s~281

From V100 to B200, tensor throughput grew about 18× while bandwidth grew about 9×. The ridge point, the arithmetic intensity a kernel needs before compute becomes the limit (3.3), has roughly doubled. A kernel that was balanced on a V100 is memory-bound on a B200. This growing imbalance is called the memory wall.

How HBM gets its bandwidth

Bandwidth is roughly bus width × transfer rate per wire. Ordinary DRAM and GDDR sit on a circuit board, where each wire is long, so the bus is narrow (64 bits per DDR channel, 384 bits on an RTX 4090) and the wires have to run very fast.

High Bandwidth Memory goes wide instead:

  • Several DRAM dies are stacked vertically and connected by thousands of through-silicon vias (TSVs).
  • Each stack has a 1,024-bit interface, 16 times wider than a DDR channel.
  • The stacks sit on a silicon interposer right beside the GPU die, millimetres away, so all those wires are short and dense.

An H100 SXM uses five active HBM3 stacks: a 5,120-bit bus delivering 3.35 TB/s from 80 GB. An RTX 4090’s GDDR6X reaches about 1 TB/s from 24 GB with a 384-bit bus running much faster per pin.

GDDR6X (RTX 4090)HBM3 (H100 SXM)
Placementseparate chips on the boardstacked beside the die, on an interposer
Bus width384 bits5,120 bits
Bandwidth~1.0 TB/s3.35 TB/s
Capacity24 GB80 GB
Cost and supplycheap, plentifulexpensive, supply-limited packaging

The speed limit, as a formula

If a decode step has to read the weights WW bytes and the batch’s KV cache KK bytes from HBM with bandwidth BB, then no kernel can make the step faster than

tstep  ≥  W+KB.t_{\text{step}} \;\geq\; \frac{W + K}{B}.

For Llama-3-8B in BF16 on an H100 at short context: 16 GB/3.35 TB/s≈4.8 ms16\ \text{GB} / 3.35\ \text{TB/s} \approx 4.8\ \text{ms}, so at most about 210 tokens/s for a single stream, however clever the kernels are. The ways around it are all about bytes: read fewer (quantization), share each read across more requests (batching), or spread the bytes over more GPUs’ worth of bandwidth (tensor parallelism).

Sources

repo · BGEBEFORE-GPU-ENGINEERINGBEFORE-GPU-ENGINEERINGPhase 1: the memory wall and HBM.
book · FREGLYAI Systems Performance EngineeringChris FreglyGPU architecture chapters: HBM generations and their effect on AI workloads.

Check your understanding

0 / 4 answered
  1. 1.What is the memory wall?

  2. 2.How does HBM achieve high bandwidth?

  3. 3.An H200 has the same peak compute as an H100 but 4.8 TB/s instead of 3.35 TB/s. What happens to batch-1 decode speed?

  4. 4.Llama-3-8B in BF16 is 16 GB. What is the best possible single-stream decode rate on a 3.35 TB/s GPU?