标签:
SQLIO 下载地址:SQLIO Disk Subsystem Benchmark Tool
默认文件夹:C:\Program Files\SQLIO
以命令行执行,进入到安装文件夹(C:\Program Files\SQLIO)执行 SQLIO 执行測试
#经常使用參数
o The -k option to specify the I/O operation type (read or write) o The -s option to specify the test duration in seconds o The -f option to specify the type of I/O access (sequential or random) o The -o option to specify the number of outstanding requests o The -b option to specify the size of the I/O request in bytesblock size o The -LS option to capture the disk latency option o The -F option to specify the name of the file which contain the test files to run SQLIO against
sqlio -kW -s300 -frandom -o32 -b4 -LS -Fparam.txt sqlio -kR -s300 -frandom -o32 -b4 -LS -Fparam.txt sqlio -kW -s300 -fsequential -o32 -b4 -LS -Fparam.txt sqlio -kR -s300 -fsequential -o32 -b4 -LS -Fparam.txt sqlio -kW -s300 -frandom -o32 -b8 -LS -Fparam.txt sqlio -kR -s300 -frandom -o32 -b8 -LS -Fparam.txt sqlio -kW -s300 -fsequential -o32 -b8 -LS -Fparam.txt sqlio -kR -s300 -fsequential -o32 -b8 -LS -Fparam.txt sqlio -kW -s300 -frandom -o32 -b64 -LS -Fparam.txt sqlio -kR -s300 -frandom -o32 -b64 -LS -Fparam.txt sqlio -kW -s300 -fsequential -o32 -b64 -LS -Fparam.txt sqlio -kR -s300 -fsequential -o32 -b64 -LS -Fparam.txt sqlio -kW -s300 -frandom -o32 -b128 -LS -Fparam.txt sqlio -kR -s300 -frandom -o32 -b128 -LS -Fparam.txt sqlio -kW -s300 -fsequential -o32 -b128 -LS -Fparam.txt sqlio -kR -s300 -fsequential -o32 -b128 -LS -Fparam.txt
下面用命令行批量运行,在安装文件夹下创建下列文件及其内容
#结果输出文件:result.txt
#參数文件 ( 4线程10GB ) :param.txt
d:\sqliotestfile.dat 4 0x0 10000
echo ----------------------------sqlio -kW -s300 -frandom -o32 -b4 -LS -Fparam.txt----------------------->>result.txt echo. >>result.txt sqlio -kW -s300 -frandom -o32 -b4 -LS -Fparam.txt>>result.txt echo. >>result.txt echo. >>result.txt echo ----------------------------sqlio -kR -s300 -frandom -o32 -b4 -LS -Fparam.txt----------------------->>result.txt echo. >>result.txt sqlio -kR -s300 -frandom -o32 -b4 -LS -Fparam.txt>>result.txt echo. >>result.txt echo. >>result.txt echo ----------------------------sqlio -kW -s300 -fsequential -o32 -b4 -LS -Fparam.txt----------------------->>result.txt echo. >>result.txt sqlio -kW -s300 -fsequential -o32 -b4 -LS -Fparam.txt>>result.txt echo. >>result.txt echo. >>result.txt echo ----------------------------sqlio -kR -s300 -fsequential -o32 -b4 -LS -Fparam.txt----------------------->>result.txt echo. >>result.txt sqlio -kR -s300 -fsequential -o32 -b4 -LS -Fparam.txt>>result.txt echo. >>result.txt echo. >>result.txt echo ----------------------------sqlio -kW -s300 -frandom -o32 -b8 -LS -Fparam.txt----------------------->>result.txt echo. >>result.txt sqlio -kW -s300 -frandom -o32 -b8 -LS -Fparam.txt>>result.txt echo. >>result.txt echo. >>result.txt echo ----------------------------sqlio -kR -s300 -frandom -o32 -b8 -LS -Fparam.txt----------------------->>result.txt echo. >>result.txt sqlio -kR -s300 -frandom -o32 -b8 -LS -Fparam.txt>>result.txt echo. >>result.txt echo. >>result.txt echo ----------------------------sqlio -kW -s300 -fsequential -o32 -b8 -LS -Fparam.txt----------------------->>result.txt echo. >>result.txt sqlio -kW -s300 -fsequential -o32 -b8 -LS -Fparam.txt>>result.txt echo. >>result.txt echo. >>result.txt echo ----------------------------sqlio -kR -s300 -fsequential -o32 -b8 -LS -Fparam.txt----------------------->>result.txt echo. >>result.txt sqlio -kR -s300 -fsequential -o32 -b8 -LS -Fparam.txt>>result.txt echo. >>result.txt echo. >>result.txt echo ----------------------------sqlio -kW -s300 -frandom -o32 -b64 -LS -Fparam.txt----------------------->>result.txt echo. >>result.txt sqlio -kW -s300 -frandom -o32 -b64 -LS -Fparam.txt>>result.txt echo. >>result.txt echo. >>result.txt echo ----------------------------sqlio -kR -s300 -frandom -o32 -b64 -LS -Fparam.txt----------------------->>result.txt echo. >>result.txt sqlio -kR -s300 -frandom -o32 -b64 -LS -Fparam.txt>>result.txt echo. >>result.txt echo. >>result.txt echo ----------------------------sqlio -kW -s300 -fsequential -o32 -b64 -LS -Fparam.txt----------------------->>result.txt echo. >>result.txt sqlio -kW -s300 -fsequential -o32 -b64 -LS -Fparam.txt>>result.txt echo. >>result.txt echo. >>result.txt echo ----------------------------sqlio -kR -s300 -fsequential -o32 -b64 -LS -Fparam.txt----------------------->>result.txt echo. >>result.txt sqlio -kR -s300 -fsequential -o32 -b64 -LS -Fparam.txt>>result.txt echo. >>result.txt echo. >>result.txt echo ----------------------------sqlio -kW -s300 -frandom -o32 -b128 -LS -Fparam.txt----------------------->>result.txt echo. >>result.txt sqlio -kW -s300 -frandom -o32 -b128 -LS -Fparam.txt>>result.txt echo. >>result.txt echo. >>result.txt echo ----------------------------sqlio -kR -s300 -frandom -o32 -b128 -LS -Fparam.txt----------------------->>result.txt echo. >>result.txt sqlio -kR -s300 -frandom -o32 -b128 -LS -Fparam.txt>>result.txt echo. >>result.txt echo. >>result.txt echo ----------------------------sqlio -kW -s300 -fsequential -o32 -b128 -LS -Fparam.txt----------------------->>result.txt echo. >>result.txt sqlio -kW -s300 -fsequential -o32 -b128 -LS -Fparam.txt>>result.txt echo. >>result.txt echo. >>result.txt echo ----------------------------sqlio -kR -s300 -fsequential -o32 -b128 -LS -Fparam.txt----------------------->>result.txt echo. >>result.txt sqlio -kR -s300 -fsequential -o32 -b128 -LS -Fparam.txt>>result.txt
很多其它具体參数:
Option |
Description |
-k |
-k<R|W> 指定測试 I/O 的种类:读或写 -kR 測试读 -kW 測试写 |
-s |
-s<secs> 指定測试运行时间,单位:秒 -s360 測试 360 秒 通常建议执行 5-10 分钟以得到更合理的结果。 |
-f |
-f<stripe factor> 指定 I/O 条带測试方式 -fsequential 使用顺序方式 -frandom 使用随机方式 -f8 StripeSize = 8 * (-b 參数) 条带(Stripe)代表着磁盘中最小的分区。 |
-o |
-o<#outstanding> 指定未处理 I/O 请求数量。也就是请求 Queue 的深度 -o8 每一个 Queue 中有 8 个未处理的 I/O 请求 通过指定不同的数值以改变整体吞吐率,经常使用数值为 8, 32, 64。 |
-b |
-b<size(KB)> 指定 I/O 请求块的尺寸,单位 KBytes -b8 使用 8 KBytes 的请求块大小 |
-L |
-L<S|P> 指定捕获延迟信息 -LS 延迟信息来自系统计数器 S = System Timer -LP 延迟信息来自处理器计数器 P = Processor Timer |
-t |
-t<threads> 指定线程的数量。最大值 256 -t8 使用 8 个线程进行測试 |
-B |
-B<N|Y|H|S> 设置缓存(Buffering) -BN N=none -BY Y=all -BH H=hdwr -BS S=sfwr |
-F |
-F<paramfile> 指定測试參数文件位置,文件名称最大长度 256 -Fparam.txt 从当前执行文件夹中的 param.txt 文件里读取參数 |
-d |
-d<DriveLetter> 指定測试的磁盘驱动器,最多指定 256 个盘符 -dD 測试 D 盘 -dDE 測试 D 盘和 E 盘 |
-p |
-p<I> 指定 CPU Affinity -p0 affinity on cpu number 0 -pI0 ideal affinity on cpu number 0 CPU Affinity 同意进行在特定的处理器中执行。 |
-a |
-a<R|I> 指定 CPU Affinity 掩码 -a3 affnity mask is 0x3(3) -aR3 affinity mask is 0x3(3) with round robin -aRI3 ideal affinity mask is 0x3(3) with round robin |
-i |
-i<#IO/run> 指定每次 IO 測试中运行 IO 的次数 -i8 8 IOs per run |
-m |
-m<[C|S]><#sub-blks> do multi blk IO (C=copy, S=scatter/gather) |
-S |
-S<#blocks> start I/O #blocks into file |
附上自測腾讯云的IO情况:
參考文档:Performance Guidance for SQL Server in Windows Azure Virtual Machines
标签:
原文地址:http://www.cnblogs.com/mengfanrong/p/5351343.html