Skip to content

Instantly share code, notes, and snippets.

@kincl
Last active September 26, 2023 20:39
Show Gist options
  • Save kincl/6bb8554ce9be1241e59003ff696579df to your computer and use it in GitHub Desktop.
Save kincl/6bb8554ce9be1241e59003ff696579df to your computer and use it in GitHub Desktop.
disk benchmarking

Disk Benchmarking

IOzone

Option Documentation
-C Show bytes transferred by each child in throughput testing. Useful if your operating system has any starvation problems in file I/O or in process management.
-w Do not unlink temporary files when finished using them.
-c Include close() in the timing calculations. This is useful only if you suspect that close() is broken in the operating system currently under test. It can be useful for NFS Version 3 testing as well to help identify if the nfs3_commit is working well.
-e Include flush (fsync,fflush) in the timing calculations
-i Used to specify which tests to run. (0=write/rewrite, 1=read/re-read, 2=random-read/write, 3=Read-backwards, 4=Re-write-record, 5=stride-read, 6=fwrite/re-fwrite, 7=fread/Re-fread, 8=mixed workload, 9=pwrite/Re-pwrite, 10=pread/Re- pread, 11=pwritev/Re-pwritev, 12=preadv/Re-preadv)
-+n No retests selected. Used to prevent retests from running.
-r Used to specify the record size, in Kbytes, to test.
-s Used to specify the size, in Kbytes, of the file to test.
-t Run IOzone in a throughput mode. This option allows the user to specify how many threads or processes to have active during the measurement.

Examples

Note

Remember to have your working directory on the filesystem you are testing!

Sequential Write:    iozone -C -w -c -e -i 0 -+n -r 64k -s 8g -t 8
Sequential Read:     iozone -C -w -c -e -i 1 -+n -r 64k -s 8g -t 8
Random Read / Write: iozone -C -w -c -e -i 2 -+n -r 64k -s 8g -t 8

FIO

Single 4KB random write:       fio --name=random-write --ioengine=posixaio --rw=randwrite --bs=4k --size=4g --numjobs=1 --iodepth=1 --runtime=60 --time_based --end_fsync=1
16 parallel 64KB random write: fio --name=random-write --ioengine=posixaio --rw=randwrite --bs=64k --size=256m --numjobs=16 --iodepth=16 --runtime=60 --time_based --end_fsync=1
Single 1MB random write:       fio --name=random-write --ioengine=posixaio --rw=randwrite --bs=1m --size=16g --numjobs=1 --iodepth=1 --runtime=60 --time_based --end_fsync=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment