The memory wall is the widening gap between how fast a processor can compute and how fast memory can deliver data to it, which leaves arithmetic units idle while they wait for operands. In AI hardware, it is the main reason that peak TOPS or FLOPS figures rarely translate into real model throughput, especially for large language model inference.
The term was coined in 1995 by Wulf and McKee, who observed that processor speed was improving far faster than DRAM latency. For modern accelerators the problem is mostly about bandwidth rather than latency: over the past two decades, peak compute has grown several times faster than memory bandwidth, so ever more workloads become memory-bound.
Why the memory wall appears
The memory wall appears because logic and memory scale differently. Transistor density and specialized matrix units have multiplied peak arithmetic throughput, while DRAM bandwidth is limited by pin counts, signaling speed and energy per bit moved off the chip. Moving data also costs far more energy than computing on it: fetching a 32-bit word from off-chip DRAM consumes roughly 100 to 1,000 times more energy than a single multiply-add.
The gap is easiest to see in the ratio of compute to bandwidth on a single chip. The figures below are approximate and vary by product generation and configuration.
| Era | Peak dense compute | Memory bandwidth | Compute per byte |
|---|---|---|---|
| Around 2016 | About 20 TFLOPS (FP16) | About 0.7 TB/s | About 30 FLOPs per byte |
| Around 2020 | About 300 TFLOPS (FP16) | About 1.5 to 2 TB/s | About 150 to 200 FLOPs per byte |
| Around 2023 | About 1,000 TFLOPS (FP16) | About 3.4 TB/s | About 300 FLOPs per byte |
| Around 2025 | About 2,000 TFLOPS (FP16) | About 8 TB/s | About 250 FLOPs per byte |
The final column is the arithmetic intensity a kernel must reach before compute, rather than memory, becomes the bottleneck. Since that threshold sits in the hundreds of operations per byte, any workload with lower intensity runs far below peak performance.
Reading the memory wall with the roofline model
The roofline model makes the memory wall measurable. It plots attainable performance against arithmetic intensity: below the ridge point, performance equals bandwidth multiplied by intensity, and above it performance is capped by peak compute. A kernel that sits on the sloped part of the roof is memory-bound, and adding more arithmetic units will not speed it up.
Different parts of an AI workload land on very different sides of the ridge point, as the following table shows.
| Operation | Typical intensity | Usual bound | Reason |
|---|---|---|---|
| Large-batch training GEMM | Hundreds of FLOPs per byte | Compute-bound | Weights reused across many tokens |
| LLM prefill | High | Mostly compute-bound | Whole prompt processed in parallel |
| LLM decode, batch 1 | About 1 to 2 FLOPs per byte | Strongly memory-bound | Every weight read once per token |
| Attention with long KV cache | Low | Memory-bound | Cache read grows with context length |
| Normalization and activations | Below 1 FLOP per byte | Memory-bound | Elementwise work on large tensors |
How the memory wall shapes large language model inference
Autoregressive generation is the most visible victim of the memory wall. To produce each new token, the accelerator must stream all model weights and the growing key-value cache from memory, while performing only about two floating-point operations per weight. A 70-billion-parameter model in 16-bit precision holds about 140 GB of weights, so even at 3.35 TB/s a single sequence is limited to roughly two dozen tokens per second by bandwidth alone.
This explains why batching requests, quantizing weights to FP8 or FP4 and sharing the KV cache efficiently produce such large gains in serving cost. Each technique either raises the operations performed per byte or reduces the bytes moved, pushing the workload toward the compute roof.
Hardware and software responses
Chip designers and software engineers attack the memory wall from both sides: bringing memory closer to compute and moving fewer bytes per useful operation. No single technique removes the wall, so production systems combine several of them.
| Strategy | Mechanism | Typical effect | Trade-off |
|---|---|---|---|
| High-bandwidth memory | Stacked DRAM on a silicon interposer | Several TB/s per package | High cost, limited capacity |
| Large on-chip SRAM | Keep weights or activations on the die | Very high bandwidth, low latency | Capacity measured in MB, not GB |
| Low-precision formats | FP8, FP4 or microscaling formats | Fewer bytes per weight | Possible accuracy loss |
| Operator fusion | Combine kernels to avoid round trips | Less memory traffic | More complex compilers |
| In-memory computing | Compute inside or beside memory arrays | Minimal data movement | Immature, precision limits |
| Batching and speculative decoding | More useful work per weight read | Higher throughput per chip | Higher latency or complexity |
Wafer-scale and dataflow designs, such as chips that keep an entire model in distributed SRAM, take the on-chip route to an extreme. Their weakness is capacity: models larger than the available SRAM must be split across many chips, which turns the memory wall into an interconnect wall.
Common misunderstandings
The memory wall is often oversimplified in marketing and in casual comparisons between accelerators. The points below correct the most frequent errors.
- Peak TOPS is not delivered performance: memory-bound kernels may use only 10 to 30 percent of it.
- Bandwidth and capacity are different limits: a chip can have fast memory that is too small for the model.
- Latency still matters for small, irregular accesses, even when bandwidth dominates large transfers.
- Faster interconnects do not remove the wall: they relocate it to links between chips.
- Benchmarks must match the workload: training results say little about single-user decode speed.
In everyday language
Imagine a very fast chef who can chop vegetables in seconds. The food, however, arrives through one narrow door. The chef spends most of the time waiting, not cooking. Hiring a faster chef does not help much.
AI chips face the same problem. They can calculate extremely quickly. But the numbers they need are stored in memory, and memory sends data much more slowly. The memory wall is that waiting time. Engineers fight it by building wider doors, placing storage closer to the chef and making each delivery smaller.
Seen in the real world
An engineering team serving a 70-billion-parameter chat model on eight data-center GPUs finds that each user receives only about 30 tokens per second, even though GPU compute utilization stays below 20 percent. Profiling shows that the decode phase spends almost all of its time reading weights and the KV cache from high-bandwidth memory.
The team quantizes the weights to FP8, enables continuous batching of up to 64 concurrent requests and uses paged storage for the KV cache. Per-user speed stays similar, but aggregate throughput rises by roughly four to six times on the same hardware, and the cost per million generated tokens falls accordingly. The compute units did not get faster; the system simply wasted less time waiting for memory.