public:it:misc

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
public:it:misc [2020/12/29 09:46] – [Latency Numbers Every Programmer Should Know] oakfirepublic:it:misc [2021/09/09 14:23] (当前版本) oakfire
行 1: 行 1:
 ====== 杂项 ====== ====== 杂项 ======
-===== 离线文档工具 ===== 
-  * [[https://kapeli.com/dash|DASH]]: 适用 mac 与 ios, 强大的API离线文档软件。<wrap hi>很好用。</wrap> 
-  * [[https://velocity.silverlakesoftware.co|VELOCITY]]: DASH 的 windows 版。收费。 
  
-===== Generate RSA key ===== 
-<code bash> 
-# 生成 RSA 私钥(传统格式的) 
-openssl genrsa -out rsa_private_key.pem 1024 
- 
-# 生成 RSA 公钥 
-openssl rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem  
- 
-# 将传统格式的私钥转换成 PKCS#8 格式的 
-openssl pkcs8 -topk8 -inform PEM -in rsa_private_key.pem -outform PEM -nocrypt 
-</code> 
 ===== Latency Numbers Every Programmer Should Know ===== ===== Latency Numbers Every Programmer Should Know =====
-FIXME 2012年的数据,需要更新 +  * [[https://colin-scott.github.io/personal_website/research/interactive_latency.html|最新数据与历史数据 ]]<code
-<file text latency.txt+Latency Comparison Numbers (~2020) 
-Latency Comparison Numbers +---------------------------------- 
--------------------------- +L1 cache reference                           0.5 ns 
-L1 cache reference                         0.5 ns +Branch mispredict                            3   ns 
-Branch mispredict                            ns +L2 cache reference                           4   ns 
-L2 cache reference                           ns 14x L1 cache +Mutex lock/unlock                           17   ns 
-Mutex lock/unlock                           25 ns +Main memory reference                      100   ns  
-Main memory reference                      100 ns 20x L2 cache, 200x L1 cache +Compress 1K bytes with Zippy             2,000   ns        2 us 
-Compress 1K bytes with Zippy             3,000 ns +Send 2,000 bytes over commodity network     44   ns        us 
-Send 1K bytes over 1 Gbps network       10,000 ns 0.01 ms +SSD random read                         16,000   ns       16 us 
-Read 4K randomly from SSD*             150,000 ns 0.15 ms +Read 1 MB sequentially from memory       3,000   ns        3 us 
-Read 1 MB sequentially from memory     250,000 ns 0.25 ms +Round trip within same datacenter      500,000   ns      500 us 
-Round trip within same datacenter      500,000 ns  0.5 ms +Read 1 MB sequentially from SSD*        49,000   ns       49 us  
-Read 1 MB sequentially from SSD*     1,000,000 ns    1 ms 4X memory +Disk seek                            2,000,000   ns    2,000 us    2 ms  
-Disk seek                           10,000,000 ns   10 ms 20x datacenter roundtrip +Read 1 MB sequentially from disk       825,000   ns      825 us    1 ms 
-Read 1 MB sequentially from disk    20,000,000 ns   20 ms 80x memory, 20X SSD +Send packet CA->Netherlands->CA    150,000,000   ns  150,000 us  150 ms
-Send packet CA->Netherlands->CA    150,000,000 ns  150 ms+
    
 Notes Notes
 ----- -----
-1 ns = 10-9 seconds +1 ns = 10^-9 seconds 
-second 1000,000,000 ns +us 10^-6 seconds = 1,000 ns 
-1 ms = 10-3 seconds +1 ms = 10^-3 seconds 1,000 us 1,000,000 ns 
-second 1000 ms +</code> 
-Assuming ~1GB/sec SSD + 
- +  [[https://gist.github.com/jboner/2841832|2012年的数据]]:<file text latency.txt> 
 +Latency Comparison Numbers (~2012) 
 +---------------------------------- 
 +L1 cache reference                           0.5 ns 
 +Branch mispredict                            5   ns 
 +L2 cache reference                             ns                      14x L1 cache 
 +Mutex lock/unlock                           25   ns 
 +Main memory reference                      100   ns                      20x L2 cache, 200x L1 cache 
 +Compress 1K bytes with Zippy             3,000   ns        3 us 
 +Send 1K bytes over 1 Gbps network       10,000   ns       10 us 
 +Read 4K randomly from SSD*             150,000   ns      150 us          ~1GB/sec SSD 
 +Read 1 MB sequentially from memory     250,000   ns      250 us 
 +Round trip within same datacenter      500,000   ns      500 us 
 +Read 1 MB sequentially from SSD*     1,000,000   ns    1,000 us    1 ms  ~1GB/sec SSD, 4X memory 
 +Disk seek                           10,000,000   ns   10,000 us   10 ms  20x datacenter roundtrip 
 +Read 1 MB sequentially from disk    20,000,000   ns   20,000 us   20 ms  80x memory, 20X SSD 
 +Send packet CA->Netherlands->CA    150,000,000   ns  150,000 us  150 ms 
 + 
 +Notes 
 +----- 
 +1 ns = 10^-9 seconds 
 +1 us = 10^-6 seconds = 1,000 ns 
 +1 ms = 10^-3 seconds = 1,000 us = 1,000,000 ns 
 Credit Credit
 ------ ------
-By Jeff Dean: http://research.google.com/people/jeff/+By Jeff Dean:               http://research.google.com/people/jeff/
 Originally by Peter Norvig: http://norvig.com/21-days.html#answers Originally by Peter Norvig: http://norvig.com/21-days.html#answers
- +
 Contributions Contributions
 ------------- -------------
-Some updates from: https://gist.github.com/2843375 +'Humanized' comparison:  https://gist.github.com/hellerbarde/2843375
-Great 'humanized' comparison version: https://gist.github.com/2843375+
 Visual comparison chart: http://i.imgur.com/k0t1e.png Visual comparison chart: http://i.imgur.com/k0t1e.png
-Nice animated presentation of the data: http://prezi.com/pdkvgys-r0y6/latency-numbers-for-programmers-web-development/ 
 </file> </file>
  
  • public/it/misc.1609206367.txt.gz
  • 最后更改: 2020/12/29 09:46
  • oakfire