Skip to main content

fio

fio(flexible I/O tester) is a tool that will spawn a number of threads or processes doing a particular type of I/O action as specified by the user. The typical use of fio is to write a job file matching the I/O load one wants to simulate.


dd

Seq

dd if=/dev/zero of=/sda2_testfile.dd bs=1M count=4096 oflag=direct

fio

Seq

fio --name=seq_write_test \
    --rw=write \
    --bs=1M \
    --filename=/sda2_testfile.fio \
    --size=20G \
    --ioengine=libaio \
    --direct=1 \
    --group_reporting
fio --name=seq_read_test \
    --rw=read \
    --bs=1M \
    --filename=/sda2_testfile.fio \
    --size=4G \
    --iodepth=64 \
    --ioengine=libaio \
    --direct=1 \
    --runtime=60 \
    --numjobs=4 \
    --group_reporting

Random

fio --name=randwrite_test \
    --rw=randwrite \
    --filename=/sda2_testfile.fio \
    --ioengine=libaio \
    --bs=4k \
    --direct=1 \
    --size=100M \
    --numjobs=4 \
    --iodepth=32 \
    --group_reporting