Skip to content

Instantly share code, notes, and snippets.

@lilongen
Last active December 26, 2018 03:08
Show Gist options
  • Save lilongen/e955259b4e7c5e8c92d2ba46c7dc6f3a to your computer and use it in GitHub Desktop.
Save lilongen/e955259b4e7c5e8c92d2ba46c7dc6f3a to your computer and use it in GitHub Desktop.
simple.fio.test.script.sh
#!/bin/bash
#
ansible_host=$1
drive=$2
workspace=${drive}/fio
for rw_mode in read write rw randread randwrite randrw; do
for bs in 16k 32k 64k; do
for job_num in 1 2 3; do
ansible ${ansible_host} -f 99 -a "mkdir -p $workspace"
cmd_fio="fio -filename=${workspace}/fiotest -direct=1 -iodepth 1 -thread -rw=${rw_mode} -ioengine=psync -bs=${bs} -size=20G -numjobs=${job_num} -runtime=300 -group_reporting -name=mytest"
ansible ${ansible_host} -f 99 -a "$cmd_fio" > fio.${ansible_host}.bs-${bs}.${rw_mode}.numjobs-${job_num}
sleep 30
done
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment