Linux uses FIO to test disk IOPS 2013-09-23 10:59:21
Category: LINUX
Fio is a great tool for testing IOPS, which is used for stress testing and validation of hardware, supporting 13 different I/O engines, including: Sync,mmap, Libaio, Posixaio, SG v3, splice, NULL, network, Syslet, Guasi, Solarisaio and so on.
FIO website Address: http://freshmeat.net/projects/fio/
One, 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
Two, FIO usage:
Random read:
Fio-filename=/dev/sdb1-direct=1-iodepth 1-thread-rw=randread-ioengine=psync-bs=16k-size=200g-numjobs=10-runtime =1000-group_reporting-name=mytest
Description
FILENAME=/DEV/SDB1 test file name, usually select the data directory of the disk you want to test.
The Direct=1 test process bypasses the machine's own buffer. Make the test results more realistic.
Rw=randwrite test for random write I/O
RW=RANDRW test for random write and read I/O
bs=16k a block file size of 16k for one-time IO
bsrange=512-2048, setting the size range of the data block
size=5g this time the test file size is 5g, with every 4k IO to test.
Numjobs=30 this time the test thread is 30.
runtime=1000 test time is 1000 seconds, if not write the 5g file will be divided into 4k each time until the end of writing.
Ioengine=psync IO engine uses pync mode
Rwmixwrite=30 in mixed read and write mode, write 30%
Group_reporting information about each process that displays the results.
In addition
LOCKMEM=1G only uses 1g of memory for testing.
Zero_buffers initializes the system buffer with 0.
Nrfiles=8 the number of files generated per process.
Sequential reads:
Fio-filename=/dev/sdb1-direct=1-iodepth 1-thread-rw=read-ioengine=psync-bs=16k-size=200g-numjobs=30-runtime=100 0-group_reporting-name=mytest
Random write:
Fio-filename=/dev/sdb1-direct=1-iodepth 1-thread-rw=randwrite-ioengine=psync-bs=16k-size=200g-numjobs=30-runtim E=1000-group_reporting-name=mytest
Sequential write:
Fio-filename=/dev/sdb1-direct=1-iodepth 1-thread-rw=write-ioengine=psync-bs=16k-size=200g-numjobs=30-runtime=10 00-group_reporting-name=mytest
Mixed random Read and write:
Fio-filename=/dev/sdb1-direct=1-iodepth 1-thread-rw=randrw-rwmixread=70-ioengine=psync-bs=16k-size=200g-numjobs =30-runtime=100-group_reporting-name=mytest-ioscheduler=noop
Three, the actual test example:
[Email protected] ~]# fio-filename=/dev/sdb1-direct=1-iodepth 1-thread-rw=randrw-rwmixread=70-ioengine=psync-bs=1 6k-size=200g-numjobs=30-runtime=100-group_reporting-name=mytest1
Mytest1: (g=0): RW=RANDRW, bs=16k-16k/16k-16k, Ioengine=psync, iodepth=1
...
Mytest1: (g=0): RW=RANDRW, bs=16k-16k/16k-16k, Ioengine=psync, iodepth=1
Fio 2.0.7
Starting Threads
Jobs:1 (f=1): [________________m_____________] [3.5% done] [6935k/3116k/s] [423/190 IOPS] [eta 48m:20s] s]
Mytest1: (Groupid=0, jobs=30): err= 0:pid=23802
READ:IO=1853.4MB,bw=18967kb/s, iops=1185, runt=100058msec
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], 20.00th=[8],
| 30.00th=[], 40.00th=[[50.00th=[], 60.00th=[19],
| 70.00th=[], 80.00th=[(Notoginseng), 90.00th=[], 95.00th=[79],
| 99.00th=[151], 99.50th=[202], 99.90th=[338], 99.95th=[383],
| 99.99th=[523]
BW (KB/S): min=, max= 1944, per=3.36%, avg=636.84, stdev=189.15
WRITE:IO=803600KB,bw=8031.4kb/s, iops=501, runt=100058msec
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=[], 5.00th=[[10.00th=[], 20.00th=[74],
| 30.00th=[], 40.00th=[50.00th=[], 60.00th=[90],
| 70.00th=[], 80.00th=[(90.00th=[), 95.00th=[370],
| 99.00th=[1688], 99.50th=[2128], 99.90th=[3088], 99.95th=[3696],
| 99.99th=[5216]
BW (KB/S): min=, 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.4MB, aggrb=18966kb/s, minb=18966kb/s, maxb=18966kb/s, Mint=100058msec, maxt=100058msec
WRITE:IO=803600KB, aggrb=8031kb/s, minb=8031kb/s, maxb=8031kb/s, Mint=100058msec, maxt=100058msec
Disk stats (read/write):
sdb:ios=118610/50224, merge=0/0, ticks=2991317/6860, in_queue=2998169, util=99.77%
See the ioPS in the Red font section above
Reprint: http://ns.35.com/?p=227
Linux uses FIO test disk IOPS "reprint"