Skip to content

Instantly share code, notes, and snippets.

@martinsotir
Created May 2, 2019 20:55
Show Gist options
  • Save martinsotir/3cf087f67ef55b424efccdbd81bbc443 to your computer and use it in GitHub Desktop.
Save martinsotir/3cf087f67ef55b424efccdbd81bbc443 to your computer and use it in GitHub Desktop.

Disk I/O benchmarking

Required packages:

sudo apt install fio ioping smartmontools

List volume and partitions:

lsblk

Device information

smartctl /dev/vda

sequential read

fio --name test --eta-newline=5s --filename=fio-tempfile.dat --rw=read --size=500m --io_size=10g --blocksize=2048k --ioengine=libaio --fsync=10000 --iodepth=32 --direct=1 --numjobs=1 --runtime=60 --group_reporting

sequential write

fio --name test --eta-newline=5s --filename=fio-tempfile.dat --rw=write --size=500m --io_size=10g --blocksize=2048k --ioengine=libaio --fsync=10000 --iodepth=32 --direct=1 --numjobs=1 --runtime=60 --group_reporting

random 4K read QD1

fio --name test --eta-newline=5s --filename=fio-tempfile.dat --rw=randread --size=500m --io_size=10g --blocksize=4k --ioengine=libaio --fsync=1 --iodepth=1 --direct=1 --numjobs=1 --runtime=60 --group_reporting

Mixed random 4K read and write QD1 with sync

fio --name TEST --eta-newline=5s --filename=fio-tempfile.dat --rw=randrw --size=500m --io_size=10g --blocksize=4k --ioengine=libaio --fsync=1 --iodepth=1 --direct=1 --numjobs=1 --runtime=60 --group_reporting

Random r/w

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

random read

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

random write

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

latency

ioping -c 10 .

Sources :

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment