Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bd_bench
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
simcaq
bd_bench
Commits
94dc5792
Commit
94dc5792
authored
11 years ago
by
Hannes Mühleisen
Browse files
Options
Downloads
Patches
Plain Diff
changed installer to incremental updating
parent
12c3c69d
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ehannes.sh
+82
-42
82 additions, 42 deletions
ehannes.sh
with
82 additions
and
42 deletions
ehannes.sh
+
82
−
42
View file @
94dc5792
...
@@ -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 c
itusdb-
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
\t
coldruns
\t
$qn
\t
$QTIME
"
>>
$RESFL
echo
-e
"
$DB
\t
$SF
\t
coldruns
\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
\t
warmup
\t
$qn
\t
$QTIME
"
>>
$RESFL
echo
-e
"
$DB
\t
$SF
\t
warmup
\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
\t
hotruns
\t
$qn
\t
$QTIME
"
>>
$RESFL
echo
-e
"
$DB
\t
$SF
\t
hotruns
\t
$qn
\t
$QTIME
"
>>
$RESFL
done
done
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment