Skip to content

Commit

Permalink
V0.5.19 (#99)
Browse files Browse the repository at this point in the history
* storageConfiguration tag, so that postgres=9 and =13 can share a pvc

* Prepare next release

* Scaling factor per experiment

* Demo config cleaned

* Docs: Improve config and examples

* Docs: Cleaned

* Configuration: Dockerimage as parameter

* Docs: Cleaned

* Config: MonetDB log file
  • Loading branch information
perdelt committed Jul 4, 2022
1 parent cee4b02 commit 3c055ec
Show file tree
Hide file tree
Showing 12 changed files with 311 additions and 270 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ This Python tools helps **managing benchmark experiments of Database Management
It enables users to configure hardware / software setups for easily repeating tests over varying configurations.

It serves as the **orchestrator** [2] for distributed parallel benchmarking experiments in a Kubernetes Cloud.
This has been tested at Amazon Web Services, Google Cloud, Microsoft Azure, IBM Cloud und Oracle Cloud and at Minikube installations.
This has been tested at Amazon Web Services, Google Cloud, Microsoft Azure, IBM Cloud und Oracle Cloud and at Minikube installations,
running with Citus, Clickhouse, DB2, Exasol, MariaDB, MariaDB Columnstore, MemSQL, MonetDB, MySQL, OmniSci, Oracle DB, PostgreSQL, SingleStore, SQL Server and SAP HANA.

<p align="center">
<img src="https://raw.githubusercontent.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager/master/docs/experiment-with-orchestrator.png" width="800">
Expand All @@ -23,7 +24,7 @@ See the [homepage](https://github.com/Beuth-Erdelt/Benchmark-Experiment-Host-Man
1. Install the package `pip install bexhoma`
1. Make sure you have a working `kubectl` installed
(Also make sure to have access to a running Kubernetes cluster - for example [Minikube](https://minikube.sigs.k8s.io/docs/start/))
1. Adjust configuration [tbd in detail]
1. Adjust [configuration](https://bexhoma.readthedocs.io/en/latest/Config.html)
1. Rename `k8s-cluster.config` to `cluster.config`
1. Set name of context, namespace and name of cluster in that file
1. Install data [tbd in detail]
Expand Down Expand Up @@ -52,8 +53,6 @@ The repository contains a [tool](experiments/tpch/) for running TPC-H (reading)
For full power, use this tool as an orchestrator as in [2]. It also starts a monitoring container using [Prometheus](https://prometheus.io/) and a metrics collector container using [cAdvisor](https://github.com/google/cadvisor). It also uses the Python package [dbmsbenchmarker](https://github.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager) as query executor [2] and evaluator [1].
See the [images](https://github.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager/tree/master/images/) folder for more details.

This module has been tested with Brytlyt, Citus, Clickhouse, DB2, Exasol, Kinetica, MariaDB, MariaDB Columnstore, MemSQL, Mariadb, MonetDB, MySQL, OmniSci, Oracle DB, PostgreSQL, SingleStore, SQL Server and SAP HANA.

## References

[1] [A Framework for Supporting Repetition and Evaluation in the Process of Cloud-Based DBMS Performance Benchmarking](https://doi.org/10.1007/978-3-030-84924-5_6)
Expand All @@ -71,5 +70,3 @@ This module has been tested with Brytlyt, Citus, Clickhouse, DB2, Exasol, Kineti
> In: Nambiar R., Poess M. (eds) Performance Evaluation and Benchmarking. TPCTC 2021.
> Lecture Notes in Computer Science, vol 13169. Springer, Cham.
> https://doi.org/10.1007/978-3-030-94437-7_6
(old, slightly outdated [docs](docs/Docs_old.md))
13 changes: 12 additions & 1 deletion bexhoma/configurations.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,11 @@ def use_storage(self):
storageSize = self.storage['storageSize']
else:
storageSize = ''
if 'storageConfiguration' in self.storage:
storageConfiguration = self.storage['storageConfiguration']
else:
storageConfiguration = ''
self.storage['storageConfiguration'] = ''
else:
use_storage = False
return use_storage
Expand All @@ -489,7 +494,10 @@ def start_sut(self, app='', component='sut', experiment='', configuration=''):
template = "deploymenttemplate-"+self.docker+".yml"
name = self.generate_component_name(app=app, component=component, experiment=experiment, configuration=configuration)
name_worker = self.generate_component_name(app=app, component='worker', experiment=experiment, configuration=configuration)
name_pvc = self.generate_component_name(app=app, component='storage', experiment=self.storage_label, configuration=configuration)
if self.storage['storageConfiguration']:
name_pvc = self.generate_component_name(app=app, component='storage', experiment=self.storage_label, configuration=self.storage['storageConfiguration'])
else:
name_pvc = self.generate_component_name(app=app, component='storage', experiment=self.storage_label, configuration=configuration)
self.logger.debug('configuration.start_sut(name={})'.format(name))
deployments = self.experiment.cluster.getDeployments(app=app, component=component, experiment=experiment, configuration=configuration)
if len(deployments) > 0:
Expand Down Expand Up @@ -643,6 +651,8 @@ def start_sut(self, app='', component='sut', experiment='', configuration=''):
del result[key]['spec']['template']['spec']['containers'][i]['volumeMounts'][j]
if self.dockerimage:
result[key]['spec']['template']['spec']['containers'][i]['image'] = self.dockerimage
else:
self.dockerimage = result[key]['spec']['template']['spec']['containers'][i]['image']
elif not self.monitoring_active:
# remove monitoring containers
if container['name'] == 'cadvisor':
Expand Down Expand Up @@ -1111,6 +1121,7 @@ def run_benchmarker_pod(self, connection=None, code=None, info=[], resultfolder=
c['parameter']['parallelism'] = parallelism
c['parameter']['client'] = client
c['parameter']['numExperiment'] = str(self.numExperimentsDone+1)
c['parameter']['dockerimage'] = self.dockerimage
#print(c)
#print(self.experiment.cluster.config['benchmarker']['jarfolder'])
if isinstance(c['JDBC']['jar'], list):
Expand Down
4 changes: 2 additions & 2 deletions bexhoma/experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,8 @@ def work_benchmark_list(self, intervals=30, stop=True):
#time.sleep(intervals)
self.wait(intervals)
# count number of running and pending pods
num_pods_running = len(self.cluster.getPods(app = self.appname, component = 'sut', status = 'Running'))
num_pods_pending = len(self.cluster.getPods(app = self.appname, component = 'sut', status = 'Pending'))
num_pods_running = len(self.cluster.getPods(app = self.appname, component = 'sut', experiment=self.code, status = 'Running'))
num_pods_pending = len(self.cluster.getPods(app = self.appname, component = 'sut', experiment=self.code, status = 'Pending'))
for config in self.configurations:
# check if sut is running
if not config.sut_is_running():
Expand Down

0 comments on commit 3c055ec

Please sign in to comment.