Latency Numbers Every Programmer Should Know
Hardware and software have progressed over the years. Latencies for various operations put things in perspective.
The preceding table shows the operations in a computer vis-a-vis the latency incurred due to the operation. When a CPU core processes some data in a CPU register, it may take a few CPU cycles (for reference, a 3 GHz CPU runs 3000 cycles per nanosecond), but the moment it has to fall back on L1 or L2 cache, the latency becomes thousands of times slower. The preceding table does not show main memory access latency, which is roughly 100 ns (it varies, based on the access pattern) — about 25 times slower than the L2 cache.
Unit Reference
1
ns =10^-9
seconds1
µs =10^-6
seconds =1,000
ns1
ms =10^-3
seconds =1,000
µs =1,000,000
ns
Additional Information
Therefore, it is possible to read these numbers ;
● sequentially from HDD at a rate of ~200MB per second
● sequentially from SSD at a rate of ~1 GB per second
● sequentially from main memory at a rate of ~100GB per second (burst rate)
● sequentially from 10Gbps Ethernet at a rate of ~1000MB per second No more than 6–7 round trips between Europe and the US per second are possible, but approximately 2000 per second can be achieved within a datacenter.
Sample
What is the overall latency of retrieving 50 image 512kB images from one server?
Native design: do all the work on one machine — dominated by disk seek time ?
Reads required to generate page: 50 images / 2 disks per machine = 25
Time to read one image from HDD: (512KB / 1MB) * 5 ms + 10 ms seek = 12.5 ms
Approximate time to generate results: 25 reads * 12.5 ms = 312.5 ms
One HDD-based server can generate 1000 ms / 312.5 ms ~= 3 result pages per second.
Links
https://blog.bytebytego.com/p/ep22-latency-numbers-you-should-know
Availability Numbers
High availability means that an IT system, component, or application can operate at a high level, continuously, without intervention, for a given time period. High-availability infrastructure is configured to deliver quality performance and handle different loads and failures with minimal or zero downtime.
Making a conclusion
👨👦👦 Leave a comment, I am free for discussion with your any kind technical question.
✅ Subscribe Me
⬇️ Check out my other articles
☕️ If you like my article you can buy me a coffee https://www.buymeacoffee.com/imiskenderatasoy
👏 Don’t forget to clap
🙃 And stay awesome