Skip to content

Instantly share code, notes, and snippets.

@matthew-n
Created May 2, 2018 16:23
Show Gist options
  • Select an option

  • Save matthew-n/dbba0685eb7fa5a3030f968eff4c11d1 to your computer and use it in GitHub Desktop.

Select an option

Save matthew-n/dbba0685eb7fa5a3030f968eff4c11d1 to your computer and use it in GitHub Desktop.
disk benchmark for database with fio
#!/bin/bash
set -x
set -e
sec_list="seq-read seq-write random-read random-write active-db"
rw_rate_list="75 80 85 90"
io_thread_list="1 4 8 16 24"
for class in $sec_list; do
for ratio in $rw_rate_list; do
for io_thread in $io_thread_list; do
echo "ratio: ${ratio}, io_thread: ${io_thread}"
export ratio
export io_thread
fio --output-format=json --output="result/rw_${ratio}_io_${io_thread}.json" --section=${class} test.fio
done
done
done
@matthew-n
Copy link
Author

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