Skip to content

Instantly share code, notes, and snippets.

@mdcallag
Created January 24, 2018 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdcallag/3be46dacfaba897bebec65e88d2c37c5 to your computer and use it in GitHub Desktop.
Save mdcallag/3be46dacfaba897bebec65e88d2c37c5 to your computer and use it in GitHub Desktop.
fsync=$1
if [[ $fsync = "no" ]]; then
syncname="--fdatasync"
else
syncname="--fsync"
fi
for nt in 1 4 ; do
for fr in 0 100 1000 10000 ; do
fio --direct=1 --rw=rw --size=2048m --filename=/data/m/test_file.0 --runtime=60 --time_based --ramp_time=5 --bs=16k --randrepeat=0 --numjobs=$nt --name=rw $syncname=$fr > o.fio.nt${nt}.fr${fr}
done
done
for nt in 1 4 ; do
echo nt $nt
for fr in 0 100 1000 10000 ; do
r=$( grep "read :" o.fio.nt${nt}.fr${fr} | awk '{ print $4 }' | tr '=K' ' ' | awk '{ s += $2 } END { print s }' )
w=$( grep write: o.fio.nt${nt}.fr${fr} | awk '{ print $3 }' | tr '=K' ' ' | awk '{ s += $2 } END { print s }' )
printf "%.0f\t" $( echo "scale=0; ($r + $w) / 1024.0" | bc )
done
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment