Latency¶
Latency Numbers Every Data Scientist Should Know
In the 2000s, Jeff Dean, a Google Senior Fellow in their Research Group, presented a list of latency numbers that every programmer should know. These numbers describe how long it takes to perform certain actions within distributed programs. Since then, it has been updated and expanded upon.
Below is yet another update on these numbers with data taken from Colin Scott, a Berkeley researcher. An interactive version of this repository can be found here.
Action | Latency (ns)1 | Latency (μ)2 | Latency (ms)3 |
---|---|---|---|
L1 cache reference | 1 ns | ||
Branch mispredict | 3 ns | ||
L2 cache reference | 4 ns | ||
Mutex lock/unlock | 17 ns | ||
Main memory reference | 100 ns | ||
Compress 1KB with Zippy | 2,000 ns | 2 μs | |
Send 1KB over 1 Gbps network | 10,000 ns | 10 μs | |
SSD random read | 16,000 ns | 16 μs | |
Read 1 MB sequentially from SSD | 49,000 ns | 49 μs | |
Read 1 MB sequentially from memory | 250,000 ns | 250 μs | |
Round trip within same datacenter | 500,000 ns | 500 μs | |
Read 1 MB sequentially from disk | 825,000 ns | 825 μs | |
Disk seek | 2,000,000 ns | 2,000 μs | 2 ms |
Send packet CA->Netherlands->CA | 150,000,000 ns | 150,000 μs | 150 ms |
Notes
Last update: March 12, 2023