Latency Numbers Every Programmer Should Know

Latency Comparison Numbers
--------------------------
L1 cache reference                            0.5 ns
Branch mispredict                             5   ns
L2 cache reference                            7   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
Send 1K bytes over 1 Gbps network        10,000   ns    0.01 ms
Read 4K randomly from SSD*              150,000   ns    0.15 ms
Read 1 MB sequentially from memory      250,000   ns    0.25 ms
Round trip within same datacenter       500,000   ns    0.5  ms
Read 1 MB sequentially from SSD*      1,000,000   ns    1    ms  4X memory
Disk seek                            10,000,000   ns   10    ms  20x datacenter roundtrip
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    ms

Notes
-----
1 ns = 10-9 seconds
1 ms = 10-3 seconds
* Assuming ~1GB/sec SSD
时间: 2024-08-01 00:00:47

Latency Numbers Every Programmer Should Know的相关文章

每个程序员都应该知道延迟数—Latency Numbers Every Programmer Should Know

每个程序员都应该知道延迟数 Latency Numbers Every Programmer Should Know https://people.eecs.berkeley.edu/~rcs/research/interactive_latency.html 原文地址:https://www.cnblogs.com/Tpf386/p/11758895.html

Articles Every Programmer Must Read

http://javarevisited.blogspot.sg/2014/05/10-articles-every-programmer-must-read.html Being a Java programmer and Software developer, I have learned a lot from articles titled as What Every Programmer Should Know about ..... , they tend to give a lot

thread_Disruptor

转自 知乎 https://zhuanlan.zhihu.com/p/21355046 order从client端传入,decode后进行matching,一旦存在可成交的价格,就要publish到time series,并且把trade存到local的database里.如何handle这么大数量的数据? 这并不是一个新生的问题.一个经常想到的模型是producer consumer model. 当系统的处理速度比不上导入数据的速度时,可以增加一个queue(buffer)暂存数据,等待co

[Big Data - ZooKeeper] ZooKeeper: A Distributed Coordination Service for Distributed Applications

ZooKeeper ZooKeeper: A Distributed Coordination Service for Distributed Applications Design Goals Data model and the hierarchical namespace Nodes and ephemeral nodes Conditional updates and watches Guarantees Simple API Implementation Uses Performanc

<译>Zookeeper官方文档

apache原文地址:http://zookeeper.apache.org/doc/trunk/zookeeperOver.html ZooKeeper ZooKeeper: A Distributed Coordination Service for Distributed Applications Design Goals Data model and the hierarchical namespace Nodes and ephemeral nodes Conditional upda

OpenVPN多处理之-为什么不

OpenVPN没有多处理.人所皆知.我觉得我有点啰嗦了.天天说这个事.为什么没有多处理呢?我们来看下OpenVPN的作者,大牛级别的,早已超越代码的重量级人物,James Yonan(简称JY)是怎么解释的. 一切都在maillist中.有人问过,为何OpenVPN不实现多线程.而且人家给出了实际的測试数据.JY是这么回答的:OpenVPN 2.0 has no multithreading support, this is the only feature present in 1.x whi

fio2.1.10--HOWTO

Table of contents ----------------- 1. Overview 2. How fio works 3. Running fio 4. Job file format 5. Detailed list of parameters 6. Normal output 7. Terse output 8. Trace file format 9. CPU idleness profiling 1.0 Overview and history ---------------

dm8148 jpeg编解码测试

测试流程: 1)在A8将jpeg传递到videoM3解码,然后videoM3编码,在编成jpeg图片传递到A8,主要是测试jpeg编码一帧图片需要多少时间: 1000w像素:  编码时间:43ms: 800w像素:   编码时间:35ms 1080P:       编码时间:10ms 1600w像素:  编码时间:73ms 当测试到1600w像素时,解码link报错,内存不够: 在utils_mem.c的utils_memFrameAlloc函数中报错,内存分配错误: 4096*4096分辨率下

【转】FIO使用指南

原文地址:http://blog.csdn.net/yuesichiu/article/details/8722417 这个文档是对fio-2.0.9 HOWTO文档的翻译,fio的参数太多了,翻译这个文档时并没有测试每一个参数的功能和使用方法,只有少量参数做了试验,大部分的参数采用的是根据字面翻译或是个人理解的翻译,必然有些出入,先发出来,以后有使用的时候再被充和修改.在另一个文档中会对fio自带的实例进行分析,可能会更为清晰一些. fio这个工具实在太强大了,列举一下他的NB之处吧 1)支持