FIO is a good tool for iops testing. It is used for stress testing and verification of hardware. It supports 13 different I/O engines, including sync, MMAP, libaio, posixaio, SG V3, splice, null, network, syslet, guasi, and solarisaio.
FIO official website address: http://freshmeat.net/projects/fio/
I. Fio Installation
Wget http://brick.kernel.dk/snaps/fio-2.0.7.tar.gz
Yum install libaio-devel
Tar-zxvf fio-2.0.7.tar.gz
CD fio-2.0.7
Make
Make install
Ii. Random read test:
Random read:
FIO-filename =/dev/sdb1-Direct = 1-iodepth 1-thread-RW = randread-ioengine = psync-BS = 16 K-size = 200g-numjobs = 10- running time = 1000-group_reporting-name = mytest
Note:
Filename =/dev/sdb1 test file name, usually select the data directory of the disk to be tested.
Direct = 1 the test process bypasses the buffer provided by the machine. Make the test results more realistic.
RW = randwrite test random write I/O
RW = randrw test random write and read I/O
BS = 16 K the size of each Io block file is 16 K
Bsrange = 512-2048 same as above. Set the size range of the data block.
Size = 5g the size of this test file is 5g, with each 4 K Io test.
Numjobs = 30 the testing thread is 30.
Runtime = 1000 the test time is 1000 seconds. If no data is written, the 5g file will be divided into 4 K until it is written.
Ioengine = psync Io Engine Using pync
Rwmixwrite = 30 in mixed read/write mode, 30% of write
Group_reporting for the displayed results, the information of each process is summarized.
In addition
Lockmem = 1 GB only 1 GB memory is used for testing.
Zero_buffers uses 0 to initialize the system buffer.
Nrfiles = 8 Number of files generated by each process.
Sequential read:
FIO-filename =/dev/sdb1-Direct = 1-iodepth 1-thread-RW = read-ioengine = psync-BS = 16 K-size = 200g-numjobs = 30- running time = 1000-group_reporting-name = mytest
Random write:
FIO-filename =/dev/sdb1-Direct = 1-iodepth 1-thread-RW = randwrite-ioengine = psync-BS = 16 K-size = 200g-numjobs = 30- running time = 1000-group_reporting-name = mytest
Sequential write:
FIO-filename =/dev/sdb1-Direct = 1-iodepth 1-thread-RW = write-ioengine = psync-BS = 16 K-size = 200g-numjobs = 30- running time = 1000-group_reporting-name = mytest
Mixed random read/write:
FIO-filename =/dev/sdb1-Direct = 1-iodepth 1-thread-RW = randrw-rwmixread = 70-ioengine = psync-BS = 16 K-size = 200g- numjobs = 30-runtime = 100-group_reporting-name = mytest-ioscheduler = Noop
Iii. Actual test example:
[Root @ localhost ~] # FIO-filename =/dev/sdb1-Direct = 1-iodepth 1-thread-RW = randrw-rwmixread = 70-ioengine = psync-BS = 16 K-size = 200g -numjobs = 30-runtime = 100-group_reporting-name = mytest1
Mytest1: (G = 0): RW = randrw, BS = 16 K-16 K/16 K-16 K, ioengine = psync, iodepth = 1
...
Mytest1: (G = 0): RW = randrw, BS = 16 K-16 K/16 K-16 K, ioengine = psync, iodepth = 1
FIO 2.0.7
Starting 30 threads
Jobs: 1 (F = 1): [____________ M _____________] [3.5% done] [6935 K/3116 K/s] [423/190 iops] [ETA 48 m: 20 s] S]
Mytest1: (groupid = 0, jobs = 30): Err = 0: pid = 23802
Read: IO = 1853.4 MB,BW = 18967kb/s, iops = 1185Runt = 100058 msec
Clat (USEC): min = 60, max = 871116, AVG = 25227.91, STDev = 31653.46
LAT (USEC): min = 60, max = 871117, AVG = 25228.08, STDev = 31653.46
Clat percentiles (MSEC ):
| 1.00th = [3], 5.00th = [5], 10.00th = [6], 12700th = [8],
| 30.00th = [10], 40.00th = [12], 50.00th = [15], 60.00th = [19],
| 70.00th = [26], 80.00th = [37], 90.00th = [57], 95.00th = [79],
| 99.00th = [151], 99.50th = [202], 99.90th = [338], 99.95th = [383],
| 99.99th = [1, 523]
BW (kb/s): min = 26, max = 1944, Per = 3.36%, AVG = 636.84, STDev = 189.15
Write: IO = 803600kb,BW = 8031.4kb/s, iops = 501Runt = 100058 msec
Clat (USEC): min = 52, max = 9302, AVG = 146.25, STDev = 299.17
LAT (USEC): min = 52, max = 9303, AVG = 147.19, STDev = 299.17
Clat percentiles (USEC ):
| 1.00th = [62], 5.00th = [65], 10.00th = [68], 12700th = [74],
| 30.00th = [84], 40.00th = [87], 50.00th = [89], 60.00th = [90],
| 70.00th = [92], 80.00th = [97], 90.00th = [120], 95.00th = [370],
| 99.00th = [1688], 99.50th = [2128], 99.90th = [3088], 99.95th = [3696],
| 99.99th = [1, 5216]
BW (kb/s): min = 20, max = 1117, Per = 3.37%, AVG = 270.27, STDev = 133.27
LAT (USEC): 100 = 24.32%, 250 = 3.83%, 500 = 0.33%, 750 = 0.28%, 1000 = 0.27%
LAT (MSEC): 2 = 0.64%, 4 = 3.08%, 10 = 20.67%, 20 = 19.90%, 50 = 17.91%
LAT (MSEC): 100 = 6.87%, 250 = 1.70%, 500 = 0.19%, 750 = 0.01%, 1000 = 0.01%
CPU: USR = 1.70%, sys = 2.41%, CTX = 5237835, majf = 0, minf = 6344162
Io depths: 1 = 100.0%, 2 = 0.0%, 4 = 0.0%, 8 = 0.0%, 16 = 0.0%, 32 = 0.0%,> = 64 = 0.0%
Submit: 0 = 0.0%, 4 = 100.0%, 8 = 0.0%, 16 = 0.0%, 32 = 0.0%, 64 = 0.0%,> = 64 = 0.0%
Complete: 0 = 0.0%, 4 = 100.0%, 8 = 0.0%, 16 = 0.0%, 32 = 0.0%, 64 = 0.0%,> = 64 = 0.0%
Issued: Total = r = 118612/W = 50225/D = 0, short = r = 0/W = 0/D = 0
Run Status group 0 (all jobs ):
Read: IO = 1853.4 MB, aggrb = 18966kb/s, minb = 18966kb/s, maxb = 18966kb/s, mint = 100058 msec, maxt = 100058 msec
Write: IO = 803600kb, aggrb = 8031kb/s, minb = 8031kb/s, maxb = 8031kb/s, mint = 100058 msec, maxt = 100058 msec
Disk stats (read/write ):
SDB: IOS = 118610/50224, merge = 0/0, ticks = 2991317/6860, in_queue = 2998169, util = 99.77%
Mainly view the iops of the above bold Section