SQLIO 是一个用于测试存储系统能力的命令行工具,用以获取存储系统相关的性能指标,以判断系统的 I/O 处理能力。
在微软的网站可以下载 SQLIO 的安装包,安装后目录中会出现如下文件:
- EULA.rtf – End-user license agreement that covers sqlio usage.
- param.txt – Configuration options that identify the target drives, test file names, and specifics about running the tests.
- readme.txt – Comprehensive details about the utility and its supported options.
- sqlio.exe – The utility executable file.
- Using SQLIO.rtf – General information about using the utility.
默认 param.txt 中包含了如下信息:
c:\testfile.dat 2 0x0 100
#d:\testfile.dat 2 0x0 100
其中,
- c:\ 指定了目标驱动器是 C 盘。
- testfile.dat 是要在目标驱动器中创建的测试文件名。
- 2 代表使用线程的数量。
- 0x0 代表 CPU affinity mask,0x0 意味着使用所有的 CPU。
- 100 代表着生成测试文件的大小,单位为 MB。
- # 表示行注释,将不会被处理。
可以在 param.txt 中指定多行配置,每一行为一次独立的执行。
SQLIO 支持使用命令行参数来指定配置,例如,可以在 cmd 中执行如下命令:
sqlio -kW -s10 -fsequential -o8 -b64 -Fparam.txt
下面列出了 SQLIO 所支持的参数。