By default fio is still run in direct mode which is safer for many
benchmarking approach. In some case, you might need to enable the
cached-based IOs.
The "-c" option is now here for enabling this.
ETA=0
MODES="read,write,randread,randwrite"
SHORT_HOSTNAME=
ETA=0
MODES="read,write,randread,randwrite"
SHORT_HOSTNAME=
show_help() {
PROG=$(basename $0)
echo "usage of $PROG:"
cat << EOF
-h : Show this help & exit
show_help() {
PROG=$(basename $0)
echo "usage of $PROG:"
cat << EOF
-h : Show this help & exit
+-c : Enable cached-based IOs
+ by default, fio is run in direct mode
-a : Run sequential test then parallel one
-s : Run sequential test (default value)
one test after another then one disk after another
-a : Run sequential test then parallel one
-s : Run sequential test (default value)
one test after another then one disk after another
ioengine=libaio
invalidate=1
ramp_time=5
ioengine=libaio
invalidate=1
ramp_time=5
EOF
if [ "$RUNTIME" != "0" ]; then
EOF
if [ "$RUNTIME" != "0" ]; then
+if [ "$CACHED_IO" = "FALSE" ]; then
+cat >>$TEMPLATE << EOF
+direct=1
+EOF
+fi
+
-while getopts "hapsd:b:r:m:" opt; do
+while getopts "hacpsd:b:r:m:" opt; do
case $opt in
h)
show_help
case $opt in
h)
show_help
+ c)
+ CACHED_IO="TRUE"
+ ;;
s)
if [ "$SEQ" = "-1" ]; then
SEQ=1
s)
if [ "$SEQ" = "-1" ]; then
SEQ=1