@@ -16,7 +16,7 @@ Some background and details:
1616
1717Defined 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.
5252To each we have access, using ssh public key authentication, as the ` eventsql ` user.
5353Infrastructure 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
6557Let'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
9486Three ` 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"
9991bash deploy_events_dbs.bash
10092```
10193
@@ -109,9 +101,9 @@ All dbs and app are running now.
109101With ` benchmark-runners ` it is slightly different - we will copy them to target machines but not run just yet.
110102They 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"
115107bash 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
144136Finally, let's run various benchmarks:
145137```
@@ -156,6 +148,10 @@ bash run_single_db_benchmark.bash
156148export EVENTS_RATE=10000
157149export EVENTS_TO_PUBLISH=600000
158150bash 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>
169165export RUNNER1_HOST=<events-db-1-ip>
170166export 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
175171bash 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
179179bash run_multiple_dbs_benchmark.bash
180180```
181181
182182We 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
0 commit comments