http://bbs.chinaunix.net/thread-1940005-1-1.html
IOZONE主要用来测试操作系统文件系统性能的测试工具,该工具所测试的范围主要有,write , Re-write, Read, Re-Read, Random Read, Random Write, Random Mix, Backwards Read, Record Rewrite, Strided Read, Fwrite, Frewrite, Fread, Freread, Mmap, Async I/O
使用iozone可以在多线程、多cpu,并指定cpu cache空间大小以及同步或异步I/O读写模式的情况下进行测试文件操作性能;
(0=write/rewrite, 1=read/re-read, 2=random-read/write
3=Read-backwards, 4=Re-write-record, 5=stride-read, 6=fwrite/re-fwrite, 7=fread/Re-fread,
8=random mix, 9=pwrite/Re-pwrite, 10=pread/Re-pread, 11=pwritev/Re-pwritev, 12=preadv/Re-preadv).
Iozone 工具的安装使用:
Iozone工具以rpm包的形式安装,Iozone工具iozone-3-283.i386.rpm可以存放在/usr/src目录下面,然后调用rpm –ivh iozone-3-283.i386.rpm 进行安装,安装成功以后,进入/opt/iozone/bin/目录,即可以调用以下详细测试命令进行测试。
针对文件系统的测试可以按一下几项执行操作:
1. 多线程下的同步I/O读写测试
分别针对128K,16M,256M,2G文件大小和8进程,64进程,128进程数进行测试
主要测试文件写和重复写、读和重复读、随即读写、后向读、文件内随即点写、大间隔文件点读、文件内的随即点读写等测试项,记录大小1M cpu cache 2048kbyte。
1.1 128k 文件性能测试:
1.1.1 8进程文件性能测试:
测试命令为:
Iozone –s 128k –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 8 –r 1m –S 2048 –G –o –B > test-128k-8-g.txt
1.1.2 64进程文件性能测试:
测试命令为:
Iozone –s 128k –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 64 –r 1m –S 2048 –G –o –B > test-128k-64-g.txt
1.1.3 128进程文件性能测试:
测试命令为:
Iozone –s 128k –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 128 –r 1m –S 2048 –G –o –B > test-128k-128-g.txt
1.2 16M文件性能测试
1.2.1 8进程文件性能测试:
测试命令为:
Iozone –s 16M –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 8 –r 1m –S 2048 –G –o –B > test-16m-8-g.txt
1.2.2 64进程文件性能测试:
测试命令为:
Iozone –s 16M –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 64 –r 1m –S 2048 –G –o –B > test-16m-64-g.txt
1.2.3 128进程文件性能测试:
测试命令为:
Iozone –s 16M –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 128 –r 1m –S 2048 –G –o –B > test-16m-128-g.txt
1.3 256M文件性能测试
1.3.1 8进程文件性能测试:
测试命令为:
Iozone –s 256M –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 8 –r 1m –S 2048 –G –o –B > test-256m-8-g.txt
1.3.2 64进程文件性能测试:
测试命令为:
Iozone –s 256M –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 64 –r 1m –S 2048 –G –o –B > test-256m-64-g.txt
1.3.3 128进程文件性能测试:
测试命令为:
Iozone –s 256M –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 128 –r 1m –S 2048 –G –o –B > test-256m-128-g.txt
1.4 2G文件性能测试
1.4.1 8进程文件性能测试:
测试命令为:
Iozone –s 2G –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 8 –r 1m –S 2048 –G –o –B > test-2G-8-g.txt
1.4.2 64进程文件性能测试:
测试命令为:
Iozone –s 2G –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 64 –r 1m –S 2048 –G –o –B > test-2G-64-g.txt
1.4.3 128进程文件性能测试:
测试命令为:
Iozone –s 2G –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 128 –r 1m –S 2048 –G –o –B > test-2G-128-g.txt
2. 多线程下的异步I/O读写测试
分别针对128K,16M,256M,2G文件大小和8进程,64进程,128进程数进行测试
主要测试文件写和重复写、读和重复读、随即读写、后向读、文件内随即点写、大间隔文件点读、文件内的随即点读写等测试项。
2.1 128k 文件性能测试:
2.1.1 8进程文件性能测试:
测试命令为:
Iozone –s 128k –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 8 –r 1m –S 2048 –D –o –B > test-128k-8-d.txt
2.1.2 64进程文件性能测试:
测试命令为:
Iozone –s 128k –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 64 –r 1m –S 2048 –D –o –B > test-128k-64-d.txt
2.1.3 128进程文件性能测试:
测试命令为:
Iozone –s 128k –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 128 –r 1m –S 2048 –D –o –B > test-128k-128-d.txt
2.2 16M文件性能测试
2.2.1 8进程文件性能测试:
测试命令为:
Iozone –s 16M –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 8 –r 1m –S 2048 –D –o –B > test-16m-8-d.txt
2.2.2 64进程文件性能测试:
测试命令为:
Iozone –s 16M –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 64 –r 1m –S 2048 –D –o –B > test-16m-64-d.txt
2.2.3 128进程文件性能测试:
测试命令为:
Iozone –s 16M –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 128 –r 1m –S 2048 –D –o –B > test-16m-128-d.txt
2.3 256M文件性能测试
2.3.1 8进程文件性能测试:
测试命令为:
Iozone –s 256M –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 8 –r 1m –S 2048 –D –o –B > test-256m-8-d.txt
2.3.2 64进程文件性能测试:
测试命令为:
Iozone –s 256M –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 64 –r 1m –S 2048 –D –o –B > test-256m-64-d.txt
2.3.3 128进程文件性能测试:
测试命令为:
Iozone –s 256M –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 128 –r 1m –S 2048 –D –o –B > test-256m-128-d.txt
2.4 2G文件性能测试
2.4.1 8进程文件性能测试:
测试命令为:
Iozone –s 2G –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 8 –r 1m –S 2048 –D –o –B > test-2G-8-d.txt
2.4.2 64进程文件性能测试:
测试命令为:
Iozone –s 2G –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 64 –r 1m –S 2048 –D –o –B > test-2G-64-d.txt
2.4.3 128进程文件性能测试:
测试命令为:
Iozone –s 2G –i 0 –i 1 –i 2 –i 3 –i 4 –i 5 –i 8 –t 128 –r 1m –S 2048 –D –o –B > test-2G-128-d.txt