Compiled Latency Numbers

Compiled Latency Numbers

Hey folks,

Let's talk about a topic that's often mentioned but rarely explored deeply: the use of cache versus direct database (DB) calls. We often throw around the idea that main memory is faster than accessing the DB , but how many of us have actually delved into the hard numbers? ??

Recently, I came across a compiled research of Jeff Dean regarding different type latency in computer systems.

Latency Comparison Numbers (~2012)

Here's a comparative overview of latency figures for different operations commonly encountered in computer systems:

Contributed by

If you see, for 1 MB data read -

Main Memory takes 250,000 nano sec ≈ 0.00025 seconds

Disk takes ≈ 20,000,000 nano sec ≈ 0.02 second

Substituting these values into the formula:

%?Difference = [ ( 20M - 0.25M ) / 0.25M ) ] × 100%

% Difference = 79% ??

So, the disk read is approximately ~80% slower than accessing main memory. ??

Key Insights:

  • Accessing data from caches (L1, L2) is significantly faster than accessing main memory.
  • Network communication and disk operations incur higher latencies compared to memory and cache accesses.
  • Solid State Drives (SSDs) offer faster random access compared to traditional Hard Disk Drives (HDDs).
  • Latencies increase substantially for operations involving network communication and disk I/O, especially over long distances.

Conclusion:

Understanding latency figures is crucial for designing and optimizing computer systems, applications, and networks. By being aware of the relative latencies involved in different operations, developers, and system architects can make informed decisions to enhance performance and efficiency.

Resources:??

https://gist.github.com/hellerbarde/2843375

https://www.youtube.com/watch?v=9eyFDBPk4Yw


??Note: I have made some adjustments to improve content quality and fix minor grammatical issues. ????

要查看或添加评论,请登录

Ashwani K.的更多文章

社区洞察