Definition · Reference latencyA reference latency is a measured figure for one elementary operation — a cache hit, a memory reference, a disk seek, a network round trip — quoted to one significant figure and used for estimating. It is data rather than a derived quantity: the lab prints every rung in full, and the only thing computed from them is the ratio between two.
L1 cache reference 1 ns
branch mispredict 3 ns
L2 cache reference 4 ns
mutex lock and unlock 17 ns
main memory reference 100 ns
compress 1 kB 2 000 ns
send 1 kB over a 1 Gbit/s link 10 000 ns
SSD random read 150 000 ns
read 1 MB sequentially from memory 250 000 ns
round trip inside one datacentre 500 000 ns
read 1 MB sequentially from SSD 1 000 000 ns
disk seek 10 000 000 ns
read 1 MB sequentially from disk 20 000 000 ns
packet California to the Netherlands 150 000 000 ns
Both ends of any ratio taken from that table are integers, so the ratio is exact. That matters more than it looks: a reader who is handed 99 999.99999 cannot tell it from a wrong answer, while 100 000 is obviously the number the lesson is about. The only rounded thing in the lab is where each bar is drawn, which goes through a logarithm and is a fact about pixels.
Example · Memory against a disk seek10 000 000 ns ÷ 100 ns = 100 000. A hundred thousand memory references fit inside one disk seek, and the ratio sits between 10⁵ and 10⁶. Said the other way round: if a memory reference took a second, a disk seek would take rather more than a day.
Why the ruler is logarithmic
Because the alternative shows nothing. Drawn to a linear scale reaching 150 000 000 ns, the memory reference at 100 ns is less than one millionth of the width of the picture, and so is everything faster than it. Eleven of the fourteen rungs are crowded into the leftmost few percent of it. The picture would be honest about the largest number and silent about every comparison worth making.
A logarithmic ruler puts equal ratios at equal distances: the gap from 1 to 10 is the same as the gap from 10⁶ to 10⁷. That is the right scale for this table precisely because the questions asked of it are ratio questions — how many of these fit in one of those — and never difference questions.
“Disk is somewhat slower than SSD”
That sentence is true of one comparison and badly wrong about the others, and which one a person has in mind is usually not stated. Reading a megabyte sequentially is 20 000 000 ns from disk and 1 000 000 ns from SSD, a ratio of 20: somewhat slower, fairly described. A disk seek against an SSD random read is 10 000 000 against 150 000, a ratio of 200/3. And a disk seek against a memory reference is 100 000. Same two words, three answers, three different decisions.
The pattern is that sequential work narrows the gaps and random work widens them, which is a preview of an argument “Storage Engines and Indexes” makes at length. Here the useful habit is smaller: before saying one thing is slower than another, name which operation on each, then take the ratio.
Carrying it around
Two forms are worth keeping. The first is a handful of exact ratios: 100 000 memory references to a disk seek, 300 datacentre round trips to a cross-continent one, 20 sequential megabytes from SSD to one from disk. The second is the decade bracket for anything else — 10⁵ ≤ r < 10⁶ — which is what the lab prints beside every ratio and is the form that survives new hardware.
What these numbers are not is a model of a running system. They are single operations measured in isolation, with nothing queued behind them and nothing contending for the same device. A real disk seek under load takes longer than the figure above, and by how much is the subject of “Queues and Utilisation”. The ladder is a floor and a set of ratios, and it is honest about being only that.