1.文档目的 基于V10(SP1)系列,搭配Kylin服务器操作系统,介绍通用性能测试工具的安装,编译使用以及测试方法。 file:///C:/Users/Administrator/AppData/Local/Temp/ksohtml9692/wps57.jpg 1. 1 UnixBench5.1.3测试1.1.1解压编译解压包 tar -xvf UnixBench5.1.3-1.tar.bz2 编译 cd UnixBench5.1.3-1 make file:///C:/Users/Administrator/AppData/Local/Temp/ksohtml9692/wps58.jpg 1.1.2 执行测试运行测试 ./Run -c 4 file:///C:/Users/Administrator/AppData/Local/Temp/ksohtml9692/wps59.jpg 1.1.3 测试结果查看测试结果 file:///C:/Users/Administrator/AppData/Local/Temp/ksohtml9692/wps60.jpg file:///C:/Users/Administrator/AppData/Local/Temp/ksohtml9692/wps61.jpg 结果保存目录 cd results/ 结果文件 xxx.html 1.2 Lmbench-3.0-a9测试1.2.1解压编译解压包 tar -xvf lmbench-3.0-a9-1.tar.bz2 1.2.2 执行测试测试 make results file:///C:/Users/Administrator/AppData/Local/Temp/ksohtml9692/wps62.jpg 一路默认,等待程序跑完 1.2.3 测试结果查看生成结果 make see 查看结果 cd /results cat summary.out file:///C:/Users/Administrator/AppData/Local/Temp/ksohtml9692/wps63.jpg 1.3 fio-3.20测试1.3.1解压编译解压包 tar -xvf fio-3.20.tar.bz2 编译 make make install 创建目录 mkdir /fiotest 1.3.2 执行测试运行测试 测试前清下缓存 echo 3 > /proc/sys/vm/drop_caches 随机读: fio -directory=/fiotest -direct=1 -iodepth 32 -thread -rw=randread -ioengine=psync -bs=4k -size=5G -numjobs=4 -runtime=3600 -group_reporting -name=mytest -output=/var/log/fio.log 随机写: fio -directory=/fiotest -direct=1 -iodepth 32 -thread -rw=randwrite -ioengine=psync -bs=4k -size=5G -numjobs=4 -runtime=3600 -group_reporting -name=mytest -output=/var/log/fio.log file:///C:/Users/Administrator/AppData/Local/Temp/ksohtml9692/wps64.jpg 1.3.3 测试结果查看查看结果 cd /var/log/fio.log cat fio.log file:///C:/Users/Administrator/AppData/Local/Temp/ksohtml9692/wps65.jpg 1.4 iozone3_430测试1.4.1解压编译解压 tar -xvf iozone3_430.tar 编译 make linux file:///C:/Users/Administrator/AppData/Local/Temp/ksohtml9692/wps66.jpg 1.4.2 执行测试运行测试 2倍内存测试 ./iozone -s 16G -r 16M -i 0 -i 1 -i 2 -Rb /root/read_write16g.xls 1倍内存测试 ./iozone -s 8G -r 16M -i 0 -i 1 -i 2 -Rb /root/read_write8g.xls 0.5倍内存测试 ./iozone -s 4G -r 16M -i 0 -i 1 -i 2 -Rb /root/read_write4g.xls file:///C:/Users/Administrator/AppData/Local/Temp/ksohtml9692/wps67.jpg 1.4.3 测试结果查看查看结果 将/root下的read_write16g.xls、read_write8g.xls、read_write4g.xls导出到windows打开 file:///C:/Users/Administrator/AppData/Local/Temp/ksohtml9692/wps68.jpg 1.5 ltp-full-20200515测试1.5.1解压编译解压 tar -xvf ltp-full-20200515.tar.bz2 编译 cd ltp-full-20200515 ./configure make make install 1.5.2 执行测试拷贝测试脚本 cp ltpstress20200515.sh /opt/ltp/testscripts cp stress.part1 /opt/ltp/runtest cp stress.part2 /opt/ltp/runtest cp stress.part3 /opt/ltp/runtest 运行 cd /opt/ltp/testscripts chmod a+rx ltpstress20200515.sh ./ltpstress20200515.sh -n -t 168 -p -l /opt/ltp/ltpstress.result //-t后的参数为运行时间,单位为消失,按照实际设置,一般桌面版本执行24h,服务器版本执行168h,定制版本根据需求设置;-n表示不跑网络压力测试;-p表示生成易读的日志文件;-I表示记录测试日志的文件。 file:///C:/Users/Administrator/AppData/Local/Temp/ksohtml9692/wps69.jpg 1.5.3 测试结果查看测试结果查看 保证ltp工具在运行时不死机,能ping通即可 测试结果目录 /opt/ltp/ltpstress.result file:///C:/Users/Administrator/AppData/Local/Temp/ksohtml9692/wps70.jpg 1.6 netperf-netperf-2.7.0 测试1.6.1解压编译解压 tar -xvf netperf-netperf-2.7.0.tar.gz 编译 make make install 1.6.2 执行测试测试 172.29.0.44作为客户端 172.29.0.162作为服务端 测试前两台机器的防火墙都要关掉 iptables -F 172.29.0.162执行netserver TCP数据流 netperf -H $netserverIP -t TCP_STREAM -l 60 测试结果截图 file:///C:/Users/Administrator/AppData/Local/Temp/ksohtml9692/wps71.jpg UDP数据流 netperf -H 172.29.0.162 -t UDP_STREAM -l 60 1.6.3 测试结果查看测试结果 file:///C:/Users/Administrator/AppData/Local/Temp/ksohtml9692/wps72.jpg TCP_STREAM和UDP_STREAM一般在900以上算合格(千兆网) 1.7 stream-5.9-1测试1.7.1解压编译解压 tar -xvf stream-5.9-1.tar.bz2 编译 make make install 1.7.2 执行测试测试 ./stream 1.7.3 测试结果查看测试结果截图 file:///C:/Users/Administrator/AppData/Local/Temp/ksohtml9692/wps73.jpg 测试十次,取平均值 1.8 speccpu2006-v1.0.1测试1.8.1解压安装解压包 tar -xvf cpu2006_v101_1.4.1.tar.gz 安装 cd speccpu2006 ./install.sh file:///C:/Users/Administrator/AppData/Local/Temp/ksohtml9692/wps74.jpg 1.8.2 执行测试配置环境变量 source ./shrc 运行 runspec -c ft-rate-820.cfg -n 3 -T base -r 核数 -i ref all file:///C:/Users/Administrator/AppData/Local/Temp/ksohtml9692/wps75.jpg 1.8.3 测试结果查看查看结果 cd results 导出xxx.html文件到windows查看 file:///C:/Users/Administrator/AppData/Local/Temp/ksohtml9692/wps76.jpg 1.8.4 测试问题排查1.在执行过程中可能会出现error while loading shared libraries: libnsl.so.1: cannot open shared object file: No such file or d ---解决办法:执行yum install libnsl安装即可 2.FT-2000+/64 平台,429 题目多核(64 核)测试不过,内存资源不足 ---解决办法:增加内存容量,建议配置 8 根 16G,8 根 32G 或者 4 根 32G 等 3.路径不对,测试报错 ---解决办法:中文路径差异,解压到英文路径测试 |