diff --git a/utils/benchmark_io.sh b/utils/benchmark_io.sh index 027170f..5015483 100755 --- a/utils/benchmark_io.sh +++ b/utils/benchmark_io.sh @@ -1,15 +1,17 @@ #!/bin/bash +CMD_W='sync; dd if=/dev/zero of=/var/repo/test bs=1M count=100 2>&1; sync' +CMD_R='sysctl -w vm.drop_caches=3; dd if=/var/repo/test of=/dev/null bs=1M count=100 2>&1' +INSTANCES=$(echo -n c4science-app0{0..1}; echo -n " c4science-phd00") + echo "> Write 100M" -CMD='sync; dd if=/dev/zero of=/var/repo/test bs=1M count=100 2>&1; sync' -for n in {0..1}; do - echo -en " c4science-app0$n: " - ssh c4science-app0$n "$CMD" 2> /dev/null | grep copied | awk '{print $6 " sec, ", $8, $9}' +for n in $INSTANCES; do + echo -en " $n: " + ssh $n "$CMD_W" 2> /dev/null | grep copied | awk '{print $6 " sec, ", $8, $9}' done echo "> Read 100M" -CMD='sysctl -w vm.drop_caches=3; dd if=/var/repo/test of=/dev/null bs=1M count=100 2>&1' -for n in {0..1}; do - echo -en " c4science-app0$n: " - ssh c4science-app0$n "$CMD" 2> /dev/null | grep copied | awk '{print $6 " sec, ", $8, $9}' +for n in $INSTANCES; do + echo -en " $n: " + ssh $n "$CMD_R" 2> /dev/null | grep copied | awk '{print $6 " sec, ", $8, $9}' done