Skip to content
Snippets Groups Projects
Commit 94dc5792 authored by Hannes Mühleisen's avatar Hannes Mühleisen
Browse files

changed installer to incremental updating

parent 12c3c69d
Branches
No related tags found
No related merge requests found
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
PGVER=9.3.4 PGVER=9.3.4
# MonetDB # MonetDB
MVER=11.17.13 MVER=11.17.13
# MariaDB
MAVER=10.0.10
# protobuf stuff, does probably not need to change as fast # protobuf stuff, does probably not need to change as fast
PBVER=2.5.0 PBVER=2.5.0
...@@ -17,56 +19,55 @@ IDIR=$DIR/.install ...@@ -17,56 +19,55 @@ IDIR=$DIR/.install
PINS=$IDIR/postgresql-$PGVER/ PINS=$IDIR/postgresql-$PGVER/
MINS=$IDIR/monetdb-$MVER/ MINS=$IDIR/monetdb-$MVER/
MAINS=$IDIR/mariadb-$MAVER/
PBCINS=$IDIR/protobuf-c-$PBCVER/ PBCINS=$IDIR/protobuf-c-$PBCVER/
PBINS=$IDIR/protobuf-$PBVER/ PBINS=$IDIR/protobuf-$PBVER/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PBINS/lib:$PBCINS/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PBINS/lib:$PBCINS/lib
if [ ! -f $MINS/bin/mserver5 ] || [ ! -f $PINS/bin/postgres ] || [ ! -f $PINS/lib/cstore_fdw.so ] ; then
mkdir -p $SDIR mkdir -p $SDIR
mkdir -p $IDIR mkdir -p $IDIR
# download sources # clean up source dir first
PGURL=http://ftp.postgresql.org/pub/source/v$PGVER/postgresql-$PGVER.tar.gz
MURL=http://www.monetdb.org/downloads/sources/Latest/MonetDB-$MVER.tar.bz2
rm -rf $SDIR/* rm -rf $SDIR/*
wget $PGURL -P $SDIR # MonetDB installer
if [ ! -f $MINS/bin/mserver5 ] ; then
rm -rf $MINS
MURL=http://www.monetdb.org/downloads/sources/Latest/MonetDB-$MVER.tar.bz2
wget $MURL -P $SDIR --no-check-certificate wget $MURL -P $SDIR --no-check-certificate
git clone https://github.com/citusdata/cstore_fdw/ $SDIR/cstore_fdw tar xvf $SDIR/MonetDB-*.tar.* -C $SDIR
MSRC=$SDIR/MonetDB-$MVER/
# download, unpack and install protobuf & protobuf-c, needed for cstore_fdw cd $MSRC
wget https://protobuf.googlecode.com/files/protobuf-$PBVER.tar.gz -P $SDIR ./configure --prefix=$MINS --enable-rubygem=no --enable-python3=no --enable-python2=no --enable-perl=no --enable-geos=no --enable-python=no --enable-geom=no --enable-fits=no --enable-jaql=no --enable-gsl=no --enable-odbc=no --enable-jdbc=no --enable-merocontrol=no
wget https://protobuf-c.googlecode.com/files/protobuf-c-$PBCVER.tar.gz -P $SDIR make -j install
wget http://www.tpc.org/tpch/spec/tpch_2_16_1.zip -P $SDIR cd $DIR
rm -rf $MSRC $SDIR/MonetDB-*.tar.*
rm -rf $IDIR/* fi
# unpack everything
for i in $SDIR/*.tar.*; do tar xvf $i -C $SDIR; done
unzip $SDIR/tpch_*.zip -d $SDIR
# make TPCH dbgen
cd $SDIR/tpch_2_16_1/dbgen
sed -e 's/DATABASE\s*=/DATABASE=DB2/' -e 's/MACHINE\s*=/MACHINE=LINUX/' -e 's/WORKLOAD\s*=/WORKLOAD=TPCH/' -e 's/CC\s*=/CC=gcc/' makefile.suite > Makefile
make
mkdir $IDIR/dbgen/
cp dbgen dists.dss $IDIR/dbgen/
# okay, now compile everything # PostgreSQL installer
if [ ! -f $PINS/bin/postgres ] ; then
rm -rf $PINS
PGURL=http://ftp.postgresql.org/pub/source/v$PGVER/postgresql-$PGVER.tar.gz
wget $PGURL -P $SDIR
tar xvf $SDIR/postgresql-*.tar.* -C $SDIR
PSRC=$SDIR/postgresql-$PGVER/ PSRC=$SDIR/postgresql-$PGVER/
cd $PSRC cd $PSRC
./configure --prefix=$PINS ./configure --prefix=$PINS
make make
make install make install
cd $DIR
rm -rf $PSRC $SDIR/postgresql-*.tar.*
fi
MSRC=$SDIR/MonetDB-$MVER/ # Citusdata installer
cd $MSRC if [ ! -f $PINS/lib/cstore_fdw.so ] ; then
./configure --prefix=$MINS --enable-rubygem=no --enable-python3=no --enable-python2=no --enable-perl=no --enable-geos=no --enable-python=no --enable-geom=no --enable-fits=no --enable-jaql=no --enable-gsl=no --enable-odbc=no --enable-jdbc=no --enable-merocontrol=no git clone https://github.com/citusdata/cstore_fdw/ $SDIR/cstore_fdw
make -j install wget https://protobuf.googlecode.com/files/protobuf-$PBVER.tar.gz -P $SDIR
wget https://protobuf-c.googlecode.com/files/protobuf-c-$PBCVER.tar.gz -P $SDIR
tar xvf $SDIR/protobuf-*.tar.* -C $SDIR
# protobuf and protbuf-c are dependencies of cstore # protobuf and protbuf-c are dependencies of citusdb-store
PBSRC=$SDIR/protobuf-$PBVER/ PBSRC=$SDIR/protobuf-$PBVER/
cd $PBSRC cd $PBSRC
./configure --prefix=$PBINS ./configure --prefix=$PBINS
...@@ -77,16 +78,46 @@ if [ ! -f $MINS/bin/mserver5 ] || [ ! -f $PINS/bin/postgres ] || [ ! -f $PINS/li ...@@ -77,16 +78,46 @@ if [ ! -f $MINS/bin/mserver5 ] || [ ! -f $PINS/bin/postgres ] || [ ! -f $PINS/li
./configure --prefix=$PBCINS CXXFLAGS=-I$IDIR/protobuf-$PBVER/include LDFLAGS=-L$IDIR/protobuf-$PBVER/lib PATH=$PATH:$PBINS/bin/ ./configure --prefix=$PBCINS CXXFLAGS=-I$IDIR/protobuf-$PBVER/include LDFLAGS=-L$IDIR/protobuf-$PBVER/lib PATH=$PATH:$PBINS/bin/
make -j install make -j install
# cstore is a pgplugin, therefore it has to be built last # cstore is a pgplugin
CSRC=$SDIR/cstore_fdw CSRC=$SDIR/cstore_fdw
cd $CSRC cd $CSRC
# some funny include path messing
PATH=$PATH:$PINS/bin/:$PBCINS/bin/ CPATH=$CPATH:$PBCINS/include LIBRARY_PATH=$LIBRARY_PATH:$PBCINS/lib make -j install PATH=$PATH:$PINS/bin/:$PBCINS/bin/ CPATH=$CPATH:$PBCINS/include LIBRARY_PATH=$LIBRARY_PATH:$PBCINS/lib make -j install
cd $DIR
rm -rf $CSRC $PBCSRC $PBSRC $SDIR/protobuf-*.tar.*
fi
# this should be it, check for certain files # MariaDB installer
if [ ! -f $MAINS/bin/mysqld ] ; then
rm -rf $MAINS
MAURL=http://mariadb.mirror.triple-it.nl//mariadb-$MAVER/kvm-tarbake-jaunty-x86/mariadb-$MAVER.tar.gz
wget $MAURL -P $SDIR
tar xvf $SDIR/mariadb-*.tar.* -C $SDIR
MASRC=$SDIR/mariadb-$MAVER/
cd $MASRC
cmake -DCMAKE_INSTALL_PREFIX:PATH=/scratch/hannes/compare/mariadb-install .
make
make install
cd $DIR
rm -rf $MASRC $SDIR/mariadb-*.tar.*
fi
rm -rf $SDIR/* # TPC-H dbgen installer
if [ ! -f $IDIR/dbgen/dbgen ] ; then
rm -rf $IDIR/dbgen/
wget http://www.tpc.org/tpch/spec/tpch_2_16_1.zip -P $SDIR
unzip $SDIR/tpch_*.zip -d $SDIR
cd $SDIR/tpch_2_16_1/dbgen
sed -e 's/DATABASE\s*=/DATABASE=DB2/' -e 's/MACHINE\s*=/MACHINE=LINUX/' -e 's/WORKLOAD\s*=/WORKLOAD=TPCH/' -e 's/CC\s*=/CC=gcc/' makefile.suite > Makefile
make
mkdir $IDIR/dbgen/
cp dbgen dists.dss $IDIR/dbgen/
rm -rf $SDIR/tpch_*
fi fi
# in case something was left
rm -rf $SDIR/*
# some sys setup for PostgreSQL according to Dr. Kyzirakos # some sys setup for PostgreSQL according to Dr. Kyzirakos
...@@ -167,6 +198,7 @@ mkdir -p $FARM ...@@ -167,6 +198,7 @@ mkdir -p $FARM
mkdir -p $QRDIR mkdir -p $QRDIR
TIMINGCMD="/usr/bin/time -o $DIR/.time -f %e " TIMINGCMD="/usr/bin/time -o $DIR/.time -f %e "
TIMEOUTCMD="timeout -k 30m "
for SF in 1 # 5 10 # 1 30 for SF in 1 # 5 10 # 1 30
do do
...@@ -182,7 +214,7 @@ do ...@@ -182,7 +214,7 @@ do
mv *.tbl $SFDDIR mv *.tbl $SFDDIR
fi fi
cd $DIR cd $DIR
for DB in citusdata postgres monetdb for DB in mariadb citusdata postgres monetdb
do do
DBNAME=$DB-sf$SF DBNAME=$DB-sf$SF
DBFARM=$FARM/$DBNAME/ DBFARM=$FARM/$DBNAME/
...@@ -214,6 +246,14 @@ do ...@@ -214,6 +246,14 @@ do
CREATEDBCMD="$PINS/bin/createdb -p $PORT tpch" CREATEDBCMD="$PINS/bin/createdb -p $PORT tpch"
fi fi
if [ "$DB" == "mariadb" ] ; then
SERVERCMD="$MAINS/bin/mysqld --basedir=$MAINS -P $PORT --datadir="
CLIENTCMD="$MAINS/bin/mysql -P $PORT -N tpcd -B <"
INITFCMD=""
CREATEDBCMD=""
fi
if [ ! -d $DBFARM ] ; then if [ ! -d $DBFARM ] ; then
# clear caches (fair loading) # clear caches (fair loading)
#sudo bash -c "echo 3 > /proc/sys/vm/drop_caches" #sudo bash -c "echo 3 > /proc/sys/vm/drop_caches"
...@@ -264,7 +304,7 @@ do ...@@ -264,7 +304,7 @@ do
sleep 5 sleep 5
q=${i%.sql} q=${i%.sql}
qn=`basename $q` qn=`basename $q`
$TIMINGCMD $CLIENTCMD $i > $QRDIR/$DB-SF$SF-coldrun$coldrun-q$qn.out $TIMEOUTCMD $TIMINGCMD $CLIENTCMD $i > $QRDIR/$DB-SF$SF-coldrun$coldrun-q$qn.out
QTIME=`cat $DIR/.time` QTIME=`cat $DIR/.time`
echo -e "$DB\t$SF\tcoldruns\t$qn\t$QTIME" >> $RESFL echo -e "$DB\t$SF\tcoldruns\t$qn\t$QTIME" >> $RESFL
kill `jobs -p` kill `jobs -p`
...@@ -282,7 +322,7 @@ do ...@@ -282,7 +322,7 @@ do
do do
q=${i%.sql} q=${i%.sql}
qn=`basename $q` qn=`basename $q`
$TIMINGCMD $CLIENTCMD $i > $QRDIR/$DB-SF$SF-warmup$warmup-q$qn.out $TIMEOUTCMD $TIMINGCMD $CLIENTCMD $i > $QRDIR/$DB-SF$SF-warmup$warmup-q$qn.out
QTIME=`cat $DIR/.time` QTIME=`cat $DIR/.time`
echo -e "$DB\t$SF\twarmup\t$qn\t$QTIME" >> $RESFL echo -e "$DB\t$SF\twarmup\t$qn\t$QTIME" >> $RESFL
done done
...@@ -295,7 +335,7 @@ do ...@@ -295,7 +335,7 @@ do
do do
q=${i%.sql} q=${i%.sql}
qn=`basename $q` qn=`basename $q`
$TIMINGCMD $CLIENTCMD $i > $QRDIR/$DB-SF$SF-hotrun$hotrun-q$qn.out $TIMEOUTCMD $TIMINGCMD $CLIENTCMD $i > $QRDIR/$DB-SF$SF-hotrun$hotrun-q$qn.out
QTIME=`cat $DIR/.time` QTIME=`cat $DIR/.time`
echo -e "$DB\t$SF\thotruns\t$qn\t$QTIME" >> $RESFL echo -e "$DB\t$SF\thotruns\t$qn\t$QTIME" >> $RESFL
done done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment