Created
January 24, 2018 16:03
-
-
Save mdcallag/3be46dacfaba897bebec65e88d2c37c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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