cpu內存訪問速度,磁盤和網絡速度,全部人都應該知道的數字

google 工程師Jeff Dean 首先在他關於分佈式系統的ppt文檔列出來的,處處被引用的不少。
1納秒等於10億分之一秒,= 10 ^ -9 秒 
-----------------------------------------------------------
Numbers Everyone Should Know
L1 cache reference 讀取CPU的一級緩存 0.5 ns
Branch mispredict(轉移、分支預測) 5 ns
L2 cache reference 讀取CPU的二級緩存 7 ns
Mutex lock/unlock 互斥鎖\解鎖 100 ns
Main memory reference 讀取內存數據 100 ns
Compress 1K bytes with Zippy 1k字節壓縮 10,000 ns
Send 2K bytes over 1 Gbps network 在1Gbps的網絡上發送2k字節 20,000 ns
Read 1 MB sequentially from memory 從內存順序讀取1MB 250,000 ns
Round trip within same datacenter 從一個數據中心往返一次,ping一下 500,000 ns
Disk seek  磁盤搜索 10,000,000 ns 
Read 1 MB sequentially from network 從網絡上順序讀取1兆的數據 10,000,000 ns
Read 1 MB sequentially from disk 從磁盤裏面讀出1MB 30,000,000 ns 
Send packet CA->Netherlands->CA 一個包的一次遠程訪問 150,000,000 ns
                   
相關文章
相關標籤/搜索