fio

fio examples

fio is a tool that will spawn a number of threads or processes doing a articular type of I/O action as specified by the user. fio takes a number of global parameters, each inherited by the thread unless otherwise parameters given to them overriding that setting is given.
The typical use of fio is to write a job file matching the I/O load one wants to simulate.

Read test:

$ fio read.ini

read.ini

[readtest]
blocksize=4k
filename=/dev/sdz
rw=randread
direct=1
buffered=0
ioengine=libaio
iodepth=32

Write test:

[writetest]
blocksize=4k