otherDB_impact_measure.sh
application/x-sh
Filename: otherDB_impact_measure.sh
Type: application/x-sh
Part: 1
#!/bin/bash
##################
### Definition ###
##################
#export PATH="$HOME/project/pg1/postgres/inst/bin:$PATH"
port_pub=5544
port_sub=5545
## prefix
PUB_PREFIX="$HOME/project/pg1/postgres/inst/bin"
## Used source
SOURCE=head
## Number of runs
NUMRUN=3
## Measurement duration
DURATION=900
## Number of clients during a run
NUMCLIENTS=30
###########################
### measure performance ###
###########################
for i in `seq ${NUMRUN}`
do
# Prepare clean enviroment for each measurements
./otherDB_impact_setup.sh $SOURCE
echo "=================="
echo "${SOURCE}_${i}.dat"
echo "=================="
# Do actual measurements
${PUB_PREFIX}/pgbench -p $port_pub -U postgres postgres -c $NUMCLIENTS -j $NUMCLIENTS -T $DURATION -P $NUMCLIENTS > pub_${SOURCE}_${i}.dat &
./pgbench -p $port_sub -U postgres -d db1 -c $NUMCLIENTS -j $NUMCLIENTS -T $DURATION -P $NUMCLIENTS > sub_db1${SOURCE}_${i}.dat
echo "=================="
sleep 10s
done