IOPS testing for Linux system hard drives

Source: Internet
Author: User

*******************************************************************************************

Copyright: www.foutime.com Shenzhen Fang Tai Intelligent Technology Co., Ltd.

Channel Lock escape lock a cartoon building intercom parking lot

*******************************************************************************************

What is IOPS?

IOPS (English: Input/output Operations per Second), which is the number of read/write (I/O) operations per second, used in databases and other applications, to measure random access. The iops*** on the storage side can be different from the host-side Io, which means how many hosts per second the storage can receive, and the host's IO requires multiple accesses to the storage to complete.

Therefore, for each server, its iops are very important, directly affect * * * ability. How do we test our iops in the usual way? We can detect this by "FIO" The IOPS test tool under this Linux.

How to use:

Install Fio:

Yum Install gcc libaio-devel-y
wget http://brick.kernel.dk/snaps/fio-2.0.10.tar.gz
TAR-ZXVF fio-2.0.10.tar.gz
CD fio-2.0.10
Make && make install

Test :

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

Parameter 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

###############################################

actual Test example (main view iops in Red font section )):
[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%

This article is from the "fscaps" blog, make sure to keep this source http://fscaps.blog.51cto.com/235043/1424352

Related Article

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.