[why] need to test write, rewrite, read, reread, random write, random read for different block_size.
[How] add judement for variable $block_size to execute iozone command with specificed parameter.
Signed-off-by: Lu Kaiyi 2392863668@qq.com --- tests/iozone | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/tests/iozone b/tests/iozone index 3095ce80..c3b758e9 100755 --- a/tests/iozone +++ b/tests/iozone @@ -1,4 +1,9 @@ #!/bin/sh +# - block_size +# - file_size +# - write_rewrite +# - read_reread +# - random_read_write
## IOzone is a filesystem benchmark tool. The benchmark generates ## and measures a variety of file operations. @@ -7,7 +12,17 @@
for mnt in $mount_points do - cmd="iozone -a -f $mnt/iozonetest" + cmd="iozone" + if [ -n "$block_size" ]; then + cmd+=" -r $block_size" + [ -n "$file_size" ] && cmd+=" -s $file_size" + [ -n "$write_rewrite" ] && cmd+=" -i $write_rewrite" + [ -n "$read_reread" ] && cmd+=" -i $read_reread" + [ -n "$random_read_write" ] && cmd+=" -i $random_read_write" + else + cmd+=" -a" + fi + cmd+=" -f $mnt/iozonetest" log_echo "$cmd &" $cmd > $TMP/iozone-$i & i=$((i+1))
On Thu, Oct 29, 2020 at 10:28:04AM +0800, Lu Kaiyi wrote:
[why] need to test write, rewrite, read, reread, random write, random read for different block_size.
[How] add judement for variable $block_size to execute iozone command with specificed parameter.
Signed-off-by: Lu Kaiyi 2392863668@qq.com
tests/iozone | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/tests/iozone b/tests/iozone index 3095ce80..c3b758e9 100755 --- a/tests/iozone +++ b/tests/iozone @@ -1,4 +1,9 @@ #!/bin/sh +# - block_size +# - file_size +# - write_rewrite +# - read_reread +# - random_read_write
man iozone
-i # Used to specify which tests to run. (0=write/rewrite, 1=read/re-read, 2=random-read/write, 3=Read- backwards, 4=Re-write-record, 5=stride-read, 6=fwrite/re-fwrite, 7=fread/Re-fread, 8=mixed work‐ load, 9=pwrite/Re-pwrite, 10=pread/Re-pread, 11=pwritev/Re-pwritev, 12=preadv/Re-preadv).
And you wrote these in the job:
+write_rewrite: 0 +read_reread: 1 +random_read_write: 2
Well it's kind of awkward solution: - have to remember to set random_read_write to 2. - not convenient to compare results of different tests - explosion of parameters
大家到v4了都没看出这么大的设计问题来?
Better use 1 single parameter
test: value can be one of write|read|rand-rw|read-backwards|rewrite-record|stride-read|...
If want to write 2+ tests, can use "," to separate the 2+ test values.
Thanks, Fengguang
## IOzone is a filesystem benchmark tool. The benchmark generates ## and measures a variety of file operations. @@ -7,7 +12,17 @@
for mnt in $mount_points do
- cmd="iozone -a -f $mnt/iozonetest"
- cmd="iozone"
- if [ -n "$block_size" ]; then
cmd+=" -r $block_size"
[ -n "$file_size" ] && cmd+=" -s $file_size"
[ -n "$write_rewrite" ] && cmd+=" -i $write_rewrite"
[ -n "$read_reread" ] && cmd+=" -i $read_reread"
[ -n "$random_read_write" ] && cmd+=" -i $random_read_write"
- else
cmd+=" -a"
- fi
- cmd+=" -f $mnt/iozonetest" log_echo "$cmd &" $cmd > $TMP/iozone-$i & i=$((i+1))
-- 2.23.0