azure-linux-automation/remote-scripts/run-ycsb.sh

65 строки
2.4 KiB
Bash
Исходник Обычный вид История

Merging branch to upstream. (#10) * Added new test script for Middlewarw Mongodb benchmark tets * Minor fixes for mongodb perf test * Updated mogngodb test cycle name * Added new test script for FIO perf benchmark test * Minor fix * Minor fix * Minor fix * minor fix * Minor fix for collecting test logs * Updated mongodb code for logs collection * Minor fix for ci logs * Updated FIO test code for proper logs collection * Minor fix * Minor fix for log file names * Minor fix for mongodb ycsb logs collection * Minor fix cleanup VM * Minor fix cleanup VM * Minor fix * Minor fixes for FIO test * Added New script for build linux-next deb package * Added New script for build linux-next deb package * minor fixes * Minor fixes * updated linux-next build deb pack script * Updated instance size Linux-next build deb test * Minor fixes for Linux-next build deb pack test * Minor fixes for Linux-next build deb pack test * Updated the test script to store the deb pack in new loaction * Minor fix * removed duplicate deployment type * Minor fix for distro names * Minor fix * Minor fix for deb package staore loaction * Updated "updaterepos" with new distro name format * Uppercase the distribution name * Updated the UDP net perf test script to run test with given buffer sizes and upload the data loss in database * Reating dummy Documentation/Changes file to avoid .deb creation failure * updated unlimitted bandwidth option for UDP test * Added ARM SAs * Added duration90 secs * Fixed conflicts. * Update NttcpTestPlanFull.csv * Minor fix for fio test
2016-12-08 13:49:50 +03:00
#!/bin/bash
#
# It runs the ycsb bechmark test on given server
# ./run-ycsb.sh
#######
CONSTANTS_FILE="/root/constants.sh"
if [ -e ${CONSTANTS_FILE} ]; then
source ${CONSTANTS_FILE}
else
errMsg="Error: missing ${CONSTANTS_FILE} file"
LogMsg "${errMsg}"
echo "${errMsg}" >> ~/summary.log
UpdateTestState $ICA_TESTABORTED
exit 10
fi
log_folder="/root/benchmark/mongodb/logs"
echo "Running ycsb benchmark test on server $MD_SERVER"
ssh root@${MD_SERVER} mkdir -p $log_folder
t=0
while [ "x${test_threads_collection[$t]}" != "x" ]
do
threads=${test_threads_collection[$t]}
echo "TEST RUNNING WITH: $threads threads"
# prepare running mongodb-server
echo "prepare running mongodb-server"
ssh root@${MD_SERVER} "mkdir -p $log_folder/$threads"
ssh root@${MD_SERVER} "sar -n DEV 1 ${maxexecutiontime} 2>&1 > $log_folder/$threads/$threads-mongodb-server.sar.netio.log " &
ssh root@${MD_SERVER} "iostat -x -d 1 ${maxexecutiontime} 2>&1 > $log_folder/$threads/$threads-mongodb-server.iostat.diskio.log " &
ssh root@${MD_SERVER} "vmstat 1 ${maxexecutiontime} 2>&1 > $log_folder/$threads/$threads-mongodb-server.vmstat.memory.cpu.log " &
# prepare running mongodb-benchmark(ycsb)
echo "prepare running mongodb-benchmark(ycsb)"
mkdir -p $log_folder/$threads
sar -n DEV 1 ${maxexecutiontime} 2>&1 > $log_folder/$threads/$threads-mongodb-client.sar.netio.log &
iostat -x -d 1 ${maxexecutiontime} 2>&1 > $log_folder/$threads/$threads-mongodb-client.iostat.diskio.log &
vmstat 1 ${maxexecutiontime} 2>&1 > $log_folder/$threads/$threads-mongodb-client.vmstat.memory.cpu.log &
#start running the mongodb(ycsb)-benchmark on client
echo "-> TEST RUNNING with threads $threads .."
echo "CMD: ./ycsb-0.5.0/bin/ycsb run mongodb-async -s -P workloadAzure -p mongodb.url=mongodb://${MD_SERVER}:27017/ycsb?w=0 -threads $threads > $log_folder/$threads/$threads.ycsb.run.log"
./ycsb-0.5.0/bin/ycsb run mongodb-async -s -P workloadAzure -p mongodb.url=mongodb://${MD_SERVER}:27017/ycsb?w=0 -threads $threads > $log_folder/$threads/$threads-mongodb.ycsb.run.log
echo "-> TEST END with threads $threads"
#cleanup mongodb-server
echo "cleanup mongodb-server"
ssh root@${MD_SERVER} pkill -f sar
ssh root@${MD_SERVER} pkill -f iostat
ssh root@${MD_SERVER} pkill -f vmstat
#cleanup mongodb-benchmark(ycsb)
echo "cleanup mongodb-benchmark(ycsb)"
pkill -f sar
pkill -f iostat
pkill -f vmstat
echo "sleep 60 seconds"
sleep 60
t=$(($t + 1))
echo "$t"
done