FIO is Test IOPS

Source: Internet
Author: User

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.

Installation

    • wget http://brick.kernel.dk/snaps/fio-2.1.10.tar.gz
    • Centos
      • Yun Install Libaio-devel-y
    • Debian
      • Apt-get Install Libaio-dev-y
    • Compiling the installation
      tar zxf fio-2.1.10.tar.gz
      cd fio-2.1.10
      make && make install
Usage, description
  • filename=/dev/sdb1       测试文件名称,通常选择需要测试的盘的data目录。  direct=1                 测试过程绕过机器自带的buffer。使测试结果更真实。  rw=randwrite             测试随机写的I/O  rw=randrw                测试随机写和读的I/O  bs=16k                   单次io的块文件大小为16k  bsrange=512-2048         同上,提定数据块的大小范围  size=5g                  本次的测试文件大小为5g,以每次4k的io进行测试。  numjobs=30               本次的测试线程为30.  runtime=1000             测试时间为1000秒,如果不写则一直将5g文件分4k每次写完为止。  ioengine=psync           io引擎使用pync方式  rwmixwrite=30            在混合读写的模式下,写占30%  group_reporting          关于显示结果的,汇总每个进程的信息。  此外lockmem=1g               只使用1g内存进行测试。  zero_buffers             用0初始化系统buffer。  nrfiles=8                每个进程生成文件的数量。  
  • Sequential Write performance
    fio --filename=/data/test --iodepth=64 --ioengine=libaio --direct=1 --rw=write --bs=4k --size=500m --numjobs=4 --runtime=10 --group_reporting --name=test-write

  • Sequential Read performance
    fio --filename=/data/test --iodepth=64 --ioengine=libaio --direct=1 --rw=read --bs=4k --size=500m --numjobs=4 --runtime=10 --group_reporting --name=test-read

  • Random Read performance
    fio --filename=/data/test -iodepth=64 --ioengine=libaio --direct=1 --rw=randread --bs=4k --size=500M --numjobs=64 --runtime=20 --group_reporting --name=test-rand-read

  • Random Write performance
    fio --filename=/data/test --iodepth=64 --ioengine=libaio --direct=1 --rw=randwrite --bs=4k --size=500M --numjobs=64 --runtime=20 --group_reporting --name=test-rand-write

  • Random Read and Write
    fio --filename=/data/test --iodepth=64 --ioengine=libaio --direct=1 --rw=randrw --bs=4k --size=500M --numjobs=64 --runtime=20 --group_reporting --name=test-rand-readwrite

Ucloud Practical Test Examples
  • [[email protected] # Fio--filename=/data/test--iodepth=64--ioengine=libaio--direct=1--rw=randrw--bs=4k-- size=500m--numjobs=64--runtime=20--group_reporting--name=test-rand-readwritetest-rand-readwrite: (g=0): rw= RANDRW, bs=4k-4k/4k-4k, Ioengine=libaio, iodepth=64 ... test-rand-readwrite: (g=0): RW=RANDRW, Bs=4K-4K/4K-4K, Ioengine =libaio, iodepth=64 fio 2.0.7 starting 500MB processes test-rand-readwrite:laying out IO file (s) (1 file (s)/) Job S:64 (f=64): ... test-rand-readwrite: (Groupid=0, jobs=64): err= 0:pid=27106 read:io=1254.7mb, bw=63827kb/s, IOPS =15956, runt= 20128msec Slat (USEC): min=2, max=362246, avg=1939.96, stdev=20054.83 Clat (USEC): min=11, max=822 072, avg=114432.56, stdev=116574.10 lat (usec): min=41, max=822081, avg=116375.98, stdev=117044.89 Clat percenti  Les (usec): | 1.00th=[418], 5.00th=[604], 10.00th=[692], 20.00th=[828], | 30.00th=[1048], 40.00th=[3120], 50.00th=[98816], 60.00th=[115200], | 70.00TH=[205824], 80.00th=[246784], 90.00th=[288768], 95.00th=[296960], | 99.00TH=[317440], 99.50th=[411648], 99.90th=[528384], 99.95th=[577536], | 99.99TH=[618496] BW (kb/s): min= 149, max= 2782, per=1.58%, avg=1011.31, stdev=501.25 WRITE:IO=1253.0MB, Bw=63746K b/S, iops=15936, runt= 20128msec Slat (USEC): min=3, max=370177, avg=1946.49, stdev=20060.74 Clat (USEC): min=10 , max=822032, avg=136414.77, stdev=118302.48 lat (usec): min=346, max=894660, avg=138365.58, stdev=119001.95 CLA  T percentiles (USEC): | 1.00th=[636], 5.00th=[748], 10.00th=[836], 20.00th=[1048], | 30.00th=[2864], 40.00th=[96768], 50.00th=[111104], 60.00th=[162816], | 70.00TH=[222208], 80.00th=[276480], 90.00th=[292864], 95.00th=[301056], | 99.00TH=[378880], 99.50th=[501760], 99.90th=[577536], 99.95th=[593920], | 99.99TH=[692224] BW (kb/s): min=, max= 2778, per=1.58%, avg=1007.37, stdev=499.86 lat (usec): 20=0.01%, 50=0 .1%, 100=0.01%, 250 =0.12%, 500=0.76% Lat (usec): 750=8.93%, 1000=13.61% Lat (msec): 2=10.84%, 4=1.15%, 10=0.84%, 20=0.42%, 50=0.26% Lat (msec): 100=9.27%, 250=31.68%, 500=21.65%, 750=0.44%, 1000=0.01% cpu:usr=0.17%, sys=0.62%, ctx=18901, MA Jf=0, minf=1896 IO depths:1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.2%, 32=0.3%, >=64=99.4% 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.1 %, >=64=0.0% issued:total=r=321176/w=320768/d=0, Short=r=0/w=0/d=0run status group 0 (all jobs): read:io= 1254.7MB, aggrb=63826kb/s, minb=63826kb/s, maxb=63826kb/s, Mint=20128msec, Maxt=20128msec WRITE:IO=1253.0MB, aggrb= 63745KB/S, minb=63745kb/s, maxb=63745kb/s, mint=20128msec, Maxt=20128msecdisk stats (read/write): vdb:ios=320605/3202 MERGE=2/27, ticks=437742/1156547, in_queue=1593987, util=98.64%
about using DD for read-write testing
      • 4k 100,000 times write
        dd if=/dev/zero of=/data/test bs=4k count=100000
        100000+0 Records in
        100000+0 Records out
        409600000 bytes (410 MB) copied, 0.87704 s, 467 MB/s
      • 4k 100,000 reads
        dd if=/data/test of=/dev/null bs=4k count=100000
        100000+0 Records in
        100000+0 Records out
        409600000 bytes (410 MB) copied, 0.111689 s, 3.7 Gb/s
      • 4k 100,000 reads and writes
        dd if=/data/test of=/data/test.txt bs=4k count=100000
        100000+0 Records in
        100000+0 Records out
        409600000 bytes (410 MB) copied, 0.776348 s, 528 MB/s

FIO is Test IOPS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.