Latency numbers every engineer should know
Updated Nov 8, 2026 · 3 min read
You rarely need an exact number to make a design call. You need to know which step is 10× slower than the others, because that step sets the speed of the whole request. A handful of rough timings, each rounded to its order of magnitude, is enough to spot it.
The table
| Operation | Rough time | Notes |
|---|---|---|
| CPU L1 cache read | ~1 ns | A few CPU cycles |
| CPU L2 cache read | ~4 ns | |
| Uncontended mutex lock/unlock | ~20 ns | |
| Main memory read | ~100 ns | 100× an L1 hit |
| Compress 1 KB with a fast codec | ~2 µs | LZ4, Snappy and friends |
| Send 1 KB over a 10 Gbps link | ~1 µs | Wire time only |
| Read 1 MB sequentially from memory | ~25 µs | |
| Random 4 KB read from an NVMe SSD | ~20–100 µs | |
| Round trip inside one data center | ~0.1–0.5 ms | Includes kernel and network stack |
| Read 1 MB sequentially from SSD | ~0.3 ms | |
| Disk seek on a spinning drive | ~5–10 ms | |
| Read 1 MB sequentially from a spinning drive | ~5 ms | |
| Round trip, US east coast ↔ west coast | ~60–70 ms | |
| Round trip, US ↔ Europe | ~80–150 ms | Depends on the cities |
Make it human-sized
Nanoseconds are hard to feel. Multiply everything by a billion so that 1 ns becomes 1 second, and the gaps become obvious:
- An L1 cache hit takes 1 second.
- A main memory read takes under 2 minutes.
- A random SSD read takes several hours to a day.
- A round trip inside the data center takes one to six days.
- A round trip from California to Europe takes almost 5 years.
Seen that way, one cross-region call costs more than a million memory reads. No amount of tuning inside the process wins that back.
Where the big numbers come from
Light in optical fiber travels at about 200,000 km per second, roughly two thirds of its speed in a vacuum. That is 5 µs per kilometer one way, or about 1 ms of round trip for every 100 km. New York to London is about 5,600 km, so no protocol can answer faster than about 56 ms there and back. Real routes are longer than a straight line, and every router adds a little, so measured times run higher.
How to use them
- Add up a request path hop by hop. If one hop is 50 ms and the rest total 2 ms, only the 50 ms is worth working on.
- Count round trips, not bytes. Ten sequential calls inside a data center cost ~5 ms; ten calls across an ocean cost over a second. Batch them or run them in parallel.
- Keep hot data in memory. A cache in the same data center answers in about half a millisecond; the database behind it often takes several.
- Read big files sequentially. A sequential megabyte from SSD takes about the same time as a handful of random 4 KB reads.
- Never put a cross-region call on the path of every request unless the product truly needs it.
A worked comparison
| Where the answer lives | Typical time | Relative cost |
|---|---|---|
| In-process memory (a map in the app) | ~100 ns | 1× |
| Redis in the same data center | ~0.5 ms | ~5,000× |
| Database read from SSD | ~1–5 ms | ~10,000–50,000× |
| Database in another region | ~50–150 ms | ~1,000,000× |
The ordering is what matters for design. Each step down adds a slower hop. Pick the highest row that still keeps data fresh enough for the feature.