This commit is contained in:
Xavier Pillons 2020-03-10 15:15:00 +01:00
Родитель ebde898f87
Коммит 7ca8f58e67
2 изменённых файлов: 25 добавлений и 22 удалений

Просмотреть файл

@ -1,11 +1,16 @@
#!/bin/bash
FILESYSTEM=$1
set -o pipefail
if [ -z "$FILESYSTEM" ]; then
echo "Missing Filesystem parameter"
exit 1
fi
SHARED_APPS=/apps
DIRECTORY=${FILESYSTEM}/testing
RUNTIME=600
echo $FILESYSTEM
export MODULEPATH=${SHARED_APPS}/modulefiles:$MODULEPATH
module load fio
@ -15,21 +20,19 @@ NUMJOBS=`cat $PBS_NODEFILE | wc -l`
for BS in 4K 4M
do
if [ $BS == "4K" ]; then
SIZE=128M
else
SIZE=2G
fi
for RW in write read
do
sync
#fio --name=${RW}_${SIZE} --directory=$DIRECTORY --direct=1 --size=$SIZE --bs=$BS --rw=${RW} --numjobs=$NUMJOBS --group_reporting --runtime=${RUNTIME} --output=fio_direct_${RW}_${SIZE}_${BS}_${PBS_JOBID}.out
fio --name=${RW}_${SIZE} --directory=$DIRECTORY --direct=1 --size=$SIZE --bs=$BS --rw=${RW} --numjobs=$NUMJOBS --group_reporting --runtime=${RUNTIME} | tee -a output.log
rm ${DIRECTORY}/*
sync
sleep 2
#
done
if [ $BS == "4K" ]; then
SIZE=128M
else
SIZE=2G
fi
for RW in write read
do
sync
#fio --name=${RW}_${SIZE} --directory=$DIRECTORY --direct=1 --size=$SIZE --bs=$BS --rw=${RW} --numjobs=$NUMJOBS --group_reporting --runtime=${RUNTIME} --output=fio_direct_${RW}_${SIZE}_${BS}_${PBS_JOBID}.out
fio --name=${RW}_${SIZE} --directory=$DIRECTORY --direct=1 --size=$SIZE --bs=$BS --rw=${RW} --numjobs=$NUMJOBS --group_reporting --runtime=${RUNTIME} | tee -a output.log
rm ${DIRECTORY}/*
sync
sleep 2
done
done
cat output.log

Просмотреть файл

@ -1,18 +1,18 @@
#!/bin/bash
FILESYSTEM=$1
source /etc/profile
module use /usr/share/Modules/modulefiles
file=output.log
outputfile=output.log
#grep -A3 "t_min" ${file} | tr -s ' ' | \
# jq --slurp --raw-input --raw-output 'split("\n") | .[2:-1] | map(split(" ")) | map({"bytes": .[1]|tonumber, "iter": .[2]|tonumber, "t_min": .[3]|tonumber, "t_max": .[4]|tonumber, "t_avg": .[5]|tonumber})' > metrics.json
grep 'READ\|WRITE' output.log | sed 's/(/( /g;s/)/ )/g;s/M/ M/g;s/:/ :/g' | tr -s ' ' | jq --slurp --raw-input --raw-output 'split("\n") | .[:-1] | map(split(" ")) | map({"bytes": .[1], "bandwidth": .[6]|tonumber})' > metrics.json
grep 'READ\|WRITE' $outputfile | sed 's/(/( /g;s/)/ )/g;s/M/ M/g;s/:/ :/g' | tr -s ' ' | jq --slurp --raw-input --raw-output 'split("\n") | .[:-1] | map(split(" ")) | map({"bytes": .[1], "bandwidth": .[6]|tonumber})' > metrics.json
cat <<EOF >app.json
{
"app": "fio",
"benchmark": "readwrite",
"filesystem": "beeond"
"filesystem": "$FILESYSTEM"
}
EOF