每个程序员都应该了解的延迟时间

L1 cache reference
L1 cache读取
0.5ns
Branch mispredict
分支误预测
5ns
L2 cache reference
L2 cache读取
7ns 14x L1 cache
Mutex lock/unlock
互斥锁
25ns
Main memory reference
主内存读取
100ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy
压缩1KB数据
3,000ns
Send 1K bytes over 1 Gbps network
在1Gbps网络上发送2K数据
10,000ns 0.01ms
Read 4K randomly from SSD*
从SSD硬盘随机读取4K数据*
150,000ns 0.15ms
Read 1 MB sequentially from memory
从内存连续读取1MB数据
250,000ns 0.25ms
Round trip within same datacenter
同一数据中心的往返时间(RTT)
500,000ns 0.5ms
Read 1 MB sequentially from SSD*
从SSD硬盘顺序读取1MB数据*
1,000,000ns 1ms 4x memory
Disk seek
磁盘寻道时间
10,000,000ns 10ms 20x datacenter roundtrip
Read 1 MB sequentially from Network
从网络上顺序读取1M数据
10,000,000ns 10ms
Read 1 MB sequentially from disk
从磁盘上顺序读取1M数据
20,000,000ns 20ms 80x memory, 20x SSD
Send packet CA->Netherlands->CA
发送一个包从从加州->荷兰->加州
150,000,000ns 150ms

 

* Assuming ~1GB/sec SSD

注:原文来自https://gist.github.com/jboner/2841832,略有修改

 


Data Warehouse For Ever原创文章,转载请注明出处

  1. From what I’ve heard, &#iyc0;capa28t2” refers to the percentage of time that the WAC spaces are actually in use. Much more goes on there than just their regular season. They often rent their space out to the UA, dance companies, etc. If they are at 80% capacity (just throwing out a number) that means that their facility is being used 80% of its available time. I think.By adding an additional facility, it will greatly increase their space availibiilty, and they can bring in more shows or rent it out for more private events.

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>