Skip to content

Instantly share code, notes, and snippets.

@DavidGarciaCat
Created August 8, 2016 14:47
Show Gist options
  • Select an option

  • Save DavidGarciaCat/8f067b0cb4d616362fca3cb35da9fd82 to your computer and use it in GitHub Desktop.

Select an option

Save DavidGarciaCat/8f067b0cb4d616362fca3cb35da9fd82 to your computer and use it in GitHub Desktop.
Flexible I/O tester - Disk IO performance inspector
#!/bin/sh
if [ ! -d /mnt/fio_test ]; then mkdir /mnt/fio_test; fi
for RUN in 1 2; do
rm -f /mnt/fio_test/*
fio --directory=/mnt/fio_test \
--name fio_test_file --direct=1 --rw=randread --bs=16k --size=1G \
--numjobs=2 --time_based --runtime=180 --group_reporting --norandommap
sleep 5
done
rm -f /mnt/fio_test/*
fio --directory=/mnt/fio_test \
--name fio_test_file --direct=1 --rw=randread --bs=16k --size=1G \
--numjobs=2 --time_based --runtime=180 --group_reporting --norandommap 2>&1 | tee 16k_read_test.txt
for RUN in 1 2; do
rm -f /mnt/fio_test/*
fio --directory=/mnt/fio_test \
--name fio_test_file --direct=1 --rw=randread --bs=256k --size=1G \
--numjobs=2 --time_based --runtime=180 --group_reporting --norandommap
sleep 5
done
rm -f /mnt/fio_test/*
fio --directory=/mnt/fio_test \
--name fio_test_file --direct=1 --rw=randread --bs=256k --size=1G \
--numjobs=2 --time_based --runtime=180 --group_reporting --norandommap 2>&1 | tee 256k_read_test.txt
for RUN in 1 2; do
rm -f /mnt/fio_test/*
fio --directory=/mnt/fio_test \
--name fio_test_file --direct=1 --rw=randwrite --bs=16k --size=1G \
--numjobs=2 --time_based --runtime=180 --group_reporting --norandommap
sleep 5
done
rm -f /mnt/fio_test/*
fio --directory=/mnt/fio_test \
--name fio_test_file --direct=1 --rw=randwrite --bs=16k --size=1G \
--numjobs=2 --time_based --runtime=180 --group_reporting --norandommap 2>&1 | tee 16k_write_test.txt
for RUN in 1 2; do
rm -f /mnt/fio_test/*
fio --directory=/mnt/fio_test \
--name fio_test_file --direct=1 --rw=randwrite --bs=256k --size=1G \
--numjobs=2 --time_based --runtime=180 --group_reporting --norandommap
sleep 5
done
rm -f /mnt/fio_test/*
fio --directory=/mnt/fio_test \
--name fio_test_file --direct=1 --rw=randwrite --bs=256k --size=1G \
--numjobs=2 --time_based --runtime=180 --group_reporting --norandommap 2>&1 | tee 256k_write_test.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment