Page MenuHomec4science

benchmark_io.sh
No OneTemporary

File Metadata

Created
Fri, Apr 26, 10:23

benchmark_io.sh

#!/bin/bash
SIZES='1 10 100'
INSTANCES=$(echo -n c4science-app0{0..1}; echo -n " c4science-phd00")
for s in $SIZES; do
CMD_W="sync; dd if=/dev/zero of=/var/repo/test bs=1M count=$s oflag=dsync 2>&1"
CMD_R="sysctl -w vm.drop_caches=3; dd if=/var/repo/test of=/dev/null bs=1M count=$s oflag=dsync 2>&1"
echo "> Write ${s}M"
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 ${s}M"
for n in $INSTANCES; do
echo -en " $n: "
ssh $n "$CMD_R" 2> /dev/null | grep copied | awk '{print $6 " sec, ", $8, $9}'
done
done

Event Timeline