From: Erwan Velu Date: Fri, 12 Jul 2013 15:01:31 +0000 (+0200) Subject: genfio: Adding iodepth support X-Git-Tag: fio-2.1.2~50 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=7d1ca6cfa8c1440ddc095faf7f4e6c8716629838;ds=inline genfio: Adding iodepth support It's useful to be able to specify the iodepth while running fio with libaio. By default, we keep iodepth=1 to keep the same as fio's default. --- diff --git a/tools/genfio b/tools/genfio index 123f6e42..4c1e710d 100755 --- a/tools/genfio +++ b/tools/genfio @@ -32,6 +32,7 @@ SHORT_HOSTNAME= CACHED_IO="FALSE" PREFIX="" PREFIX_FILENAME="" +IODEPTH=1 show_help() { PROG=$(basename $0) @@ -48,6 +49,8 @@ show_help() { -p : Run parallel test one test after anoter but all disks at the same time Enabled by default +-D iodepth : Run with the specified iodepth + Default is 32 -d disk1[,disk2,disk3,..] : Run the tests on the selected disks Separated each disk with a comma Disk name shall be "sdxx", /dev/ shall NOT be used here @@ -90,6 +93,7 @@ gen_template() { cat >$TEMPLATE << EOF [global] ioengine=libaio +iodepth=$IODEPTH invalidate=1 ramp_time=5 EOF @@ -180,7 +184,7 @@ esac } parse_cmdline() { -while getopts "hacpsd:b:r:m:x:" opt; do +while getopts "hacpsd:b:r:m:x:D:" opt; do case $opt in h) show_help @@ -224,6 +228,9 @@ while getopts "hacpsd:b:r:m:x:" opt; do d) DISKS=$OPTARG ;; + D) + IODEPTH=$OPTARG + ;; a) SEQ=2 ;;