Latency orders of magnitude
How long does a read take from memory, a disk, across a data centre or an ocean? Rounded orders of magnitude to estimate without measuring, and what they mean for design. Every answer explained.
- 34 cards
- 3 topics
- Free
The outline, topic by topic
Each topic is weighted the way the exam weighs it.
- Inside the machine
- On the network
- Consequences
A few cards from the deck
Order of magnitude of a CPU L1 cache access?
Show the answer
About 1 nanosecond
It is the memory closest to the core: a few clock cycles. All the figures that follow are rounded orders of magnitude.
Roughly how many times faster is RAM than an SSD for random access?
- About 1,000 times
- About 2 times
- About 10 times
- About a million times
Show the answer
About 1,000 times
About 100 nanoseconds versus about 100 microseconds: three orders of magnitude. That is why an in-memory cache relieves a database so much.
Order of magnitude of a main memory access?
Show the answer
About 100 nanoseconds
About a hundred times slower than L1: hence the value of keeping useful data in the CPU caches.
Which is fastest?
- Reading from RAM
- Reading from an SSD
- A network round trip within the same data centre
- Reading from a mechanical hard disk
Show the answer
Reading from RAM
RAM: about 100 ns. SSD: about 100 µs. Round trip within the data centre: about 0.5 ms. Hard disk: about 10 ms.