Metadata-Version: 2.4
Name: bexhoma
Version: 0.13.0
Summary: This python tools helps managing DBMS benchmarking experiments in a Kubernetes-based HPC cluster environment. It enables users to configure hardware / software setups for easily repeating tests over varying configurations.
Author-email: "Patrick K. Erdelt" <patrick.erdelt@bht-berlin.de>
License-Expression: AGPL-3.0-or-later
Project-URL: Homepage, https://github.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager
Project-URL: Repository, https://github.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager
Project-URL: Documentation, https://bexhoma.readthedocs.io
Project-URL: Changelog, https://github.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager/releases
Project-URL: Issues, https://github.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager/issues
Keywords: DBMS,benchmarking,performance evaluation,Kubernetes,cloud-native,reproducibility
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Database
Classifier: Topic :: System :: Benchmark
Requires-Python: >=3.10.2
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: urllib3==2.8.0
Requires-Dist: kubernetes==37.0.3
Requires-Dist: psutil>=7.2.2
Requires-Dist: dbmsbenchmarker>=0.17.0
Requires-Dist: myst_parser
Requires-Dist: HiYaPyCo==0.7.0
Requires-Dist: mistune>=3.4.0
Requires-Dist: numpy>=1.22.2
Requires-Dist: setuptools>=78.1.1
Requires-Dist: Werkzeug>=3.0.6
Requires-Dist: pillow>=12.2.0
Requires-Dist: fonttools>=4.65.0
Requires-Dist: dash>=4.5.0
Requires-Dist: pyarrow>=25.0.1
Requires-Dist: requests==2.34.2
Requires-Dist: prettytable
Requires-Dist: cryptography>=50.0.2
Requires-Dist: zipp>=4.1.2
Requires-Dist: seaborn>=0.13.2
Requires-Dist: idna>=3.20
Requires-Dist: ipython
Requires-Dist: pyasn1>=0.6.5
Provides-Extra: agent
Requires-Dist: openai>=1.0; extra == "agent"
Requires-Dist: python-dotenv>=1.0; extra == "agent"
Requires-Dist: httpx>=0.27; extra == "agent"
Dynamic: license-file

<p align="center">
    <picture>
        <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager/master/docs/logo/bexhoma-logo-1-lockup-dark.svg">
        <img src="https://raw.githubusercontent.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager/master/docs/logo/bexhoma-banner.png" alt="Bexhoma logo" width="500">
    </picture>
</p>

[![Maintained](https://img.shields.io/maintenance/yes/2026.svg)](https://github.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager)
[![GitHub release](https://img.shields.io/github/release/Beuth-Erdelt/Benchmark-Experiment-Host-Manager.svg)](https://GitHub.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager/releases/)
[![PyPI version](https://badge.fury.io/py/bexhoma.svg)](https://badge.fury.io/py/bexhoma)
[![Python versions](https://img.shields.io/pypi/pyversions/bexhoma.svg)](https://pypi.org/project/bexhoma/)
[![Documentation Status](https://app.readthedocs.org/projects/bexhoma/badge/?version=latest)](https://bexhoma.readthedocs.io/en/latest/?badge=latest)
[![Tests](https://github.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager/actions/workflows/tests.yml)
[![Demo runs](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FBeuth-Erdelt%2FBenchmark-Experiment-Host-Manager%2Fmaster%2Flogs_tests%2Fdemo-runs-badge.json)](https://github.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager/blob/master/logs_tests/SUMMARY.md)
[![License](https://img.shields.io/github/license/Beuth-Erdelt/Benchmark-Experiment-Host-Manager)](LICENSE)

![Kubernetes](https://img.shields.io/badge/Kubernetes-326CE5?logo=kubernetes&logoColor=white)
![Docker](https://img.shields.io/badge/Docker-2496ED?logo=docker&logoColor=white)
![PostgreSQL](https://img.shields.io/badge/PostgreSQL-4169E1?logo=postgresql&logoColor=white)
![Python](https://img.shields.io/badge/Python-3776AB?logo=python&logoColor=white)
![Prometheus](https://img.shields.io/badge/Prometheus-E6522C?logo=prometheus&logoColor=white)

![DB Workloads](https://img.shields.io/badge/DB%20Workloads-TPC--C%20%7C%20TPC--H%20%7C%20TPC--DS%20%7C%20SSB%20%7C%20YCSB-informational)
![Micro-Benchmarks](https://img.shields.io/badge/Micro--Benchmarks-fio%20%7C%20sysbench%20%7C%20netperf%20%7C%20sockperf-informational)

# Benchmark Experiment Host Manager (Bexhoma)

**Orchestrating cloud-native DBMS benchmarking experiments on Kubernetes.**

Bexhoma manages benchmark experiments of Database Management Systems (DBMS) in a Kubernetes-based cluster environment.
It lets you configure hardware and software setups and repeat tests across varying configurations — all with a single command.

<p align="center">
    <img src="https://raw.githubusercontent.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager/master/docs/workflow-sketch-simple.png" width="800">
</p>

**Benchmarks:** YCSB · TPC-H · TPC-DS · TPC-C (HammerDB and Benchbase) · SSB (star and flat)

**Tested DBMSs:** Apache Cassandra, CedarDB, Citus (Hyperscale), Clickhouse, CockroachDB, Dragonfly, Exasol, Garnet, IBM DB2, MariaDB, MariaDB Columnstore, MemSQL (SingleStore), MonetDB, MySQL, OmniSci (HEAVY.AI), Oracle DB, OrioleDB, PgDuckDB, PostgreSQL, Redis, SQL Server, SAP HANA, TiDB, TimescaleDB, Valkey, Vertica, YugabyteDB

**Tested cloud platforms:** Amazon Web Services · Google Cloud · Microsoft Azure · IBM Cloud · Oracle Cloud · Minikube

Bexhoma acts as the **orchestrator** [2] for distributed parallel benchmarking experiments.
The basic workflow is: start a containerised DBMS, deploy monitoring, import data, run benchmarks, and shut everything down — with a single command.
A more advanced workflow plans a sequence of such experiments, runs them as a batch, and joins results for comparison.

Bexhoma also supports scaling out data-loading and benchmarking drivers to simulate cloud-native environments, as described in [4].
See [example results](https://github.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager/tree/master/TPCTC23) from [A Cloud-Native Adoption of Classical DBMS Performance Benchmarks and Tools](http://dx.doi.org/10.13140/RG.2.2.29866.18880).

[Documentation](https://bexhoma.readthedocs.io/en/stable/) · [Issue tracker](https://github.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager/issues)

## Installation

1. Install the package:
   ```
   pip install bexhoma
   ```
   This requires Java and build tools.

1. Ensure `kubectl` is installed and configured for a running Kubernetes cluster (e.g. [Minikube](https://minikube.sigs.k8s.io/docs/start/)) with dynamic PVC provisioning.

1. Copy and adjust the cluster configuration:
   ```
   cp k8s-cluster.config cluster.config
   ```
   Set the context name, namespace, and cluster name.
   Ensure `resultfolder` points to an existing directory on your local filesystem.
   See the full [configuration guide](https://bexhoma.readthedocs.io/en/latest/Config.html).

1. Optionally adjust the shared volume manifests before the first run:
   - [`k8s/pvc-bexhoma-results.yml`](https://github.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager/blob/master/k8s/pvc-bexhoma-results.yml) — set `storageClassName` (`ReadWriteMany`) and `storage` size
   - [`k8s/pvc-bexhoma-data.yml`](https://github.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager/blob/master/k8s/pvc-bexhoma-data.yml) — same

   All other components (monitoring, message queue, evaluator) are deployed automatically on first use.

> **Optional:** Install a conda environment: `conda create -n "bexhoma" python=3.14.2 ipython`

> **Optional:** Install Jupyter for notebooks: `conda install -c conda-forge jupyter`

## Quickstart

Each command below installs PostgreSQL, loads data, runs the benchmark, and prints a summary.
Monitor progress with `bexhoma status` while running.

### YCSB

```bash
bexhoma ycsb run -ms 1 -sf 1 -xwl a -dbms PostgreSQL \
  -xtb 16384 -nlp 1 -nlt 64 -xnlf 4 -nbp 1,8 -nbt 64 -xnbf 2,3
```

Loads 1 million rows, then runs workload A (50% reads / 50% updates, 1 million operations) targeting 32,768 ops/s (16,384 × 2) and 49,152 ops/s (16,384 × 3). Each target is tested with 64 driver threads as a single pod and again split across 8 pods.

See more details in the [YCSB example](https://bexhoma.readthedocs.io/en/latest/Example-YCSB.html).

### TPC-C (HammerDB)

```bash
bexhoma hammerdb run -ms 1 -sf 16 -xsd 5 -dbms PostgreSQL \
  -nlt 16 -nbp 1,2 -nbt 16
```

Loads a TPC-C schema with 16 warehouses using 16 loader threads, then benchmarks for 5 minutes with 16 virtual users — first in a single pod, then split across 2 pods.

See more details in the [HammerDB example](https://bexhoma.readthedocs.io/en/latest/Example-HammerDB.html).

### TPC-C (Benchbase)

```bash
bexhoma benchbase run -ms 1 -sf 16 -xsd 5 -dbms PostgreSQL \
  -nbp 1,2 -nbt 16 -xnbf 16 -xtb 1024
```

Loads a TPC-C schema with 16 warehouses, then benchmarks for 5 minutes targeting 16,384 ops/s (1,024 × 16) with 16 threads — first in a single pod, then split across 2 pods.

See more details in the [Benchbase example](https://bexhoma.readthedocs.io/en/latest/Example-Benchbase.html).

### TPC-H

```bash
bexhoma tpch run -ms 1 -dbms PostgreSQL
```

Loads 1 GB of TPC-H data (scale factor 1) and runs all 22 decision-support queries with a single client.

See more details in the [TPC-H example](https://bexhoma.readthedocs.io/en/latest/Example-TPC-H.html).

### TPC-DS

```bash
bexhoma tpcds run -ms 1 -dbms PostgreSQL
```

Loads 1 GB of TPC-DS data (scale factor 1) and runs all 99 decision-support queries with a single client.

See more details in the [TPC-DS example](https://bexhoma.readthedocs.io/en/latest/Example-TPC-DS.html).

### SSB

```bash
bexhoma ssb run -ms 1 -dbms PostgreSQL
```

Generates Star Schema Benchmark data (scale factor 1) and runs its 13 queries with a single client. `-xsv flat` uses one denormalized table instead of the star schema, `-xqv random` draws random query parameters.

See more details in the [SSB example](https://bexhoma.readthedocs.io/en/latest/Example-SSB.html).

### Hardware (fio)

```bash
bexhoma hardware run -ms 1 -dbms Hardware -xht fio -xts 1G -xtd 30 -xfrw randread -xfbs 4k -xfid 16 -xfe libaio -nbp 1 -nbt 1 -ne 1
```

Runs a single 30-second fio random-read test at 4k block size and queue depth 16 directly against a dedicated SUT container over SSH, bypassing any DBMS.

See more details in the [fio disk benchmark example](https://bexhoma.readthedocs.io/en/latest/Example-Hardware.html#fio-disk-benchmarks).

### Hardware (sysbench)

```bash
bexhoma hardware run -ms 1 -dbms Hardware -xht sysbench -xtd 30 -nbp 1 -nbt 4 -ne 1
```

Runs a single 30-second sysbench CPU/memory test with 4 threads directly against a dedicated SUT container over SSH, bypassing any DBMS.

See more details in the [sysbench CPU benchmark example](https://bexhoma.readthedocs.io/en/latest/Example-Hardware.html#sysbench-cpu-noisy-neighbor-benchmarks).

### Hardware (sockperf)

```bash
bexhoma hardware run -ms 1 -dbms Hardware -xht sockperf -xtd 300 -xspm ul -xspr max -xsps 8192 -xspp tcp -nbp 1 -nbt 1 -ne 1
```

Runs a single 5-minute sockperf under-load test over TCP at message size 8192 bytes (PostgreSQL's page size, `BLCKSZ`) directly against a dedicated SUT container, bypassing any DBMS.

See more details in the [sockperf network benchmark example](https://bexhoma.readthedocs.io/en/latest/Example-Hardware.html#sockperf-network-benchmarks).

## Architecture

Bexhoma deploys [Prometheus](https://prometheus.io/) for monitoring and [cAdvisor](https://github.com/google/cadvisor) on every cluster node for resource metrics, unless the cluster has a Prometheus already.
For analytical benchmarks the [dbmsbenchmarker](https://github.com/Beuth-Erdelt/DBMS-Benchmarker) package [3] is used as query executor and evaluator [1,2].
For transactional workloads, HammerDB, Benchbase, and YCSB act as drivers [4].

<p align="center">
    <img src="https://raw.githubusercontent.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager/master/docs/experiment-with-orchestrator.png" width="800">
</p>

See the [`images/`](https://github.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager/tree/master/images/) folder for more details.

## Contributing

We welcome contributions of all kinds — code, documentation, bug reports, and more.
Please first read the [contribution guide](https://bexhoma.readthedocs.io/en/latest/CONTRIBUTING.html).

If you find a bug, please open an issue on the [issue tracker](https://github.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager/issues) and include:

- Operating system and architecture
- Python version
- Bexhoma version (or git commit / date)
- Full traceback

## References

If you use Bexhoma in work contributing to a scientific publication, please cite [2] or [1]:

**[1]** Erdelt P.K. (2021). *A Framework for Supporting Repetition and Evaluation in the Process of Cloud-Based DBMS Performance Benchmarking.* TPCTC 2020, LNCS 12752, Springer.  
https://doi.org/10.1007/978-3-030-84924-5_6

**[2]** Erdelt P.K. (2022). *Orchestrating DBMS Benchmarking in the Cloud with Kubernetes.* TPCTC 2021, LNCS 13169, Springer.  
https://doi.org/10.1007/978-3-030-94437-7_6

**[3]** Erdelt P.K., Jestel J. (2022). *DBMS-Benchmarker: Benchmark and Evaluate DBMS in Python.* JOSS 7(79), 4628.  
https://doi.org/10.21105/joss.04628

**[4]** Erdelt P.K. (2024). *A Cloud-Native Adoption of Classical DBMS Performance Benchmarks and Tools.* TPCTC 2023, LNCS 14247, Springer.  
https://doi.org/10.1007/978-3-031-68031-1_9

**[5]** Erdelt P.K., Rabl T. (2026). *Benchmarking Multi-Tenant Architectures in PostgreSQL.* EDBT 2026.  
https://doi.org/10.48786/edbt.2026.46

## License

Bexhoma's code is licensed under the [GNU Affero General Public License v3.0 or later](LICENSE).
The specifications of the catalog and result contracts (`contracts/`, and their documentation pages) and the experiment design handbook (`agent/handbook/`) are licensed under [CC BY 4.0](LICENSES/CC-BY-4.0.txt), so that other tools can adopt them; quotations of other works in the handbook remain under the rights of their authors.
The logo and other brand assets in [docs/logo](https://github.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager/tree/master/docs/logo) are licensed separately under [CC BY 4.0](https://github.com/Beuth-Erdelt/Benchmark-Experiment-Host-Manager/blob/master/docs/logo/README.md).
