Skip to content

Instantly share code, notes, and snippets.

@yukirii
Created September 27, 2016 01:43
Show Gist options
  • Save yukirii/8aa23cac53fcdc8e222dbd4a59f8a50f to your computer and use it in GitHub Desktop.
Save yukirii/8aa23cac53fcdc8e222dbd4a59f8a50f to your computer and use it in GitHub Desktop.
#!/bin/bash
# conf
FILENAME=/data/testfile
SIZE=512M
RUNTIME=60
SLEEPTIME=10
# exec
#for NUMJOB in 1 2 4 8 16 32 64 128 256; do
for NUMJOB in 32 64 128 256; do
echo "----- numjobs=$NUMJOB -----"
for TYPE in read write randread randwrite; do
fio -direct=1 -readwrite=$TYPE -group_reporting \
-filename=$FILENAME -size=$SIZE -runtime=$RUNTIME \
-bs=4k -numjobs=$NUMJOB -name=file1 | grep "iops="
echo 3 > /proc/sys/vm/drop_caches
sleep $SLEEPTIME
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment