写入磁盘的成本

时间:2020-08-18 16:00:47

标签: performance architecture latency

我想基于以下链接确认对磁盘写入成本的理解:http://highscalability.com/blog/2011/1/26/google-pro-tip-use-back-of-the-envelope-calculations-to-choo.html

我可能会丢失它,但是在这里我看不到写入磁盘的成本:

L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns
Mutex lock/unlock 100 ns
Main memory reference 100 ns
Compress 1K bytes with Zippy 10,000 ns
Send 2K bytes over 1 Gbps network 20,000 ns
Read 1 MB sequentially from memory 250,000 ns
Round trip within same datacenter 500,000 ns
Disk seek 10,000,000 ns
Read 1 MB sequentially from network 10,000,000 ns
Read 1 MB sequentially from disk 30,000,000 ns
Send packet CA->Netherlands->CA 150,000,000 ns 

但是,随后的总结表明我们可以得出以下结论:

Writes are 40 times more expensive than reads.

我想念什么吗?

更重要的是,我可以得出结论:向磁盘写入1MB的成本是:

40 x 30,000,000 ns = 1.2 sec (not including the cost of the disk seek which is 10 msec)

0 个答案:

没有答案