Guide on how to find out the performance of a storage by calculating IO transfer rate and IOPS

how to measure the IO speed of a disk?


We commonly use the DD command especially in Linux OS.dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync

hendranata@hendranata-N46VZ:~$ dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
16384+0 records in
16384+0 records out
1073741824 bytes (1,1 GB, 1,0 GiB) copied, 3,47935 s, 309 MB/s


the above command means writing a 64kb file 16rb times with the test file name. the results obtained if using SSD will definitely be greater in the range of 400-600Mb/s.
how to measure the IOPS speed of a disk? easiest to use an application called fio.


install di centos: sudo yum install fio
install di ubuntu: sudo apt-get install fio

Run the command below to perform Random read/write performance:

fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randrw --rwmixread=75

iodepth=64 --size=4G --readwrite=randrw --rwmixread=75
test: (g=0): rw=randrw, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=64
fio-2.2.10
Starting 1 process
test: Laying out IO file(s) (1 file(s) / 4096MB)
Jobs: 1 (f=1): [m(1)] [100.0% done] [171.5MB/58869KB/0KB /s] [43.9K/14.8K/0 iops] [eta 00m:00s]
test: (groupid=0, jobs=1): err= 0: pid=25257: Sun May 13 13:08:14 2018
read : io=3071.7MB, bw=184643KB/s, iops=46160, runt= 17035msec
write: io=1024.4MB, bw=61574KB/s, iops=15393, runt= 17035msec
cpu : usr=17.54%, sys=77.70%, ctx=111004, majf=0, minf=9
IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=100.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.1%, >=64=0.0%
issued : total=r=786347/w=262229/d=0, short=r=0/w=0/d=0, drop=r=0/w=0/d=0
latency : target=0, window=0, percentile=100.00%, depth=64

Run status group 0 (all jobs):
READ: io=3071.7MB, aggrb=184642KB/s, minb=184642KB/s, maxb=184642KB/s, mint=17035msec, maxt=17035msec
WRITE: io=1024.4MB, aggrb=61574KB/s, minb=61574KB/s, maxb=61574KB/s, mint=17035msec, maxt=17035msec

Disk stats (read/write):
sda: ios=777565/259413, merge=67/26, ticks=298436/46192, in_queue=345484, util=98.26%


can also run this for Random read performance:

fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randread


and
 Random write performance:

fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randwrite

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.