向大家介绍一款专门作数据库硬盘压力测试的工具,SQLio.exe。
安装指南
获取路径:
http://www.microsoft.com/en-us/download/details.aspx?id=20163
安装步骤
双击SQLIO.msi打开安装程序
1、开始安装,点Next
2、同意协议
3、修改安装路径
4、一路next,开始安装
5、完成安装
使用说明
主要使用两个文件:Param.txt和SQLIO.exe
1、Param.txt
语法格式:
参数说明:
l :测试用的文件和他的完整路径
l :测试同时使用多少个线程进行。建议和CPU数据一致。
l :始终使用0x0
l :测试文件的大小,最好是SAN(或RAID Controller)的读写缓存大小的2~4倍。
如果某行要注释掉,就在行的最前面加上一个“#”号
范例:
C:\testfile.dat 2 0x0 100
范例说明:
在C盘根目录下,用两个线程,一个100M的文件来做压力测试。
2、SQLIO.exe
语法格式:
Sqlio.exe [options] […]
Options包括以下参数:
l -k kind of IO (R=reads, W=writes)
l -t number of threads
l -s number of seconds to run
l -d… use same filename on each drive letter given
l -R,… raw drive letters/number for I/O
l -f stripe size in blocks, random, or sequential
l -p[I] cpu number for affinity (0 based)(I=ideal)
l -a[R[I]] cpu mask for (R=roundrobin (I=ideal)) affinity
l -o depth to use for completion routines
l -b IO block size in KB
l -i number of IOs per IO run
l -m do multi blk IO (C=copy, S=scatter/gather)
l -L latencies from (S=system, P=processor) timer
l -B set buffering (N=none, Y=all, H=hdwr, S=sfwr)
l -S start I/Os #blocks into file
l -v1.1.1 I/Os runs use same blocks, as in version 1.1.1
l -F read parameters from
其中部分参数有各自的默认值:
l -k:R
l -t:1
l -s:30
l -f:64
l -:b2
l -i:64
l -B:N
l Filename:testfile.dat
参数最大值限制:
l -t (threads): 256
l no. of files, includes -d & -R: 256
l filename length: 256
使用步骤:
1、 创建批处理文件(例如testio.bat)
2、 文件编写完成后,在命令行下运行:
testio.bat > out.txt
3、 结果输出在相同目录下的out.txt文件中。每一行命令都会有它的输出
红色区域为重要部分