您的位置:首页 > 移动开发 > Objective-C

Lustre 性能测试方法

2011-09-15 16:35 218 查看
1. 单个裸设备性能测试:/usr/bin/sgpdd-survey

安装包:sg3_utils, 包含了sgpdd-survey需要的命令”sg_map”

注意: 对大分区,sg_readcap会报一行错误,然后给出结果,这个错误会导致spgdd-survey报错

# sg_readcap/dev/sdb

READ CAPACITY(10) indicates device capacity too large

  now trying 16 byte cdb variant

解决方法是把/usr/bin/sgpdd-survey中所有的 “sg_readcap–b”,换成”sg_readcap –l -b”

测试前提是:

/sys/block/sdN/queue/max_sectors_kb= 4096

/sys/block/sdN/queue/max_phys_segments= 256

/proc/scsi/sg/allow_dio= 1

/sys/module/ib_srp/parameters/srp_sg_tablesize= 255

 

如果要测试16个进程,每个进程写读一块区域,总共64GB大小的数据,每次读写块大小为1MB 应该设置测试命令为:

size=65536 rszlo=1024 rszhi=1024crglo=16 crghi=16 thrlo=16 thrhi=16 scsi-devs=/dev/sdX sh sgpdd-survey

结果示例:

Thu Sep 1511:49:57 CST 2011 sgpdd-survey on /dev/sdX from X.Y

total_size  8388608K rsz 1024 crg     1 thr    1 write  246.77 MB/s     1 x 246.81 =  246.81 MB/s read  281.40 MB/s     1 x 281.45 =  281.45 MB/s

total_size  8388608K rsz 1024 crg     1 thr    2 write  305.75 MB/s     1 x 305.81 =  305.81 MB/s read  373.08 MB/s     1 x 373.17 =  373.17 MB/s

….

出错信息示例:

total_size  8388608K rsz 1024 crg    64 thr  256 write 7 failed read 10 failed

total_size  8388608K rsz 1024 crg    64 thr  512 write 28 failed read 27 failed

total_size  8388608K rsz 1024 crg    64 thr 1024 write 47 failed read 45 failed

 

2. 单个OST本地性能测试:/usr/bin/obdfilter-survey

前提:将设备mount成lustre模式

如果要在一个OST测试16个进程,每个进程写读一个object,总共64GB大小的数据,每次读写块大小为1MB 应该设置测试命令为,默认块大小为1M,可以用:

size=65536  nobjlo=16rszlo=1024 rszhi=1024thrlo=16 nobjhi=16 thrhi=16 case=disk sh obdfilter-survey

结果示例:

Thu Sep 15 16:06:09 CST 2011Obdfilter-survey for case=disk from X.Y

ost 1 sz 67108864K rsz 1024K obj   16thr   16 write  329.33 [ 119.88, 343.66] rewrite  327.31 [ 286.71, 335.67] read  348.52 [ 177.82, 368.63]

done!

 

3. I/Ozone 测试脚本

前提:安装iozone

在客户端mount了lustre

如果要在多个客户端运行多线程测试,测试发起节点,需要

#!/bin/bash

j=1

for (( i=0;i<=2;i++)) do

       j=$(($j+$i*20))

       #iozone -t $j -i 0 -i 1 -i 5 -j 2M -s $((20000/$j))M -r 1M -Rbresult$j.xls | tee result$j.log

       echo $j

       j=0

done

       注: 测试1,20, 40 个(-t)进程读(-i 0),写(-i 1),跳读(-i 5)(每次跳读区域为-j 2MB,总共–s 20GB数据的性能,测试结果输出到Excel文件(-Rb),日志输出到log文件

 

4. dd 测试

#!/bin/bash

while true

do

       filename=”/mountpoint/$HOSTNAME-$$-$RANDOM"

       dd if=/dev/zero of="$filename" bs=1M count=10000

       sleep 1

       rm "$filename"

done

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息