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
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
bc554809
Commit
bc554809
authored
11 years ago
by
Hannes Mühleisen
Browse files
Options
Downloads
Patches
Plain Diff
more mariadb support and version numbers
parent
12e153d7
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ehannes.sh
+36
-25
36 additions, 25 deletions
ehannes.sh
with
36 additions
and
25 deletions
ehannes.sh
+
36
−
25
View file @
bc554809
...
...
@@ -31,6 +31,9 @@ mkdir -p $IDIR
# clean up source dir first
rm
-rf
$SDIR
/
*
# remove this thing to force a rebuild of the citusdata extension, it might change quickly
rm
$PINS
/lib/cstore_fdw.so
# MonetDB installer
if
[
!
-f
$MINS
/bin/mserver5
]
;
then
rm
-rf
$MINS
...
...
@@ -63,9 +66,11 @@ fi
# Citusdata installer
if
[
!
-f
$PINS
/lib/cstore_fdw.so
]
;
then
git clone https://github.com/citusdata/cstore_fdw/
$SDIR
/cstore_fdw
if
[
!
-f
$PBINS
/bin/protoc
]
||
[
!
-f
$PBCINS
/bin/protoc-c
]
;
then
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
tar
xvf
$SDIR
/protobuf-
$PBVER
.tar.gz
-C
$SDIR
tar
xvf
$SDIR
/protobuf-c-
$PBCVER
.tar.gz
-C
$SDIR
# protobuf and protbuf-c are dependencies of citusdb-store
PBSRC
=
$SDIR
/protobuf-
$PBVER
/
...
...
@@ -77,7 +82,7 @@ if [ ! -f $PINS/lib/cstore_fdw.so ] ; then
cd
$PBCSRC
./configure
--prefix
=
$PBCINS
CXXFLAGS
=
-I
$IDIR
/protobuf-
$PBVER
/include
LDFLAGS
=
-L
$IDIR
/protobuf-
$PBVER
/lib
PATH
=
$PATH
:
$PBINS
/bin/
make
-j
install
fi
# cstore is a pgplugin
CSRC
=
$SDIR
/cstore_fdw
cd
$CSRC
...
...
@@ -119,7 +124,7 @@ fi
rm
-rf
$SDIR
/
*
# some sys setup for PostgreSQL according to Dr. Kyzirakos
# some sys setup for PostgreSQL according to Dr. Kyzirakos
(TM)
### RAM
## 4 GB of RAM
...
...
@@ -198,7 +203,7 @@ mkdir -p $FARM
mkdir
-p
$QRDIR
TIMINGCMD
=
"/usr/bin/time -o
$DIR
/.time -f %e "
TIMEOUTCMD
=
"timeout -k 30m "
TIMEOUTCMD
=
"timeout -k
35m
30m "
for
SF
in
1
# 5 10 # 1 30
do
...
...
@@ -225,6 +230,7 @@ do
CLIENTCMD
=
"
$MINS
/bin/mclient -p
$PORT
"
INITFCMD
=
"echo "
CREATEDBCMD
=
"echo createdb"
DBVER
=
$MVER
fi
if
[
"
$DB
"
==
"postgres"
]
||
[
"
$DB
"
==
"citusdata"
]
;
then
SERVERCMD
=
"
$PINS
/bin/postgres -p
$PORT
\
...
...
@@ -244,7 +250,11 @@ do
CLIENTCMD
=
"
$PINS
/bin/psql -p
$PORT
tpch -t -A -F , -f "
INITFCMD
=
"
$PINS
/bin/initdb -D "
CREATEDBCMD
=
"
$PINS
/bin/createdb -p
$PORT
tpch"
DBVER
=
$PGVER
fi
if
[
"
$DB
"
==
"citusdata"
]
;
then
DBVER
=
snapshot-
`
date
+
"%Y-%m-%d"
`
fi
if
[
"
$DB
"
==
"mariadb"
]
;
then
...
...
@@ -252,6 +262,7 @@ do
CLIENTCMD
=
"
$MAINS
/bin/mysql -P
$PORT
-N tpcd -B <"
INITFCMD
=
""
CREATEDBCMD
=
""
DBVER
=
$MAVER
fi
if
[
!
-d
$DBFARM
]
;
then
...
...
@@ -277,17 +288,17 @@ do
sed
-e
"s|DIR|
$SFDDIR
|"
$SCDIR
/
$DB
.load.sql
>
$DIR
/.
$DB
.load.sql.local
$TIMINGCMD
$CLIENTCMD
$DIR
/.
$DB
.load.sql.local
>
/dev/null
LDTIME
=
`
cat
$DIR
/.time
`
echo
-e
"
$DB
\t
$SF
\t
load
\t\t
$LDTIME
"
>>
$RESFL
echo
-e
"
$DB
\t
$
DBVER
\t
$
SF
\t
load
\t\t
\t
$LDTIME
"
>>
$RESFL
# constraints
$TIMINGCMD
$CLIENTCMD
$SCDIR
/
$DB
.constraints.sql
>
/dev/null
CTTIME
=
`
cat
$DIR
/.time
`
echo
-e
"
$DB
\t
$SF
\t
constraints
\t\t
$CTTIME
"
>>
$RESFL
echo
-e
"
$DB
\t
$
DBVER
\t
$
SF
\t
constraints
\t\t
\t
$CTTIME
"
>>
$RESFL
# analyze/vacuum
$TIMINGCMD
$CLIENTCMD
$SCDIR
/
$DB
.analyze.sql
>
/dev/null
AZTIME
=
`
cat
$DIR
/.time
`
echo
-e
"
$DB
\t
$SF
\t
analyze
\t\t
$AZTIME
"
>>
$RESFL
echo
-e
"
$DB
\t
$
DBVER
\t
$
SF
\t
analyze
\t\t
\t
$AZTIME
"
>>
$RESFL
# aand restart
kill
`
jobs
-p
`
...
...
@@ -295,7 +306,7 @@ do
fi
# we start with cold runs
# clear caches (fair loading)
for
coldrun
in
{
1..2
}
for
REP
in
{
1..2
}
do
for
i
in
$QYDIR
/q??.sql
do
...
...
@@ -306,7 +317,7 @@ do
qn
=
`
basename
$q
`
$TIMEOUTCMD
$TIMINGCMD
$CLIENTCMD
$i
>
$QRDIR
/
$DB
-SF
$SF
-coldrun
$coldrun
-q
$qn
.out
QTIME
=
`
cat
$DIR
/.time
`
echo
-e
"
$DB
\t
$SF
\t
coldruns
\t
$qn
\t
$QTIME
"
>>
$RESFL
echo
-e
"
$DB
\t
$
DBVER
\t
$
SF
\t
coldruns
\t
$qn
\t
$
REP
\t
$
QTIME
"
>>
$RESFL
kill
`
jobs
-p
`
sleep
10
done
...
...
@@ -316,7 +327,7 @@ do
# warmup...
$SERVERCMD$DBFARM
>
/dev/null &
sleep
5
for
warmup
in
{
1..3
}
for
REP
in
{
1..3
}
do
for
i
in
$QYDIR
/q??.sql
do
...
...
@@ -324,7 +335,7 @@ do
qn
=
`
basename
$q
`
$TIMEOUTCMD
$TIMINGCMD
$CLIENTCMD
$i
>
$QRDIR
/
$DB
-SF
$SF
-warmup
$warmup
-q
$qn
.out
QTIME
=
`
cat
$DIR
/.time
`
echo
-e
"
$DB
\t
$SF
\t
warmup
\t
$qn
\t
$QTIME
"
>>
$RESFL
echo
-e
"
$DB
\t
$
DBVER
\t
$
SF
\t
warmup
\t
$qn
\t
$
REP
\t
$
QTIME
"
>>
$RESFL
done
done
...
...
@@ -337,7 +348,7 @@ do
qn
=
`
basename
$q
`
$TIMEOUTCMD
$TIMINGCMD
$CLIENTCMD
$i
>
$QRDIR
/
$DB
-SF
$SF
-hotrun
$hotrun
-q
$qn
.out
QTIME
=
`
cat
$DIR
/.time
`
echo
-e
"
$DB
\t
$SF
\t
hotruns
\t
$qn
\t
$QTIME
"
>>
$RESFL
echo
-e
"
$DB
\t
$
DBVER
\t
$
SF
\t
hotruns
\t
$qn
\t
$
REP
\t
$
QTIME
"
>>
$RESFL
done
done
kill
`
jobs
-p
`
...
...
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