@zhangever
2017-12-14T09:42:42.000000Z
字数 566
阅读 907
性能
软硬件延迟参数
item | cost | remarks |
---|---|---|
L1 cache reference | 0.5ns | |
Branch mispredict | 5ns | |
L2 cache reference | 7ns | |
Mutex lock/unlock | 25ns | |
Main memory reference | 100ns | |
Syscall on Intel 5150 | 105ns | |
Compress 1K byte with Zippy | 3,000ns | 3us |
Context switch on Intel 5150 | 4,300ns | 4us |
Send 2K bytes over 1 Gbps network | 20,000ns | 20us |
SSD random read | 150,000ns | 150us |
Read 1 MB sequentially from memory | 250,000ns | 250us |
Round trip within same datacenter | 500,000ns | 0.5ms |
Read 1 MB sequentially from SSD | 100,0000ns | 1ms |
Disk seek | 10,000,000ns | 10ms |
Read 1 MB sequentially from disk | 20,000,000ns | 20ms |
Send packet CA->Netherlands->CA | 150,000,000ns | 150ms |
1s=1000ms=1000000us(微秒)=1000000000ns(纳秒)