Test Disk IOPS and Read/Write Bandwidth

Sun, 22 Apr 2018 05:31:58 +0000

Command to test disk IOPS

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

Sample Output

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)
bs: 1 (f=1): [m(1)] [78.1% done] [8707KB/2753KB/0KB /s] [2176/688/0 iops] [eta 01m:23s]
fio: terminating on signal 2
test: (groupid=0, jobs=1): err= 0: pid=2864: Sun Apr 22 05:38:14 2018
read : io=2398.4MB, bw=8297.9KB/s, iops=2074, runt=295968msec
write: io=819616KB, bw=2769.3KB/s, iops=692, runt=295968msec
cpu : usr=0.49%, sys=1.70%, ctx=200905, 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=613972/w=204904/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=2398.4MB, aggrb=8297KB/s, minb=8297KB/s, maxb=8297KB/s, mint=295968msec, maxt=295968msec
 WRITE: io=819616KB, aggrb=2769KB/s, minb=2769KB/s, maxb=2769KB/s, mint=295968msec, maxt=295968msec

Disk stats (read/write):
 xvde: ios=613645/214996, merge=0/57, ticks=4398044/4579196, in_queue=8977428, util=100.00%

Test Disk Read Bandwidth

hdparm -t /dev/xvdc

Sample Output

$ hdparm -t /dev/xvdc
/dev/xvdc:
 Timing buffered disk reads: 168 MB in 3.02 seconds = 55.60 MB/sec

Test Disk Write Bandwidth

Note: You should probably run this several times or increase the count until the result stabilizes, this is to eliminate the impact of any disk caches.

dd if=/dev/zero of=/mnt/throughtput_hdd/output bs=8k count=100k

Sample Output

$ dd if=/dev/zero of=/mnt/throughtput_hdd/output bs=8k count=100k
102400+0 records in
102400+0 records out
838860800 bytes (839 MB, 800 MiB) copied, 16.476 s, 50.9 MB/s