性能测试的部分案例

测试硬盘的读写速度

#dd if=/dev/zero bs=1024 count=1000000 of=/root/1Gb.file

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

通过以上两个命令输出的命令执行时间,可以计算出硬盘的读、写速度。

确定硬盘的最佳块大小:

#dd if=/dev/zero bs=1024 count=1000000 of=/root/1Gb.file

#dd if=/dev/zero bs=2048 count=500000 of=/root/1Gb.file

#dd if=/dev/zero bs=4096 count=250000 of=/root/1Gb.file

#dd if=/dev/zero bs=8192 count=125000 of=/root/1Gb.file

通过比较以上命令输出中所显示的命令执行时间,即可确定系统最佳的块大小。

You May Also Like

About the Author: daidai5771

发表评论

电子邮件地址不会被公开。 必填项已用*标注