硬盘压力测试工具

原文链接: http://www.cnblogs.com/iamasqldba/archive/2013/06/09/3128051.html

向大家介绍一款专门作数据库硬盘压力测试的工具,SQLio.exe。

安装指南

获取路径:

http://www.microsoft.com/en-us/download/details.aspx?id=20163

安装步骤

双击SQLIO.msi打开安装程序

1、开始安装,点Next

clip_image001

2、同意协议

clip_image002

3、修改安装路径

clip_image003

4、一路next,开始安装

clip_image004

5、完成安装

clip_image005

使用说明

主要使用两个文件:Param.txt和SQLIO.exe

1、Param.txt

语法格式:

<Path to test file> <Number of threads(per test file)> <Mask> <Size of test file in MB>

参数说明:

l <Path to test file>:测试用的文件和他的完整路径

l <Number of threads(per test file)>:测试同时使用多少个线程进行。建议和CPU数据一致。

l <Mask>:始终使用0x0

l <Size of test file in MB>:测试文件的大小,最好是SAN(或RAID Controller)的读写缓存大小的2~4倍。

如果某行要注释掉,就在行的最前面加上一个“#”号

范例:

C:\testfile.dat 2 0x0 100

范例说明:

在C盘根目录下,用两个线程,一个100M的文件来做压力测试。

2、SQLIO.exe

语法格式:

Sqlio.exe [options] [<filename>…]

Options包括以下参数:

l -k<R|W> kind of IO (R=reads, W=writes)

l -t<threads> number of threads

l -s<secs> number of seconds to run

l -d<drv_A><drv_B>… use same filename on each drive letter given

l -R<drv_A/0>,<drv_B/1>… raw drive letters/number for I/O

l -f<stripe factor> stripe size in blocks, random, or sequential

l -p[I]<cpu affinity> cpu number for affinity (0 based)(I=ideal)

l -a[R[I]]<cpu mask> cpu mask for (R=roundrobin (I=ideal)) affinity

l -o<#outstanding> depth to use for completion routines

l -b<io size(KB)> IO block size in KB

l -i<#IOs/run> number of IOs per IO run

l -m<[C|S]><#sub-blks> do multi blk IO (C=copy, S=scatter/gather)

l -L<[S|P][i|]> latencies from (S=system, P=processor) timer

l -B<[N|Y|H|S]> set buffering (N=none, Y=all, H=hdwr, S=sfwr)

l -S<#blocks> start I/Os #blocks into file

l -v1.1.1 I/Os runs use same blocks, as in version 1.1.1

l -F<paramfile> read parameters from <paramfile>

其中部分参数有各自的默认值:

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)

clip_image007

2、 文件编写完成后,在命令行下运行:

testio.bat > out.txt

clip_image009

3、 结果输出在相同目录下的out.txt文件中。每一行命令都会有它的输出

clip_image011

红色区域为重要部分

转载于:https://www.cnblogs.com/iamasqldba/archive/2013/06/09/3128051.html

猜你喜欢

转载自blog.csdn.net/weixin_30783629/article/details/94947428