Objective
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.
Test preparation
Tools: Fio-flexible IO Tester
Official website:
Http://freecode.com/projects/fio
http://brick.kernel.dk/snaps/
Note : Performance tests are recommended to be tested directly by writing bare disks, resulting in more realistic data. However, directly testing the bare disk will destroy the file system structure, resulting in data loss, please verify that the data on the disk is backed up before testing.
CentOS can be installed directly with Yum
#yum安装yum install libaio-devel fio#手动安装yum install libaio-develwget http://brick.kernel.dk/snaps/fio-2.2.10.tar.gztar -zxvf fio-2.2.10.tar.gzcd fio-2.2.10make $ make install
For Gfio, GTK 2.18 (or newer), associated glib threads, and Cairo is requiredto be installed. Gfio isn ' t built automatically and can be enabledwith a--enable-gfio option to configure. Example: 1024K sequential write to a diskFio Cap_1024k_seq_write[Global]ioengine=libaiobs=1024krw=writeramp_time=6runtime=300direct=1iodepth=16#rwmixwrite=20time_based[test] Filename=/dev/sdanumjobs=1 Result: Test: (g=0): Rw=write, bs=1m-1m/1m-1m/1m-1m, Ioengine=libaio, iodepth= 16fio-2.8starting 1 processjobs:1 (f=1): [W (1)] [100.0% done] [0kb/68198kb/0kb/s] [0/66/0 IOPS] [eta 00m:00s]test: (grou Pid=0, Jobs=1): err= 0:pid=4676:thu Apr 7 17:22:37 WRITE:IO=20075MB,bw=68464kb/s,iops=66, Runt=300255msec #How much io, average bandwidth, thread run time is executedSlat (USEC): min=51, max=5732, avg=291.11, stdev=262.47 #Submission DelayClat (USEC): Min=1, max=2235.8k, avg=239043.28, stdev=153384.41 #Completion delayLat (usec): min=367, max=2235.9k,avg=239337.72, stdev=153389.57 #Response Time Clat percentiles (usec): | 1.00th=[ 221], 5.00th=[ 442], 10.00th=[1004], 20.00th=[108032], | 30.00TH=[228352], 40.00th=[248832], 50.00th=[257024], 60.00th=[268288], | 70.00TH=[280576], 80.00th=[301056], 90.00th=[342016], 95.00th=[477184], | 99.00TH=[806912], 99.50th=[864256], 99.90th=[1122304], 99.95th=[1171456], | 99.99th=[1646592] BW (KB /s): min= 170, max=204800, per=100.00%, avg=68755.07, stdev=27034.84& nbsp Lat (usec): 2=0.01%, 4=0.13%, 50=0.06%, 100=0.26%, 250=1.04% Lat (usec): 500=4.53%, 750=2.61%, 1000 = 1.33% Lat (msec): 2=1.18%, 4=0.15%, 10=0.77%, 20=0.77%, 50=1.50% Lat (msec): 100=4.43%, 250=23 .48%, 500=53.23%, 750=3.09%, 1000=1.30% Lat (msec): 2000=0.19%, >=2000=0.01% CPU &NBS P &NBSP: usr=0.03%, sys=2.11%, ctx=19066, Majf=0, minf=7 IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=103.8%, 32=0.0%, >=64=0.0% # IO Queuesubmit:0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0% #number of IO submissions to be submitted by a single IOcomplete:0=0.0%, 4=100.0%, 8=0.0%, 16=0.1%, 32=0.0%, 64=0.0%, >=64=0.0% issued:total=r=0/w=20060/d=0, Sho Rt=r=0/w=0/d=0, Drop=r=0/w=0/d=0 latency:target=0, window=0, percentile=100.00%, Depth=16 #distribution of IO end delayRun Status Group 0 (all jobs): WRITE:IO=20075MB, aggrb=68464kb/s (Group Total Bandwidth), MINB=68464KB/S (Minimum average bandwidth), MAXB=68464KB/S (Maximum average bandwidth), Mint=300255msec (the shortest run time for group Threads), Maxt=300255msec (Maximum run time for group Threads) Disk stats (read/write): sda:ios=23/41769 (total number of Io performed by all group), merge=0/149 (total number of Io merges that occurred), ticks=706/9102766 (Number of ticks we kept the disk busy), in_queue=9105836 (total time spent on the queue), util=100.00% (Disk Utilization)FAQ:1. Executive report: No package ' gtk+-2.0 ' found,no "gthread-2.0 ' found,configure:gtk and Gthread not found A:yum install GTK2 -devel2. Performing Fio-name Test-runtime=30-filename=/dev/sda3-ioengine=libaio-direct=1-bs=1024k-iodepth=16-rw=write- Time_based: reported: Fio:/dev/sda3 appears mounted, and ' allow_mounted_write ' isn ' t set. Aborting. A: for SDA pressure measurement
FIO User Guide