Centos下測試硬碟讀寫速度

來源:互聯網
上載者:User

這是在伺服器上,讀寫超快。

寫速度

$dd if=/dev/zero bs=1k count=1000000 of=1Gb.file

1000000+0 records in
1000000+0 records out
1024000000 bytes (1.0 GB) copied, 5.13676 seconds, 199 MB/s

 

讀速度

$dd if=1Gb.file bs=64k |dd of=/dev/null

[haibo@localhost ~]$ dd if=1Gb.file bs=64k |dd of=/dev/null
15625+0 records in
15625+0 records out
1024000000 bytes (1.0 GB) copied, 6.37813 seconds, 161 MB/s
2000000+0 records in
2000000+0 records out
1024000000 bytes (1.0 GB) copied, 6.37891 seconds, 161 MB/s

 

讀寫速度

$dd if=1Gb.file of=2Gb.file bs=64k

15625+0 records in
15625+0 records out
1024000000 bytes (1.0 GB) copied, 2.21364 seconds, 463 MB/

 

 

這是在本地的虛擬機器上

[root@localhost ~]# dd if=/dev/zero bs=1k count=1000000 of=1Gb.file
1000000+0 records in
1000000+0 records out
1024000000 bytes (1.0 GB) copied, 39.6289 seconds, 25.8 MB/s
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# dd if=1Gb.file bs=64k |dd of=/dev/null
2000000+0 records in
2000000+0 records out
1024000000 bytes (1.0 GB) copied, 39.8982 seconds, 25.7 MB/s
15625+0 records in
15625+0 records out
1024000000 bytes (1.0 GB) copied, 39.9039 seconds, 25.7 MB/s
[root@localhost ~]# dd if=1Gb.file of=2Gb.file bs=64k
15625+0 records in
15625+0 records out
1024000000 bytes (1.0 GB) copied, 46.391 seconds, 22.1 MB/s

 

 linux4版本用time來計時

[xxx]$ time dd if=/dev/zero bs=1k count=1000000 of=1Gb.file

1000000+0 records in

1000000+0 records out

 

real    0m2.035s

user    0m0.114s

sys     0m1.921s

 

寫速度:1000M/2.035=491M

 

[xxx]$ time dd if=1Gb.file bs=64k |dd of=/dev/null          

15625+0 records in

15625+0 records out

2000000+0 records in

2000000+0 records out

 

real    0m2.420s

user    0m0.368s

sys     0m1.889s

讀速度:1000M/2.420=413M

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.