Examples of Linux using FIO to test disk IO performance

Source: Internet
Author: User
Tags mixed

Fio is a very good tool for testing iops to stress test and verify hardware, supporting 19 different I/O engines, including: Sync, mmap, Libaio, Posixaio, SG v3, splice, NULL, network, Syslet, Guasi, Solarisaio and so on.
FIO Official website: http://freecode.com/projects/fio/

First, installation

Can be installed directly yum, or download the compressed package to install


Yum Install Fio

Second, the order

1, Random read:


Fio-filename=/dev/sda1-direct=1-iodepth 1-thread-rw=randread-ioengine=psync-bs=4k-size=60g-numjobs=64-runtime=1 0-group_reporting-name=file

2, sequential reading:


Fio-filename=/dev/sda1-direct=1-iodepth 1-THREAD-RW=READ-IOENGINE=PSYNC-BS=4K-SIZE=60G-NUMJOBS=64-RUNTIME=10-GR Oup_reporting-name=file

3, Random write:

Fio-filename=/dev/sda1-direct=1-iodepth 1-thread-rw=randwrite-ioengine=psync-bs=4k-size=60g-numjobs=64-runtime= 10-group_reporting-name=file

4, sequential reading:

Fio-filename=/dev/sda1-direct=1-iodepth 1-thread-rw=write-ioengine=psync-bs=4k-size=60g-numjobs=64-runtime=10-g Roup_reporting-name=file

5. Mixed random reading and writing:


Fio-filename=/dev/sda1-direct=1-iodepth 1-thread-rw=randrw-rwmixread=30-ioengine=psync-bs=4k-size=60g-numjobs=6 4-runtime=10-group_reporting-name=file-ioscheduler=noop
Ps:
FILENAME=/DEV/SDA1 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 randomly written I/O
RW=RANDRW test Random Write and read I/O
Rw=randread test for Random read I/O
bs=4k Single IO block file size is 16k
bsrange=512-2048, the size range of the data block
size=60g This test file size is 60g, with every 4k IO test
NUMJOBS=64 the test thread for this time is 64
runtime=10 test time is 10 seconds, if not write 5g file is divided into 4k every time you finish
Ioengine=psync IO engine uses Pync method
Rwmixwrite=30 in mixed read-write mode, write accounted for 30%
Group_reporting about displaying the results, summarize the information for each process.
Furthermore
LOCKMEM=1G only use 1g memory for testing
Zero_buffers with 0 initialization system buffer
Nrfiles=8 the number of files generated per process.

Third, the example test

This example is a test for random reads, bw=1532.2kb/s in the text, iops=383 is the measured IOPS


[Root@localhost mapper]# fio-filename=/dev/sda1-direct=1-rw=randread-bs=4k-size 60g-numjobs=64-runtime=10-group_r Eporting-name=file

File: (g=0): Rw=randread, bs=4k-4k/4k-4k, Ioengine=sync, iodepth=1

...

File: (g=0): Rw=randread, bs=4k-4k/4k-4k, Ioengine=sync, iodepth=1

Fio 1.57

Starting processes

Jobs:4 (f=4): [______r_______________________r_r_______r_______________________] [3.5% done] [745k/0k/s] [181/0 IOPS] [Eta 12m:26s]s]

File: (Groupid=0, jobs=64): err= 0:pid=8717

READ:IO=15792KB, bw=1532.2kb/s, iops=383, runt= 10307msec

Clat (USEC): min=78, max=1303.3k, avg=99439.90, stdev=12973.11

Lat (usec): min=78, max=1303.3k, avg=99440.39, stdev=12973.10

BW (KB/S): min= 3, max=, per=2.52%, avg=38.61, stdev= 2.45

cpu:usr=0.01%, sys=0.68%, ctx=4026, majf=0, minf=1961

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 r/w/d:total=3948/0/0, short=0/0/0

Lat (usec): 100=0.13%, 250=0.61%, 500=0.25%, 750=0.08%, 1000=0.03%

Lat (msec): 2=0.03%, 4=0.10%, 10=0.76%, 20=1.85%, 50=10.61%

Lat (msec): 100=18.90%, 250=47.21%, 500=19.02%, 750=0.28%, 1000=0.10%

Lat (msec): 2000=0.05%

Run Status Group 0 (all jobs):

READ:IO=15792KB, aggrb=1532kb/s, minb=1568kb/s, maxb=1568kb/s, Mint=10307msec, maxt=10307msec

Disk stats (read/write):

SDA:IOS=3931/13, MERGE=0/13, ticks=584686/184, in_queue=584841, util=98.53%

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.