Centos下测试硬盘读写速度

这是在服务器上,读写超快。

写速度

$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

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值