System Latencies
From CPU cache to network round trips - ordered by latency
L1 cache reference
Accessing data from L1 cache
Branch mispredict
CPU branch prediction failure
L2 cache reference
Accessing data from L2 cache
Mutex lock/unlock
Thread synchronization
Main memory reference
Accessing RAM
Compress 1KB (Zippy)
Compress 1KB with Snappy
Send 1KB over 1 Gbps network
Network transfer time
Read 4KB randomly from SSD
SSD random read
150.0 μs
300,000x L1 cache
Read 1MB sequentially from memory
Sequential RAM read
250.0 μs
500,000x L1 cache
Round trip within same datacenter
Network round trip in DC
500.0 μs
1,000,000x L1 cache
Read 1MB sequentially from SSD
SSD sequential read
Disk seek (HDD)
HDD seek time
10 ms
20,000,000x L1 cache
Read 1MB sequentially from disk
HDD sequential read
20 ms
40,000,000x L1 cache
Send packet CA -> Netherlands -> CA
Intercontinental round trip
150 ms
300,000,000x L1 cache