Skip to content

Commit c2742c0

Browse files
authored
Merge pull request #13 from BinaryIgor/new-benchmarks
New benchmarks
2 parents 1a3d812 + 657198e commit c2742c0

20 files changed

Lines changed: 1387 additions & 720 deletions

benchmarks/README.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Some background and details:
1616

1717
Defined in the `prepare_infra.py` script; sometimes resources are limited by `docker run` command, but essentially:
1818
* *benchmarks-app (consumer)* runs on 2 GB and 2 CPUs (AMD) machine
19-
* each *events-db* runs on 8 GB and 4 CPUs (AMD) machine
19+
* each *events-db* runs on 16 GB and 8 CPUs (AMD) machine
2020
* each *benchmarks-runner* runs alongside *events-db*
2121
* there is a basic firewall and virtual private network (vpc) setup (`prepare_infra.py`), so that nobody is bothering us during benchmarks
2222

@@ -52,14 +52,6 @@ We right now have four machines connected to each other by the vpc.
5252
To each we have access, using ssh public key authentication, as the `eventsql` user.
5353
Infrastructure is now ready, let's prepare apps.
5454

55-
### EventSQL
56-
57-
Before building apps, make sure that EventSQL is available on your machine, since it's their dependency. Just run:
58-
```
59-
mvn clean install
60-
```
61-
From the root repo directory.
62-
6355
### Apps
6456

6557
Let's build `events-db` (from scripts dir again):
@@ -93,9 +85,9 @@ We deploy by copying gzipped Docker images alongside with load and run scripts t
9385

9486
Three `events-dbs`:
9587
```
96-
export EVENTS_DB0_HOST=<ip of events-db-0 machine"
97-
export EVENTS_DB1_HOST=<ip of events-db-1 machine"
98-
export EVENTS_DB2_HOST=<ip of events-db-2 machine"
88+
export EVENTS_DB0_HOST=<public ip of events-db-0 machine"
89+
export EVENTS_DB1_HOST=<public ip of events-db-1 machine"
90+
export EVENTS_DB2_HOST=<public ip of events-db-2 machine"
9991
bash deploy_events_dbs.bash
10092
```
10193

@@ -109,9 +101,9 @@ All dbs and app are running now.
109101
With `benchmark-runners` it is slightly different - we will copy them to target machines but not run just yet.
110102
They will run on the same machines dbs are hosted; each db has a corresponding benchmarks-runner:
111103
```
112-
export EVENTS_DB0_HOST=<ip of events-db-0 machine"
113-
export EVENTS_DB1_HOST=<ip of events-db-1 machine"
114-
export EVENTS_DB2_HOST=<ip of events-db-2 machine"
104+
export EVENTS_DB0_HOST=<public ip of events-db-0 machine"
105+
export EVENTS_DB1_HOST=<public ip of events-db-1 machine"
106+
export EVENTS_DB2_HOST=<public ip of events-db-2 machine"
115107
bash deploy_runners.bash
116108
```
117109

@@ -139,7 +131,7 @@ Stats collected, sleeping for 10 s...
139131
...
140132
```
141133

142-
You might do the same for the consumer machine to its stats as well.
134+
You might do the same for the consumer machine to see its stats as well.
143135

144136
Finally, let's run various benchmarks:
145137
```
@@ -156,6 +148,10 @@ bash run_single_db_benchmark.bash
156148
export EVENTS_RATE=10000
157149
export EVENTS_TO_PUBLISH=600000
158150
bash run_single_db_benchmark.bash
151+
152+
export EVENTS_RATE=15000
153+
export EVENTS_TO_PUBLISH=900000
154+
bash run_single_db_benchmark.bash
159155
```
160156

161157
### Multiple dbs
@@ -169,20 +165,24 @@ export RUNNER0_HOST=<events-db-0-ip>
169165
export RUNNER1_HOST=<events-db-1-ip>
170166
export RUNNER2_HOST=<events-db-2-ip>
171167
172-
export EVENTS_RATE=5000
168+
export EVENTS_RATE=10000
173169
# EVENTS_RATE * 60 for benchmark to last approximately 1 minute
174-
export EVENTS_TO_PUBLISH=300000
170+
export EVENTS_TO_PUBLISH=600000
175171
bash run_multiple_dbs_benchmark.bash
176172
177-
export EVENTS_RATE=10000
178-
export EVENTS_TO_PUBLISH=600000
173+
export EVENTS_RATE=15000
174+
export EVENTS_TO_PUBLISH=900000
175+
bash run_multiple_dbs_benchmark.bash
176+
177+
export EVENTS_RATE=20000
178+
export EVENTS_TO_PUBLISH=1200000
179179
bash run_multiple_dbs_benchmark.bash
180180
```
181181

182182
We have 3 dbs (shards), so real rates are:
183183
```
184-
3 * 5000 = 15 000 per second
185-
3 * 10000 = 30 000 per second
184+
3 * 10000 = 30 000 per second
185+
3 * 15000 = 45 000 per second
186186
```
187187
...which is quite a lot!
188188

benchmarks/droplets.png

-2.29 KB
Loading

benchmarks/events-db-mariadb/build_and_package.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ tag="${TAG:-latest}"
77
tagged_image="${app}:${tag}"
88
volume_dir="${EVENTS_DB_VOLUME_DIR:-/home/eventsql/${app}_volume}"
99
volume="-v $volume_dir:/var/lib/mysql"
10-
memory_limit="${MEMORY_LIMIT:-8G}"
11-
cpus_limit="${CPUS_LIMIT:-4}"
10+
memory_limit="${MEMORY_LIMIT:-16G}"
11+
cpus_limit="${CPUS_LIMIT:-8}"
1212

1313
echo "Creating package in dist directory for $tagged_image image..."
1414
echo "Preparing dist dir..."

benchmarks/events-db-mysql/build_and_package.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ tag="${TAG:-latest}"
77
tagged_image="${app}:${tag}"
88
volume_dir="${EVENTS_DB_VOLUME_DIR:-/home/eventsql/${app}_volume}"
99
volume="-v $volume_dir:/var/lib/mysql"
10-
memory_limit="${MEMORY_LIMIT:-8G}"
11-
cpus_limit="${CPUS_LIMIT:-4}"
10+
memory_limit="${MEMORY_LIMIT:-16G}"
11+
cpus_limit="${CPUS_LIMIT:-8}"
1212

1313
echo "Creating package in dist directory for $tagged_image image..."
1414
echo "Preparing dist dir..."

benchmarks/events-db/build_and_package.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ tag="${TAG:-latest}"
77
tagged_image="${app}:${tag}"
88
volume_dir="${EVENTS_DB_VOLUME_DIR:-/home/eventsql/${app}_volume}"
99
volume="-v $volume_dir:/var/lib/postgresql/data"
10-
memory_limit="${MEMORY_LIMIT:-8G}"
11-
cpus_limit="${CPUS_LIMIT:-4}"
10+
memory_limit="${MEMORY_LIMIT:-16G}"
11+
cpus_limit="${CPUS_LIMIT:-8}"
1212

1313
echo "Creating package in dist directory for $tagged_image image..."
1414
echo "Preparing dist dir..."

benchmarks/results/multiple_dbs_1800_000_events_30_000_per_second_rate.txt

Lines changed: 0 additions & 148 deletions
This file was deleted.

0 commit comments

Comments
 (0)