打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
使用 dd 命令测试磁盘的读写性能
假设90M的数据,分别按4k, 8k的BlockSize大小进行读写测试:

[root@mail root]# time dd if=/tmp/testfile of=/dev/null bs=4k(4k读)
22969+1 records in
22969+1 records out

real    0m0.062s
user    0m0.011s
sys     0m0.051s


[root@mail root]# time dd if=/tmp/testfile of=/dev/null bs=8k(8k读)

11484+1 records in
11484+1 records out

real    0m0.051s
user    0m0.004s
sys     0m0.047s


[root@mail root]# time dd if=/dev/zero of=/tmp/testfile bs=4k count=65536(4k写)
65536+0 records in
65536+0 records out

real    0m2.410s
user    0m0.038s
sys     0m1.171s



[root@mail root]# time dd if=/dev/zero of=/tmp/testfile bs=8k count=32768(8k写)
65536+0 records in
65536+0 records out

real    0m10.329s
user    0m0.043s
sys     0m2.218s


real 执行指令所花费的时间,单位是秒。请注意这个数字并不代表实际的 CPU 时间。
sys  指令执行时在核心模式(kernel mode)所花费的时间,单位是秒。
user 指令执行时在使用者模式(user mode)所花费的时间,单位是秒。

可以man zero或者man null看具体介绍。
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
各厂商云主机io性能数据
怎样生成固定文件大小?
Testing Cluster Redo Log Write Performance with dd
dd linux 命令说明
Linux系统中使用 DD 命令测试 USB 和 SSD 硬盘的读写速度
Linux I/O 调度方法
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服