Skip to main content


Benchmark-Runner: Running benchmarks

Actions Status PyPI Latest Release Container Repository on Quay Coverage Status Documentation Status python License

What is it?

benchmark-runner is a containerized Python lightweight and flexible framework for running benchmark workloads on Kubernetes/OpenShift runtype kinds Pod and VM.

This framework support the following embedded workloads:

** For hammerdb mssql must run once permission

Benchmark-runner grafana dashboard example:

Reference:

  • The benchmark-runner package is located in PyPi
  • The benchmark-runner container image is located in Quay.io

Documentation

Documentation is available at benchmark-runner.readthedocs.io

Table of Contents

Run workload using Podman or Docker

The following options may be passed via command line flags or set in the environment:

mandatory: KUBEADMIN_PASSWORD=$KUBEADMIN_PASSWORD

mandatory: $KUBECONFIG [ kubeconfig file path]

mandatory: WORKLOAD=$WORKLOAD

Choose one from the following list:

['stressng_pod', 'stressng_vm', 'uperf_pod', 'uperf_vm', 'sysbench_pod', 'sysbench_vm', 'hammerdb_pod_mariadb', 'hammerdb_vm_mariadb', 'hammerdb_pod_mariadb_lso', 'hammerdb_vm_mariadb_lso', 'hammerdb_pod_mariadb_ephemeral', 'hammerdb_vm_mariadb_ephemeral', 'hammerdb_pod_postgres', 'hammerdb_vm_postgres', 'hammerdb_pod_postgres_lso', 'hammerdb_vm_postgres_lso', 'hammerdb_pod_postgres_ephemeral', 'hammerdb_vm_postgres_ephemeral', 'hammerdb_pod_mssql', 'hammerdb_vm_mssql', 'hammerdb_pod_mssql_lso', 'hammerdb_vm_mssql_lso', 'hammerdb_pod_mssql_ephemeral', 'hammerdb_vm_mssql_ephemeral', 'vdbench_pod', 'vdbench_vm', 'vdbench_pod_ephemeral', 'vdbench_vm_ephemeral', 'fio_pod', 'fio_vm', 'fio_pod_ephemeral', 'fio_vm_ephemeral', 'clusterbuster', 'krknhub', 'bootstorm_vm', 'windows_vm', 'winmssql_vm', 'winfio_vm' ]

** clusterbuster workloads: cpusoaker, files, fio, uperf. for more details see ** For windows workloads: need to share windows qcow2 image by nginx ** For hammerdb mssql must run only once permission ** winmssql_vm: will run hammerdb inside windows server mssql 2022: for more details see

Not mandatory:

auto: NAMESPACE=benchmark-runner [ The default namespace is benchmark-runner ]

auto: ODF_PVC=True [ True=ODF PVC storage, False=Ephemeral storage, default True ]

auto: EXTRACT_PROMETHEUS_SNAPSHOT=True [ True=extract Prometheus snapshot into artifacts, false=don't, default True ]

auto: SYSTEM_METRICS=False [ True=collect metric, False=not collect metrics, default False ]

auto: RUNNER_PATH=/tmp [ The default work space is /tmp ]

optional: PIN_NODE1=$PIN_NODE1 [node1 selector for running the workload]

optional: PIN_NODE2=$PIN_NODE2 [node2 selector for running the workload, i.e. uperf server and client, hammerdb database and workload]

optional: ELASTICSEARCH=$ELASTICSEARCH [ elasticsearch service name]

optional: ELASTICSEARCH_PORT=$ELASTICSEARCH_PORT

optional: CLUSTER=$CLUSTER [ set CLUSTER='kubernetes' to run workload on a kubernetes cluster, default 'openshift' ]

optional:scale SCALE=$SCALE [For Vdbench/Bootstorm: Scale in each node]

optional:scale SCALE_NODES=$SCALE_NODES [For Vdbench/Bootstorm: Scale's node]

optional:scale REDIS=$REDIS [For Vdbench only: redis for scale synchronization]

optional: LSO_DISK_ID=$LSO_DISK_ID [LSO_DISK_ID='scsi-<replace_this_with_your_actual_disk_id>' For using LSO Operator in hammerdb]

optional: WORKER_DISK_IDS=$WORKER_DISK_IDS [WORKER_DISK_IDS For ODF/LSO workloads hammerdb/vdbench]

optional: WINDOWS_URL=$WINDOWS_URL [WINDOWS_URL for qcow2 image — HTTP URL or S3 path-style HTTPS URL (https://s3.{region}.amazonaws.com/{bucket}/{key})]

optional: CDI_SOURCE_TYPE=$CDI_SOURCE_TYPE [CDI DataVolume source type: http (default) or s3 for authenticated S3 access]

optional: CDI_SOURCE_S3_CRED=$CDI_SOURCE_S3_CRED [K8s secret name containing accessKeyId and secretKey for S3 authentication. Secret must exist in benchmark-runner namespace before workload runs. Create with: oc create secret generic <secret-name> --from-literal=accessKeyId=AKIA... --from-literal=secretKey=CLj4... -n benchmark-runner]

optional: VM_STORAGE_CLASS=$VM_STORAGE_CLASS [Storage class for all VM workload PVCs (Windows and Linux). Default: ocs-storagecluster-ceph-rbd-virtualization]

For example:

podman run --rm -e WORKLOAD="hammerdb_pod_mariadb" -e KUBEADMIN_PASSWORD="1234" -e PIN_NODE1="node_name-1" -e PIN_NODE2="node_name-2" -e log_level=INFO -v /root/.kube/config:/root/.kube/config --privileged quay.io/benchmark-runner/benchmark-runner:latest

or

docker run --rm -e WORKLOAD="hammerdb_vm_mariadb" -e KUBEADMIN_PASSWORD="1234" -e PIN_NODE1="node_name-1" -e PIN_NODE2="node_name-2" -e log_level=INFO -v /root/.kube/config:/root/.kube/config --privileged quay.io/benchmark-runner/benchmark-runner:latest

SAVE RUN ARTIFACTS LOCAL:

  1. add -e SAVE_ARTIFACTS_LOCAL='True' or --save-artifacts-local=true
  2. add -v /tmp/benchmark-runner-run-artifacts:/tmp/benchmark-runner-run-artifacts

Run vdbench workload in Pod using OpenShift

Run vdbench workload in Pod using Kubernetes

Run workload in Pod using Kubernetes or OpenShift

[TBD]

Grafana dashboards

There are 2 grafana dashboards templates:

  1. FuncCi dashboard
  2. PerfCi dashboard ** PerfCi dashboard is generated automatically in Build GitHub actions from main.libsonnet

** After importing json in grafana, you need to configure elasticsearch data source. (for more details: see HOW_TO.md)

Inspect Prometheus Metrics

The CI jobs store snapshots of the Prometheus database for each run as part of the artifacts. Within the artifact directory is a Prometheus snapshot directory named:

promdb-YYYY_MM_DDTHH_mm_ss+0000_YYYY_MM_DDTHH_mm_ss+0000.tar

The timestamps are for the start and end of the metrics capture; they are stored in UTC time (+0000). It is possible to run containerized Prometheus on it to inspect the metrics. Note that Prometheus requires write access to its database, so it will actually write to the snapshot. So for example if you have downloaded artifacts for a run named hammerdb-vm-mariadb-2022-01-04-08-21-23 and the Prometheus snapshot within is named promdb_2022_01_04T08_21_52+0000_2022_01_04T08_45_47+0000, you could run as follows:

$ local_prometheus_snapshot=/hammerdb-vm-mariadb-2022-01-04-08-21-23/promdb_2022_01_04T08_21_52+0000_2022_01_04T08_45_47+0000
$ chmod -R g-s,a+rw "$local_prometheus_snapshot"
$ sudo podman run --rm -p 9090:9090 -uroot -v "$local_prometheus_snapshot:/prometheus" --privileged prom/prometheus --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/prometheus --storage.tsdb.retention.time=100000d --storage.tsdb.retention.size=1000PB

and point your browser at port 9090 on your local system, you can run queries against it, e.g.

sum(irate(node_cpu_seconds_total[2m])) by (mode,instance) > 0

It is important to use the --storage.tsdb.retention.time option to Prometheus, as otherwise Prometheus may discard the data in the snapshot. And note that you must set the time bounds on the Prometheus query to fit the start and end times as recorded in the name of the promdb snapshot.

How to develop in benchmark-runner

see HOW_TO.md

benchmark-runner blog

open link

Metadata

Release files for benchmark-runner 1.0.1040

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for benchmark-runner 1.0.1040
File Size Uploaded
benchmark_runner-1.0.1040.tar.gz 200.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for benchmark-runner 1.0.1040
File Interpreter ABI Platform
benchmark_runner-1.0.1040-py3-none-any.whl Python 3 none any Details

Total release size: 507.8 kB

Release files / benchmark_runner-1.0.1040.tar.gz

Download URL benchmark_runner-1.0.1040.tar.gz
Size 200.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2112132fb9d6f2f1ddcf2fda26f7f7854883039238e70951375b3917a7a76269
BLAKE2b-256 checksum
How to use checksums
11ef68bf0043b962bd5a2199902ff6f78b1ddc742a73e3949aebd1a0b88f20c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / benchmark_runner-1.0.1040-py3-none-any.whl

Download URL benchmark_runner-1.0.1040-py3-none-any.whl
Size 307.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e1a752432781ed1f2f81a04ce29861f33622b8e7dd497b725cc73cefff23061
BLAKE2b-256 checksum
How to use checksums
fdf26baf6896e5d588ec410d590ec0b715fae853d01cb0ec3a8c19fde3bd172f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

1.0.1040 This release

2 release files

1.0.80

2 release files

1.0.79

2 release files

1.0.78

2 release files

1.0.77

2 release files

1.0.76

2 release files

1.0.75

2 release files

1.0.74

2 release files

1.0.73

2 release files

1.0.72

2 release files

1.0.71

2 release files

1.0.70

2 release files

1.0.69

2 release files

1.0.68

2 release files

1.0.67

2 release files

1.0.66

2 release files

1.0.65

2 release files

1.0.64

2 release files

1.0.63

2 release files

1.0.62

2 release files

1.0.61

2 release files

1.0.60

2 release files

1.0.59

2 release files

1.0.58

2 release files

1.0.57

2 release files

1.0.56

2 release files

1.0.55

2 release files

1.0.54

2 release files

1.0.53

2 release files

1.0.52

2 release files

1.0.51

2 release files

1.0.50

2 release files

1.0.49

2 release files

1.0.48

2 release files

1.0.47

2 release files

1.0.46

2 release files

1.0.45

2 release files

1.0.44

2 release files

1.0.43

2 release files

1.0.42

2 release files

1.0.41

2 release files

1.0.40

2 release files

1.0.39

2 release files

1.0.38

2 release files

1.0.37

2 release files

1.0.36

2 release files

1.0.35

2 release files

1.0.34

2 release files

1.0.33

2 release files

1.0.32

2 release files

1.0.31

2 release files

1.0.30

2 release files

1.0.29

2 release files

1.0.28

2 release files

1.0.27

2 release files

1.0.26

2 release files

1.0.25

2 release files

1.0.24

2 release files

1.0.23

2 release files

1.0.22

2 release files

1.0.21

2 release files

1.0.20

2 release files

1.0.19

2 release files

1.0.18

2 release files

1.0.17

2 release files

1.0.16

2 release files

1.0.15

2 release files

1.0.14

2 release files

1.0.13

2 release files

1.0.12

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page