Linux IO性能测试
开发环境系统配置如下: Intel SR1625 server <http://hi.baidu.com/fatux/blog/item/:;>, 2 CPU, 32GB内存, 用主板自带卡做了raid1 0,8个7200转SATA硬盘 操作系统是RHEL 5.3 64位 物理内存是32GB,因此整个过程都选用了60GB 的数据量来测试,以避免cache的影响 1. 用自带的dd命令先测一下, 块大小为8k dd只能提供一个大概的测试结果,是连续IO而不是随机IO 读测试 # time dd if=/dev/sda2 f=/dev/null bs=8k count=8388608 8388608 0 records in 8388608 0 records out 68719476736 bytes (69 GB) copied, 516.547 seconds, 133 MB/s real 8m36.926s user 0m0.117s sys 0m55.216s 写测试 # time dd if=/dev/zero f=/opt/iotest bs=8k count=8388608 8388608 0 records in 8388608 0 records out 68719476736 bytes (69 GB) copied, 888.398 seconds, 77.4 MB/s real 14m48.743s user 0m3.678s sys 2m47.158s 读写测试 # time dd if=/dev/sda2 f=/opt/iotest bs=8k count=8388608 8388608 0 records in 8388608 0 records out 68719476736 bytes (69 GB) copied, 1869.89 seconds, 36.8 MB/s real 31m10.343s user 0m2.613s sys 3m25.548s 2. 接下来用Oracle <http://hi.baidu.com/fatux/blog/item/:;>的orion <http://www.oracle.com/technology/software/tech/orion/index.html>工具来测一下 解压即可使用 # gzip orion_linux_x86-64.gz 测异步IO时需要libaio库 # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64 # echo $LD_LIBRARY_PATH :/opt/oracle/product/10.2.0/lib:/usr/lib64 创建配置文件mytest.lun,列出要测试的分区即可. 注意文件名前缀要跟下面的 testname一致 # vi mytest.lun 查看mytest.jun内容 # cat mytest.lun /dev/sda2 先来个simple test # ./orion_linux_x86-64 -run simple -testname mytest -num_disks 8 查看测试结果 # cat mytest_20081111_1431_summary.txt ORION VERSION 11.1.0.7.0 Commandline: -run simple -testname mytest -num_disks 8 This maps to this test: Test: mytest Small IO size: 8 KB Large IO size: 1024 KB IO Types: Small Random IOs, Large Random IOs Simulated Array Type: CONCAT Write: 0% Cache Size: Not Entered Duration for each Data Point: 60 seconds Small Columns:, 0 Large Columns:, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 Total Data Points: 38 Name: /dev/sda2 Size: 629143441920 1 FILEs found. Maximum Large MBPS=56.97 @ Small=0 and Large=7 Maximum Small IOPS=442 @ Small=40 and Large=0 Minimum Small Latency=14.62 @ Small=1 and Large=0 最大MBPS为56.97,最大IOPS为442
再测一下8k随机读操作 # ./orion_linux_x86-64 -run advanced -testname mytest -num_disks 8 -size_small 8 -size_large 8 -type rand & 看看结果 # cat mytest_20081111_1519_summary.txt ORION VERSION 11.1.0.7.0 Commandline: -run advanced -testname mytest -num_disks 8 -size_small 8 -size_large 8 -type rand This maps to this test: Test: mytest Small IO size: 8 KB Large IO siz |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |