open atlas
↑ Back to track
System Design Foundations SD · 01 · 04

Numbers every engineer should know

The latency hierarchy — L1 ~1ns, RAM ~100ns, SSD ~16µs, datacenter RTT ~0.5ms, disk seek ~10ms, cross-region ~150ms — spans eight orders of magnitude. Memorize the ratios and you can reject a design in your head before building it.

SD Middle ◷ 18 min
Level
FoundationsJuniorMiddleSenior

A staff engineer is reviewing a design doc that proposes a synchronous, per-request call from a service in Virginia to a database in Frankfurt — “it’s just one extra query.” Without opening a calculator, they reject it: a transatlantic round trip is ~150 ms, so that “one extra query” adds 150 ms to every request, and a page doing three of them is now half a second of pure network wait. No benchmark, no prototype — just a number they carry in their head and a ratio: cross-region is ~300× a same-datacenter hop. The numbers every engineer should know aren’t trivia; they’re a design filter that runs in your head at conversation speed.

The latency hierarchy

Ask yourself: how long does it actually take to read from RAM versus a disk, or to call a service in another region? If you can’t answer within an order of magnitude, you’ll approve slow designs without realizing it. Here’s the table that fixes that.

Every operation a system performs sits somewhere on a ladder that spans roughly eight orders of magnitude — from a cache hit that’s effectively free to a cross-continent round trip that’s an eternity. Jeff Dean’s canonical “latency numbers every programmer should know” table is the spine of that ladder. Rounded to the magnitudes that matter:

L1 cache reference                   ~1 ns        (0.5 ns)
Branch mispredict                    ~5 ns
L2 cache reference                   ~7 ns
Main memory (RAM) reference          ~100 ns      (~100× slower than L1)
Read 1 MB sequentially from RAM      ~250 µs      (250,000 ns)
SSD random read                      ~16 µs       (~150× slower than RAM)
Round trip within a datacenter       ~0.5 ms      (500,000 ns)
Disk (HDD) seek                      ~10 ms       (~20× a DC round trip)
Read 1 MB sequentially from disk     ~30 ms
Round trip CA → Netherlands → CA     ~150 ms      (cross-region)

The absolute numbers drift with hardware generations — Dean’s original 2010 figures had no SSD line, and modern NVMe is faster than the ~16 µs here — but the ratios are durable and that’s what you memorize. RAM is ~100× slower than L1. SSD is ~100–150× slower than RAM but ~1000× faster than an HDD seek. A same-datacenter network round trip (~0.5 ms) is ~5000× a RAM access. A cross-region round trip (~150 ms) is ~300× a same-datacenter one and is governed by the speed of light, so no hardware upgrade will ever fix it.

Why this works

Why is the cross-region number a floor you can’t engineer away? Because it’s physics, not slow equipment. Light in fibre travels at roughly two-thirds of c (~200,000 km/s). California to the Netherlands and back is ~18,000 km of cable, which is ~90 ms of pure propagation minimum, before any router, queue, or TLS handshake adds more — landing around 150 ms in practice. You can buy faster CPUs, faster disks, more bandwidth; you cannot buy a shorter path through spacetime. This is why “just put a replica in each region” and “never make a synchronous cross-region call on the request path” are not preferences — they’re consequences of the one number in the table that hardware can never improve.

How they scale relative to each other

The single most useful mental trick — popularized as the “if a nanosecond were a second” scaling — is to stretch the ladder into human time so the gaps become visceral. Multiply everything by ~10^9:

  • L1 cache (~1 ns) → 1 second.
  • RAM (~100 ns) → ~2 minutes.
  • SSD read (~16 µs) → ~4.5 hours.
  • Datacenter round trip (~0.5 ms) → ~6 days.
  • Disk seek (~10 ms) → ~4 months.
  • Cross-region round trip (~150 ms) → ~5 years.

Now “reads from RAM instead of disk” stops being abstract: it’s the difference between a 2-minute errand and a 4-month expedition. This is why caching exists, why a hot working set in memory is worth so much, and why a single accidental disk seek or cross-region hop on the request path can dominate everything else combined. The lesson from estimation — find which step dominates — is exactly this table applied: the slowest tier on the path sets the floor.

Throughput orders, not just latency

Latency is “how long for one”; throughput is “how many per second,” and it has its own rough ladder worth carrying:

  • Sequential RAM bandwidth: tens of GB/s per socket.
  • NVMe SSD: ~3–7 GB/s sequential, hundreds of thousands of IOPS.
  • HDD: ~100–200 MB/s sequential, but only ~100 random seeks/sec — random I/O is where disks die.
  • Network: a 10 Gbps NIC moves ~1.25 GB/s; 25/100 Gbps in modern datacenters.
  • A single well-tuned service: low tens of thousands of simple requests/sec per core-bound box is a sane order-of-magnitude starting point.

The pairing that matters: sequential access is one to two orders faster than random on both disks and (to a lesser degree) memory, because sequential reads amortize seek/setup cost and use prefetch. “Make the access pattern sequential” is one of the highest-leverage performance moves precisely because of this ratio.

Using the numbers to reject designs cheaply

The payoff is cheap rejection: killing a bad design in a sentence instead of a sprint. A few patterns the table refutes instantly:

  • “We’ll read it from disk per request at 50K QPS.” An HDD does ~100 random seeks/sec; you’d need ~500 disks. The design is dead — cache it or use SSD/RAM.
  • “One synchronous cross-region call per request is fine.” It adds ~150 ms to every request, floor. Move the data closer or make the call async.
  • “N+1 queries, but they’re fast.” 100 sequential same-datacenter round trips × 0.5 ms = 50 ms of pure network wait before any work. Batch them.
  • “Loop over 10M rows in the app instead of in SQL.” If each row is a fetch, that’s 10M round trips; the ratio between in-process and over-the-network work is thousands-fold. Push the work to the data.

Together these patterns have one thing in common: they all involve crossing a slow boundary many times when one crossing (or zero) would do. When you see a design that calls remote resources per-item in a loop, the table gives you the rejection in seconds — no benchmark needed.

Common mistake

The trap is treating these numbers as static absolutes and either over-trusting stale figures or refusing to use them because “hardware changed.” Both miss the point. Dean’s 2010 RAM-read figure predates DDR5; NVMe blew past the SSD line; cloud cross-AZ latency differs from his single-machine context. But the ratios and orderings — RAM ≫ SSD ≫ disk-seek, same-DC ≫ cross-region by ~300×, sequential ≫ random — have held for decades and will keep holding because they reflect physics and architecture, not a product generation. Memorize the orders of magnitude and the ratios; re-measure the absolutes for your actual hardware when a decision is close.

Quiz

Roughly how much slower is a main-memory (RAM) reference than an L1 cache reference, and how much slower is a cross-region round trip than a same-datacenter round trip?

Quiz

A design proposes reading records from a spinning HDD with random seeks, at a target of 20,000 reads/second. Using the numbers in your head, what's the verdict?

Complete the analogy

A cross-region round trip (~150 ms) is a floor you cannot engineer away, because it's set by the speed of _______ through fibre over thousands of kilometres — you can buy faster CPUs and disks, but not a shorter path through spacetime.

Recall before you leave
  1. 01
    List the latency hierarchy and the ratios that matter.
  2. 02
    Why is the ~150 ms cross-region number something hardware can never fix?
  3. 03
    Give two designs the numbers let you reject in a sentence, and why.
Recap

The numbers every engineer should know form a latency hierarchy spanning roughly eight orders of magnitude: L1 ~1 ns, RAM ~100 ns, SSD random read ~16 µs, same-datacenter round trip ~0.5 ms, HDD seek ~10 ms, cross-region round trip ~150 ms. The absolute values drift with each hardware generation, but the ratios are durable and are what you memorize — RAM is ~100× L1, SSD ~150× RAM but ~1000× faster than a disk seek, and a cross-region hop is ~300× a same-datacenter one. That last number is a speed-of-light floor you can never engineer away, which is why cross-region calls belong off the request path. There’s a parallel throughput ladder (RAM tens of GB/s, NVMe GB/s, HDD ~100 random seeks/sec, 10 Gbps NIC ~1.25 GB/s) whose key lesson is that sequential beats random by one to two orders. Carried in your head, these turn architecture review into cheap rejection: a design that reads from disk per request, makes synchronous cross-region calls, or fires N+1 queries dies in a sentence — no benchmark required. Now when you’re in a design review and someone says “it’s just one extra call,” you’ll know in five seconds whether that call costs 0.5 ms or 150 ms — and whether the design survives that cost.

Practice

Start at the top. Tasks go easiest → hardest: recall a fact, apply it to a case, then a senior-level stretch. Open one, attempt it, then reveal.

recallapplystretch0 of 7 done
Connected lessons

Something unclear?

Ask a question about this lesson. Questions are anonymous and go straight to the author to make the lesson better.

shortcuts expand
search
K
prev piece
k
next piece
j
cycle tier
t
this menu
?
sources3
expand
  1. 01
  2. 02
  3. 03

Trademarks belong to their respective owners. Editorial reference only.