Hardware
SRAM vs DRAM: How Computer Memory Types Differ
SRAM vs DRAM compared: how each memory cell works, why SRAM is faster, cost and density, where each is used, HBM and VRAM, and why AI chips care.
SRAM vs DRAM comes down to speed versus density. SRAM (static RAM) stores each bit in a small circuit of about six transistors that holds its value as long as power is on, so it's very fast but takes a lot of space and costs far more per bit. DRAM (dynamic RAM) stores each bit as charge in a single tiny capacitor with one transistor, so it's dense and cheap, but slower and it must be refreshed constantly because the charge leaks away. That's why SRAM is used for CPU and GPU caches, measured in megabytes, while DRAM is used for main memory, measured in gigabytes.
This guide explains the difference between SRAM and DRAM in detail, why SRAM is faster than DRAM, how each cell works, where each is used, how SRAM vs DRAM vs HBM and VRAM fit together, why SRAM has stopped shrinking, and why AI chip designers obsess over both.
SRAM vs DRAM at a Glance
| SRAM (static RAM) | DRAM (dynamic RAM) | |
|---|---|---|
| Storage element | Flip-flop of about six transistors (6T cell) | One transistor plus one capacitor (1T1C cell) |
| Needs refresh? | No, while powered | Yes, every few tens of milliseconds |
| Speed | Very fast; on-chip caches respond in about a nanosecond | Slower; main memory access takes on the order of 100 ns |
| Density | Low: few bits per square millimetre | High: billions of bits per chip |
| Cost per bit | High | Low |
| Typical capacity | Kilobytes to hundreds of megabytes | Gigabytes to terabytes |
| Where it lives | On the processor die (caches, registers files, buffers) | Separate chips: DIMMs, soldered memory, HBM stacks, graphics memory |
| Volatile? | Yes | Yes |
| Typical uses | L1, L2 and L3 caches; on-chip buffers in AI accelerators; microcontroller RAM | System RAM (DDR), laptop memory (LPDDR), graphics memory (GDDR), HBM |
How SRAM Works
An SRAM cell is two cross-coupled inverters (each made of two transistors) that form a loop holding either a 0 or a 1, plus two access transistors that connect the cell to the bit lines when it's selected. That's the classic six-transistor (6T) design.
Because the loop actively drives itself, the stored value stays put without any maintenance. Reading is fast: the cell drives the bit lines directly, and sense amplifiers detect the difference within a fraction of a nanosecond on modern chips. It's built from the same logic transistors as the processor itself, so it can sit right next to the cores on the same piece of silicon.
The downside is size. Six transistors per bit, plus wiring, take up much more area than DRAM's single transistor and capacitor. On TSMC's 5 nm-class process, a high-density SRAM bit cell measures about 0.021 square micrometres, which sounds tiny until you multiply it by billions.
How DRAM Works
A DRAM cell is one access transistor and one capacitor. A charged capacitor represents a 1, an empty one a 0. When the row is selected, the transistor connects the capacitor to a bit line, and a sense amplifier detects the tiny change in voltage.
Two consequences follow:
- Reads are destructive. Reading drains the capacitor, so the value has to be written back each time.
- The charge leaks. Even without reading, capacitors lose charge within milliseconds, so the memory controller refreshes every row on a fixed schedule; the classic JEDEC refresh window is 64 milliseconds. While a bank is refreshing, it can't serve requests, which adds latency.
DRAM is manufactured on specialised processes optimised for tiny, deep capacitors rather than fast logic, so it lives on separate chips. Each modern DDR5 die holds 16 to 32 gigabits, and several dies make up a memory stick.
Why SRAM Is Faster Than DRAM
Why SRAM is faster than DRAM comes down to four reasons:
- No refresh or write-back. SRAM reads don't destroy the data and there's no refresh cycle stealing time.
- Active drive. The SRAM cell's transistors actively drive the bit line; a DRAM cell has only a tiny capacitor's charge to move it, which takes longer to sense.
- Location. SRAM sits on the processor die, millimetres or less from the cores. DRAM is on separate chips connected through a memory controller, wires and a bus, which adds distance and protocol overhead.
- Access protocol. DRAM must open a row (activate), read columns, then close it (precharge) before another row in the same bank can be read. SRAM caches are designed for single-cycle or few-cycle access.
Classic latency figures popularised by Peter Norvig illustrate the gap: an L1 cache reference around 0.5 nanoseconds, an L2 cache reference around 7 ns, and a main memory reference around 100 ns. Exact numbers vary by chip, but the order-of-magnitude difference has held for decades.
Is SRAM Better Than DRAM?
Is SRAM better than DRAM? It's faster, simpler to use and needs no refresh, so for small, speed-critical memory it's clearly better. But it's far too expensive and bulky to replace DRAM as main memory. A computer with gigabytes of SRAM would need enormous chips and cost a fortune.
Every modern computer uses both in a memory hierarchy:
| Level | Technology | Typical size | Typical latency |
|---|---|---|---|
| Registers | Flip-flops in the core | Bytes to kilobytes | Under a nanosecond |
| L1 cache | SRAM | Tens of kilobytes per core | About 1 ns |
| L2 cache | SRAM | Hundreds of kilobytes to a few megabytes per core | A few ns |
| L3 / last-level cache | SRAM | Tens to hundreds of megabytes | Around 10 ns or more |
| Main memory | DRAM (DDR, LPDDR) | Gigabytes | Around 100 ns |
| Storage | NAND flash (SSD) | Terabytes | Tens of microseconds or more |
The hierarchy works because programs reuse data: caches keep recently used data close to the cores, so most accesses never reach DRAM. Larger caches mean fewer slow trips to memory, which is why gaming CPUs with extra stacked cache, such as AMD's X3D chips with 96 MB of L3, perform so well in games.
SRAM vs DRAM vs HBM, VRAM and Other Variants
People often search SRAM vs DRAM vs HBM, VRAM or SDRAM, because the names overlap. Nearly all of them are types of DRAM:
| Name | What it is | Where you find it |
|---|---|---|
| SDRAM | Synchronous DRAM, clocked with the system bus; the basis of all modern DRAM | Generic term for DDR generations |
| DDR4, DDR5 | Standard desktop and server DRAM | DIMMs in PCs and servers |
| LPDDR5X | Low-power DRAM, usually soldered | Phones, laptops, Apple silicon |
| GDDR6, GDDR7 | Graphics DRAM with very high per-pin speeds | Graphics cards ("VRAM") |
| HBM (HBM3, HBM3E, HBM4) | DRAM dies stacked vertically and connected through thousands of wires to the processor | Data center AI accelerators |
| PSRAM | Pseudo-static RAM: DRAM with built-in refresh logic so it behaves like SRAM to the user | Microcontrollers such as ESP32 boards |
| VRAM | Not a technology: any memory dedicated to a GPU, usually GDDR or HBM | Graphics cards and accelerators |
| SRAM | True static RAM | Caches, on-chip buffers |
So HBM is DRAM, just packaged differently: very wide and very close to the processor, which buys bandwidth. Our HBM memory guide explains how stacking works and why AI accelerators depend on it. Ordinary DDR memory also gets faster when you use more channels; our dual channel RAM guide shows the bandwidth arithmetic.
SRAM vs DRAM for AI
AI has made the SRAM vs DRAM trade-off a headline issue. Running a large language model means streaming enormous numbers of weights from memory for every token, so memory bandwidth and capacity often limit speed more than raw compute.
Two design philosophies have emerged:
- DRAM-heavy (mainstream GPUs): keep weights in large HBM stacks next to the processor, with tens of megabytes of SRAM cache on die. This gives huge capacity (hundreds of gigabytes per accelerator) and very high bandwidth.
- SRAM-heavy (specialist inference chips): keep weights in on-chip SRAM, which is much faster to access but far smaller. Cerebras' wafer-scale WSE-3 holds 44 GB of on-chip SRAM across an entire wafer, while a Groq LPU chip holds about 230 MB, so serving a large model takes hundreds of Groq chips working together.
SRAM-first designs can deliver very high tokens per second for a single user, but need many chips (or a whole wafer) to hold a large model. DRAM-first designs hold big models in fewer chips and serve many users at once. Our AI chip guide covers how these designs compare.
Why SRAM Stopped Shrinking
For decades, each new manufacturing process shrank SRAM cells along with logic. That stalled recently. TSMC's N3E process uses a high-density SRAM bit cell of about 0.021 square micrometres, the same size as on N5, so SRAM barely shrank while logic kept getting denser. TSMC's N2 process brings the cell down to about 0.0175 square micrometres, a real but modest improvement.
The consequence: caches take up a growing share of expensive leading-edge silicon. That's one reason chipmakers increasingly put SRAM on separate dies, as in AMD's stacked 3D V-Cache, built on cheaper processes and bonded on top of or next to the compute die. It also affects AI chip economics, where on-chip memory is a large part of the area.
Worked Example: Why Caches Matter
Suppose a CPU core needs data, and memory access times are about 1 ns from L1 cache and about 100 ns from DRAM (illustrative numbers in line with the classic figures above). The average access time depends on how often the data is already in cache:
| Cache hit rate | Average access time (hit × 1 ns + miss × 100 ns) | Relative to all-DRAM |
|---|---|---|
| 0% (no cache) | 100 ns | 1× |
| 90% | 0.9 × 1 + 0.1 × 100 = 10.9 ns | about 9× faster |
| 98% | 0.98 × 1 + 0.02 × 100 = 2.98 ns | about 34× faster |
| 99.5% | 0.995 × 1 + 0.005 × 100 = 1.5 ns | about 67× faster |
A small amount of fast SRAM, used well, makes the whole system behave almost as if all memory were fast. That's why every processor, from a microcontroller to a data center GPU, combines a little SRAM with a lot of DRAM, and why software that keeps its working data small and local runs dramatically faster.
Power, Cost and Other Differences
- Power: SRAM uses no refresh power and very little power when idle, but at high speeds and large sizes its leakage adds up. DRAM spends energy on refresh and on moving data across a bus, which dominates the energy cost of many AI workloads.
- Cost: per bit, SRAM is far more expensive because it uses more silicon area on costly logic processes. DRAM is a commodity made in enormous volume, though its prices swing with supply and demand.
- Reliability: both can suffer bit flips from radiation; servers use error-correcting codes (ECC) for DRAM and parity or ECC for large caches.
- Persistence: both lose data when power is removed, unlike flash memory or emerging non-volatile memories.
FAQ
What is SRAM used for?
Mainly caches inside CPUs and GPUs, register files, on-chip buffers in AI accelerators and network chips, and the main RAM of small microcontrollers. Anywhere speed matters more than capacity.
Why don't computers use SRAM for main memory?
It's too expensive and too large. Each SRAM bit needs about six transistors versus DRAM's one transistor and capacitor, so gigabytes of SRAM would need huge, costly chips. DRAM gives far more capacity for the money.
Is DDR5 SRAM or DRAM?
DDR5 is DRAM. All mainstream system memory, including DDR, LPDDR, GDDR and HBM, is DRAM. SRAM is mostly found inside processors as cache.
Is cache memory SRAM?
Yes. CPU and GPU caches are almost always SRAM, because they must respond within a few cycles. Some designs experiment with embedded DRAM for large caches, but SRAM is the norm.
Is HBM faster than SRAM?
No. HBM is stacked DRAM with very high bandwidth, but on-chip SRAM still has lower latency and higher bandwidth per bit. HBM's advantage is capacity: it holds tens of gigabytes per stack, far more than SRAM can.