In 2010, Jeff Dean from Google gave a wonderful talk in Standford & he discussed few numbers of computing systems, he got really famous for that. Peter Norvig published those numbers for the first time in the internet. Time passes away, so the numbers also change. I found a very good interactive web UI of those numbers which roughly tell how much those numbers have changed over the years as a function of time.
This article is a compilation of not only Jeff Dean’s estimated data, rather of all such numbers from different sources which may help you as a system designer & architect. While designing, you can use these numbers to estimate the amount of resources your system needs.
Rough estimation of latency data for 2019:
- L1 cache reference: 1 nanosecond.
- L2 cache reference: 4 nanosecond.
- Mutex Lock / Unlock: 17 nanosecond.
- Main memory / RAM reference: 100 nanosecond.
- Compress 1 KB with Zippy (currently called Snappy): 2000 nanosecond or 2 microsecond.
- CPU branch mispredict: 3 nanosecond.
- Solid State Drive (SSD) random read: 16 microsecond.
- Disk (Hard drive / magnetic drive) seek: 3 millisecond.
- Read 1,000,000 bytes sequentially from main memory: 4 microsecond.
- Read 1,000,000 bytes sequentially from SSD: 62 microsecond.
- Read 1,000,000 bytes sequentially from disk: 947 microsecond.
- Round trip network request in same data centre : 500 microsecond.
- Send 2000 bytes over commodity network: 62 nanosecond.
Time Taken for payload to travel over TCP:
Here is the amount of time required to transmit various data payloads on typical cell networks around the world assuming no data loss.
RTT — Round Trip Time — Total time taken for a data packet (bunch of data bytes) to travel from sender to receiver & receiver to sender over the network. In short, it’s called Ping time.
- Transfer of 1 byte to 13,000 bytes (roughly 13 KB) data takes 1 round trip or 1 RTT. Rough time in taken in USA: 150 millisecond, India: 1200 millisecond, Brazil: 600 millisecond.
- 13,001 bytes — 39,000 bytes (13 KB to 39 KB) takes 2 RTT. Rough time taken — USA: 300 millisecond, India: 2400 millisecond, Brazil: 1200 millisecond.
- 39,001 bytes — 91,000 bytes (39 KB to 91KB) takes 3 RTT. Rough time taken-USA: 450 millisecond, India: 3600 millisecond, Brazil: 1800 millisecond.
- 91,001 bytes — 195,000 bytes (91 KB to 195 KB) takes 4 RTT. Rough time taken — USA: 600 millisecond, India: 4800 millisecond, Brazil: 2400 millisecond.
So more the response size, more bytes, more round trip, more the API latency, less user friendly app. 🙁
This post will be updated as and when new or updated numbers are found. Please let me know if you are aware of new numbers.