計算機工程師分級
In 2010, Jeff Dean from Google gave a wonderful talk at Stanford that made him quite famous. In it, he discussed a few numbers that are relevant to computing systems. Then Peter Norvig published those numbers for the first time on the internet.
2010年,來自Google的Jeff Dean在斯坦福大學進行了精彩的演講,這使他頗有名氣。 在其中,他討論了一些與計算系統有關的數字。 然后,彼得·諾維格(Peter Norvig)首次在互聯網上發布了這些數字。
Time passed, and the numbers changed. Here is a very good interactive web UI of those numbers which roughly tells how much they have changed over the years as a function of time.
時間過去了,數字改變了。 這是一個很好的交互式Web UI ,其中包含這些數字,可以粗略地說明這些年來這些數字隨時間變化了多少。
This article is not only a compilation of Jeff Dean's estimated data, but rather it brings together all such numbers from different sources. This should help you as a system designer and architect. While designing, you can use these numbers to estimate the amount of resources your system needs.
本文不僅是杰夫·迪恩(Jeff Dean)估計數據的匯編,而且還匯集了來自不同來源的所有此類數據。 這應該可以幫助您作為系統設計師和架構師。 在設計時,您可以使用這些數字來估計系統所需的資源量。
粗略估算2019年的延遲數據: (Rough estimation of latency data for 2019:)
- L1 cache reference: 1 nanosecond. L1緩存參考:1納秒。
- L2 cache reference: 4 nanoseconds. L2緩存參考:4納秒。
- Mutex Lock / Unlock: 17 nanoseconds. 互斥鎖/解鎖:17納秒。
- Main memory / RAM reference: 100 nanoseconds. 主內存/ RAM參考:100納秒。
Compress 1 KB with Zippy (currently called Snappy): 2000 nanoseconds or 2 microseconds.
使用Zippy(當前稱為Snappy )壓縮1 KB:2000納秒或2微秒。
CPU branch mispredict: 3 nanoseconds.
CPU分支預測錯誤 :3納秒。
- Solid State Drive (SSD) random read: 16 microseconds. 固態硬盤(SSD)隨機讀取:16微秒。
- Disk (Hard drive / magnetic drive) seek: 3 milliseconds. 磁盤(硬盤驅動器/磁性驅動器)搜尋:3毫秒。
- Read 1,000,000 bytes sequentially from main memory: 4 microseconds. 從主內存順序讀取1,000,000字節:4微秒。
- Read 1,000,000 bytes sequentially from SSD: 62 microseconds. 從SSD順序讀取1,000,000字節:62微秒。
- Read 1,000,000 bytes sequentially from disk: 947 microseconds. 從磁盤順序讀取1,000,000字節:947微秒。
- Round trip network request in same data centre : 500 microseconds. 同一數據中心的往返網絡請求:500微秒。
- Send 2000 bytes over commodity network: 62 nanoseconds. 通過商品網絡發送2000字節:62納秒。
有效負載通過TCP傳輸所花費的時間: (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 and receiver to sender over the network. In short, it’s called Ping time.
RTT —往返時間—數據包(數據字節束)在網絡上從發送方到接收方以及從接收方到發送方傳播所花費的總時間。 簡而言之,稱為Ping時間。
- Transfer of 1 byte to 13,000 bytes (roughly 13 KB) data takes 1 round trip or 1 RTT. Rough time taken — USA: 150 milliseconds, India: 1200 milliseconds, Brazil: 600 milliseconds. 1字節到13,000字節(約13 KB)的數據傳輸需要1次往返或1次RTT。 花費的時間:美國:150毫秒,印度:1200毫秒,巴西:600毫秒。
- 13,001 bytes — 39,000 bytes (13 KB to 39 KB) takes 2 RTT. Rough time taken — USA: 300 milliseconds, India: 2400 milliseconds, Brazil: 1200 milliseconds. 13,001字節-39,000字節(13 KB至39 KB)需要2個RTT。 花費的時間:美國:300毫秒,印度:2400毫秒,巴西:1200毫秒。
- 39,001 bytes — 91,000 bytes (39 KB to 91KB) takes 3 RTT. Rough time taken-USA: 450 milliseconds, India: 3600 milliseconds, Brazil: 1800 milliseconds. 39,001字節— 91,000字節(39 KB至91KB)需要3個RTT。 花費的粗糙時間-美國:450毫秒,印度:3600毫秒,巴西:1800毫秒。
- 91,001 bytes — 195,000 bytes (91 KB to 195 KB) takes 4 RTT. Rough time taken — USA: 600 milliseconds, India: 4800 milliseconds, Brazil: 2400 milliseconds. 91,001字節-195,000字節(91 KB至195 KB)需要4個RTT。 花費的時間:美國:600毫秒,印度:4800毫秒,巴西:2400毫秒。
So the greater the response size means more bytes, a longer round trip, more API latency, and ultimately a less user friendly app.
因此,響應大小越大,意味著字節越多,往返時間越長,API延遲越長,最終導致用戶友好的應用程序越少。
This post will be updated when new or updated numbers are found. Please let me know if you are aware of new numbers.
找到新的或更新的號碼后,該帖子將更新。 如果您知道新號碼,請告訴我。
This article is originally published on Author's medium wall. If you like it, please give claps.
本文最初發表在作者的媒體墻上 。 如果喜歡,請鼓掌。
Reference:
參考:
https://colin-scott.github.io/blog/2012/12/24/latency-trends/
https://colin-scott.github.io/blog/2012/12/24/latency-trends/
https://blog.std.in/2015/05/23/http-response-sizes-and-tcp/
https://blog.std.in/2015/05/23/http-response-sizes-and-tcp/
https://medium.com/@kousiknath/must-know-numbers-for-every-computer-engineer-6338a12c292c
https://medium.com/@kousiknath/must-know-numbers-for-every-computer-engineer-6338a12c292c
翻譯自: https://www.freecodecamp.org/news/must-know-numbers-for-every-computer-engineer/
計算機工程師分級