Linux磁盘IO测试命令

测试同时读写能力
time dd bs=64k count=10000 if=/dev/zero of=test oflag=direct
生成655 MB

 

测试磁盘的写入性能:
time dd if=/dev/zero of=testfile bs=1G count=1 oflag=direct

测试磁盘的读取性能:
time dd if=testfile of=/dev/null bs=1G count=1 iflag=direct

 

发现bs越小,磁盘IO性能指数,固态和sas硬盘写入结果越看不出来差距,比如bs=4k

bs的大小还是根据实际情况来测试。一般64k就能看出差距。

 

 

参考

Linux磁盘IO查看 - paul_hch - 博客园
https://www.cnblogs.com/paul8339/p/14647118.html#autoid-2-1-1

posted @ 2025-02-08 09:39  paul_hch  阅读(40)  评论(0)    收藏  举报