Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • she/theodolite
1 result
Show changes
Commits on Source (346)
Showing
with 1567 additions and 194 deletions
......@@ -33,10 +33,16 @@ default:
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"${CR_HOST}\":{\"auth\":\"$(printf "%s:%s" "${CR_USER}" "${CR_PW}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
- DOCKER_TAG_NAME=$(echo $CI_COMMIT_REF_SLUG- | sed 's/^master-$//')
- "[ ! $CI_COMMIT_TAG ] && KANIKO_D=\"$KANIKO_D -d $CR_HOST/$CR_ORG/$IMAGE_NAME:${DOCKER_TAG_NAME}latest\""
- "[ ! $CI_COMMIT_TAG ] && KANIKO_D=\"$KANIKO_D -d $CR_HOST/$CR_ORG/$IMAGE_NAME:$DOCKER_TAG_NAME$CI_COMMIT_SHORT_SHA\""
- "[ $CI_COMMIT_TAG ] && KANIKO_D=\"$KANIKO_D -d $CR_HOST/$CR_ORG/$IMAGE_NAME:$CI_COMMIT_TAG\""
- >
if [ $IMAGE_TAG ]; then
KANIKO_D="$KANIKO_D -d $CR_HOST/$CR_ORG/$IMAGE_NAME:$IMAGE_TAG"
elif [ $CI_COMMIT_TAG ]; then
KANIKO_D="$KANIKO_D -d $CR_HOST/$CR_ORG/$IMAGE_NAME:$CI_COMMIT_TAG"
else
DOCKER_TAG_NAME=$(echo $CI_COMMIT_REF_SLUG- | sed 's/^master-$//')
KANIKO_D="$KANIKO_D -d $CR_HOST/$CR_ORG/$IMAGE_NAME:${DOCKER_TAG_NAME}latest"
KANIKO_D="$KANIKO_D -d $CR_HOST/$CR_ORG/$IMAGE_NAME:$DOCKER_TAG_NAME$CI_COMMIT_SHORT_SHA"
fi
- "[ $DOCKERFILE ] && KANIKO_DOCKERFILE=\"--dockerfile $DOCKERFILE\""
- /kaniko/executor --context `pwd`/$CONTEXT $KANIKO_DOCKERFILE $KANIKO_D
......@@ -71,7 +77,7 @@ test-docs-links:
extends: .docs
needs:
- build-docs
script: bundle exec htmlproofer --assume-extension --allow_hash_href --url-ignore "/favicon.ico" ./_site
script: bundle exec htmlproofer --assume-extension --allow_hash_href ./_site
test-docs-crds-regression:
stage: test
......@@ -104,6 +110,11 @@ lint-helm:
name: alpine/helm:3.5.2
entrypoint: [""]
script: helm lint helm/
rules:
- changes:
- helm/*
- when: manual
allow_failure: true
# Theodolite Benchmarks
......@@ -143,6 +154,7 @@ test-benchmarks:
- build-benchmarks
script: ./gradlew test --continue
artifacts:
when: always
reports:
junit:
- "theodolite-benchmarks/**/build/test-results/test/TEST-*.xml"
......@@ -204,10 +216,8 @@ spotbugs-benchmarks:
- changes:
- theodolite-benchmarks/*
- theodolite-benchmarks/$JAVA_PROJECT_NAME/**/*
- theodolite-benchmarks/kstreams-commons/**/*
- theodolite-benchmarks/flink-commons/**/*
- theodolite-benchmarks/load-generator-commons/**/*
if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME"
- theodolite-benchmarks/{$JAVA_PROJECT_DEPS}/**/*
if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME && $JAVA_PROJECT_DEPS"
- if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW && $IMAGE_NAME && $JAVA_PROJECT_NAME"
when: manual
allow_failure: true
......@@ -217,72 +227,140 @@ deploy-uc1-kstreams:
variables:
IMAGE_NAME: "theodolite-uc1-kstreams-app"
JAVA_PROJECT_NAME: "uc1-kstreams"
JAVA_PROJECT_DEPS: "kstreams-commons"
deploy-uc2-kstreams:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc2-kstreams-app"
JAVA_PROJECT_NAME: "uc2-kstreams"
JAVA_PROJECT_DEPS: "kstreams-commons"
deploy-uc3-kstreams:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc3-kstreams-app"
JAVA_PROJECT_NAME: "uc3-kstreams"
JAVA_PROJECT_DEPS: "kstreams-commons"
deploy-uc4-kstreams:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc4-kstreams-app"
JAVA_PROJECT_NAME: "uc4-kstreams"
JAVA_PROJECT_DEPS: "kstreams-commons"
deploy-uc1-flink:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc1-flink"
JAVA_PROJECT_NAME: "uc1-flink"
JAVA_PROJECT_DEPS: "flink-commons"
deploy-uc2-flink:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc2-flink"
JAVA_PROJECT_NAME: "uc2-flink"
JAVA_PROJECT_DEPS: "flink-commons"
deploy-uc3-flink:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc3-flink"
JAVA_PROJECT_NAME: "uc3-flink"
JAVA_PROJECT_DEPS: "flink-commons"
deploy-uc4-flink:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc4-flink"
JAVA_PROJECT_NAME: "uc4-flink"
JAVA_PROJECT_DEPS: "flink-commons"
deploy-uc1-beam-flink:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc1-beam-flink"
JAVA_PROJECT_NAME: "uc1-beam-flink"
JAVA_PROJECT_DEPS: "beam-commons,uc1-beam"
deploy-uc2-beam-flink:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc2-beam-flink"
JAVA_PROJECT_NAME: "uc2-beam-flink"
JAVA_PROJECT_DEPS: "beam-commons,uc2-beam"
deploy-uc3-beam-flink:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc3-beam-flink"
JAVA_PROJECT_NAME: "uc3-beam-flink"
JAVA_PROJECT_DEPS: "beam-commons,uc3-beam"
deploy-uc4-beam-flink:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc4-beam-flink"
JAVA_PROJECT_NAME: "uc4-beam-flink"
JAVA_PROJECT_DEPS: "beam-commons,uc4-beam"
deploy-uc1-beam-samza:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc1-beam-samza"
JAVA_PROJECT_NAME: "uc1-beam-samza"
JAVA_PROJECT_DEPS: "beam-commons,uc1-beam"
deploy-uc2-beam-samza:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc2-beam-samza"
JAVA_PROJECT_NAME: "uc2-beam-samza"
JAVA_PROJECT_DEPS: "beam-commons,uc2-beam"
deploy-uc3-beam-samza:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc3-beam-samza"
JAVA_PROJECT_NAME: "uc3-beam-samza"
JAVA_PROJECT_DEPS: "beam-commons,uc3-beam"
deploy-uc4-beam-samza:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc4-beam-samza"
JAVA_PROJECT_NAME: "uc4-beam-samza"
JAVA_PROJECT_DEPS: "beam-commons,uc4-beam"
deploy-uc1-load-generator:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc1-workload-generator"
JAVA_PROJECT_NAME: "uc1-load-generator"
JAVA_PROJECT_DEPS: "load-generator-commons"
deploy-uc2-load-generator:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc2-workload-generator"
JAVA_PROJECT_NAME: "uc2-load-generator"
JAVA_PROJECT_DEPS: "load-generator-commons"
deploy-uc3-load-generator:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc3-workload-generator"
JAVA_PROJECT_NAME: "uc3-load-generator"
JAVA_PROJECT_DEPS: "load-generator-commons"
deploy-uc4-load-generator:
extends: .deploy-benchmarks
variables:
IMAGE_NAME: "theodolite-uc4-workload-generator"
JAVA_PROJECT_NAME: "uc4-load-generator"
JAVA_PROJECT_DEPS: "load-generator-commons"
# Theodolite Framework
......@@ -300,6 +378,11 @@ deploy-uc4-load-generator:
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
- cd theodolite
rules:
- changes:
- theodolite/**/*
- when: manual
allow_failure: true
build-theodolite-jvm:
stage: build
......@@ -307,8 +390,10 @@ build-theodolite-jvm:
script: ./gradlew --build-cache assemble
artifacts:
paths:
- "theodolite/build/lib/*"
- "theodolite/build/*-runner.jar"
- "theodolite/build/quarkus-app/lib/"
- "theodolite/build/quarkus-app/*.jar"
- "theodolite/build/quarkus-app/app/"
- "theodolite/build/quarkus-app/quarkus/"
expire_in: 6 hours
build-theodolite-native:
......@@ -330,6 +415,7 @@ test-theodolite:
#- build-theodolite-native
script: ./gradlew test --stacktrace
artifacts:
when: always
reports:
junit:
- "theodolite/**/build/test-results/test/TEST-*.xml"
......@@ -408,6 +494,22 @@ test-slo-checker-dropped-records-kstreams:
- when: manual
allow_failure: true
test-slo-checker-generic:
stage: test
needs: []
image: python:3.7-slim
before_script:
- cd slo-checker/generic
script:
- pip install -r requirements.txt
- cd app
- python -m unittest
rules:
- changes:
- slo-checker/generic/**/*
- when: manual
allow_failure: true
deploy-slo-checker-lag-trend:
stage: deploy
extends:
......@@ -444,6 +546,24 @@ deploy-slo-checker-dropped-records-kstreams:
when: manual
allow_failure: true
deploy-slo-checker-generic:
stage: deploy
extends:
- .kaniko-push
needs:
- test-slo-checker-generic
before_script:
- cd slo-checker/generic
variables:
IMAGE_NAME: theodolite-slo-checker-generic
rules:
- changes:
- slo-checker/generic/**/*
if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW"
- if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW"
when: manual
allow_failure: true
# Theodolite Random Scheduler
......@@ -463,4 +583,22 @@ deploy-random-scheduler:
- if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW"
when: manual
allow_failure: true
\ No newline at end of file
deploy-buildimage-docker-compose-jq:
stage: deploy
extends:
- .kaniko-push
needs: []
variables:
DOCKER_VERSION: 20.10.12
IMAGE_NAME: theodolite-build-docker-compose-jq
IMAGE_TAG: $DOCKER_VERSION
before_script:
- cd buildimages/docker-compose-jq
rules:
- changes:
- buildimages/docker-compose-jq/Dockerfile
if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW"
- if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW && $CI_PIPELINE_SOURCE == 'web'"
when: manual
allow_failure: true
......@@ -8,7 +8,7 @@ authors:
given-names: Wilhelm
orcid: "https://orcid.org/0000-0001-6625-4335"
title: Theodolite
version: "0.5.1"
version: "0.6.3"
repository-code: "https://github.com/cau-se/theodolite"
license: "Apache-2.0"
doi: "10.1016/j.bdr.2021.100209"
......
../analysis/requirements.txt
\ No newline at end of file
FROM docker:${DOCKER_VERSION:-latest}
RUN apk update && \
apk add jq && \
apk add py-pip python3-dev libffi-dev openssl-dev gcc libc-dev rust cargo make && \
pip install docker-compose
......@@ -5,16 +5,20 @@
"codeRepository": "https://github.com/cau-se/theodolite",
"dateCreated": "2020-03-13",
"datePublished": "2020-07-27",
"dateModified": "2021-11-12",
"dateModified": "2022-01-24",
"downloadUrl": "https://github.com/cau-se/theodolite/releases",
"name": "Theodolite",
"version": "0.5.1",
"description": "Theodolite is a framework for benchmarking the horizontal and vertical scalability of stream processing engines.",
"version": "0.6.3",
"description": "Theodolite is a framework for benchmarking the horizontal and vertical scalability of cloud-native applications.",
"developmentStatus": "active",
"relatedLink": [
"https://www.theodolite.rocks"
],
"referencePublication": "https://doi.org/10.1016/j.bdr.2021.100209",
"programmingLanguage": [
"Python",
"Java"
"Kotlin",
"Java",
"Python"
],
"runtimePlatform": [
"Kubernetes"
......
......@@ -7,7 +7,7 @@ GEM
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
addressable (2.7.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
coffee-script (2.4.1)
coffee-script-source
......@@ -227,7 +227,7 @@ GEM
jekyll-seo-tag (~> 2.1)
minitest (5.14.4)
multipart-post (2.1.1)
nokogiri (1.11.7-x86_64-linux)
nokogiri (1.13.0-x86_64-linux)
racc (~> 1.4)
nokogumbo (2.0.5)
nokogiri (~> 1.8, >= 1.8.4)
......@@ -238,7 +238,7 @@ GEM
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.6)
racc (1.5.2)
racc (1.6.0)
rainbow (3.0.0)
rb-fsevent (0.11.0)
rb-inotify (0.10.1)
......
title: "Theodolite"
description: >-
Theodolite is a framework for benchmarking the horizontal and vertical
scalability of stream processing engines.
scalability of cloud-native applications.
remote_theme: pmarsceill/just-the-docs
#color_scheme: "dark"
aux_links:
"Theodolite on GitHub":
- "//github.com/cau-se/theodolite"
......@@ -14,4 +13,5 @@ exclude:
- Gemfile
- Gemfile.lock
- README.md
- vendor
- vendor/
- drafts/
This diff is collapsed.
......@@ -108,13 +108,20 @@ Suppose the resources needed by your benchmark are defined as YAML files, locate
Benchmarks need to specify at least one supported load and resource type for which scalability can be benchmarked.
Load and resource types are described by a name (used for reference from an Execution) and a list of patchers.
Patchers can be seen as functions, which take a value as input and modify a Kubernetes resource in a patcher-specific way. Examples of patchers are the *ReplicaPatcher*, which modifies the replica specification of a deployment, or the *EnvVarPatcher*, which modifies an environment variable.
See the [patcher API reference](api-reference/patchers) for an overview of available patchers.
If a benchmark is [executed by an Execution](running-benchmarks), these patchers are used to configure SUT and load generator according to the [load and resource values](creating-an-execution) set in the Execution.
## Kafka Configuration
Theodolite allows to automatically create and remove Kafka topics for each SLO experiment.
Use the `removeOnly: True` property for topics which are created automatically by the SUT.
For those topics, also wildcards are allowed in the topic name.
Theodolite allows to automatically create and remove Kafka topics for each SLO experiment by setting a `kafkaConfig`.
It `bootstrapServer` needs to point your Kafka cluster and `topics` configures the list of Kafka topics to be created/removed.
For each topic, you configure its name, the number of partitions and the replication factor.
With the `removeOnly: True` property, you can also instruct Theodolite to only remove topics and not create them.
This is useful when benchmarking SUTs, which create topics on their own (e.g., Kafka Streams and Samza applications).
For those topics, also wildcards are allowed in the topic name and, of course, no partition count or replication factor must be provided.
<!-- Further information: API Reference -->
......
......@@ -58,7 +58,29 @@ As a Benchmark may define multiple supported load and resource types, an Executi
## Definition of SLOs
SLOs provide a way to quantify whether a certain load intensity can be handled by a certain amount of provisioned resources.
An Execution must at least specify one SLO to be checked.
In Theodolite, SLO are evaluated by requesting monitoring data from Prometheus and analyzing it in a benchmark-specific way.
An Execution must at least define one SLO to be checked.
A good choice to get started is defining an SLO of type `generic`:
```yaml
- sloType: "generic"
prometheusUrl: "http://prometheus-operated:9090"
offset: 0
properties:
externalSloUrl: "http://localhost:8082"
promQLQuery: "sum by(job) (kafka_streams_stream_task_metrics_dropped_records_total>=0)"
warmup: 60 # in seconds
queryAggregation: max
repetitionAggregation: median
operator: lte
threshold: 1000
```
All you have to do is to define a [PromQL query](https://prometheus.io/docs/prometheus/latest/querying/basics/) describing which metrics should be requested (`promQLQuery`) and how the resulting time series should be evaluated. With `queryAggregation` you specify how the resulting time series is aggregated to a single value and `repetitionAggregation` describes how the results of multiple repetitions are aggregated. Possible values are
`mean`, `median`, `mode`, `sum`, `count`, `max`, `min`, `std`, `var`, `skew`, `kurt` as well as percentiles such as `p99` or `p99.9`. The result of aggregation all repetitions is checked against `threshold`. This check is performed using an `operator`, which describes that the result must be "less than" (`lt`), "less than equal" (`lte`), "greater than" (`gt`) or "greater than equal" (`gte`) to the threshold.
In case you need to evaluate monitoring data in a more flexible fashion, you can also change the value of `externalSloUrl` to your custom SLO checker. Have a look at the source code of the [generic SLO checker](https://github.com/cau-se/theodolite/tree/master/slo-checker/generic) to get started.
## Experimental Setup
......@@ -72,7 +94,7 @@ The experimental setup can be configured by:
## Configuration Overrides
In cases where only small modifications of a system under test should be benchmarked, it is not necessarily required to [create a new benchmark](creating-a-benchmark).
In cases where only small modifications of a system under test should be benchmarked, it is not necessary to [create a new benchmark](creating-a-benchmark).
Instead, also Executions allow to do small reconfigurations, such as switching on or off a specific Pod scheduler.
This is done by defining `configOverrides` in the Execution. Each override consists of a patcher, defining which Kubernetes resource should be patched in which way, and a value the patcher is applied with.
......
......@@ -23,13 +23,15 @@ again be merged into master.
1. the default `helm/values.yaml` file,
2. the example `execution/theodolite.yaml` job,
3. the Kubernetes benchmark resources in `theodolite-benchmarks/definitions/**/resources` and
2. the Docker Compose files in `theodolite-benchmarks/docker-test`.
4. the Docker Compose files in `theodolite-benchmarks/docker-test`.
2. Update both, the `version` and the `appVersion` fields, in the Helm `Charts.yaml` file to `0.3.1`.
3. Update `codemeta.json` to match the new version. In particular, make sure that `version` points to the version you are releasing and `dateModified` points to the date you are relasing this version. [CodeMeta generator](https://codemeta.github.io/codemeta-generator/) may help you in updating the file.
3. Update the `version` field of the `theodolite/build.gradle` file to `0.3.1`. Make sure to also adjust all references to the build artifact in the `theodolite/README.md`.
4. Update `CITATION.cff` to match the new version. At least update the `version` field.
4. Update `codemeta.json` to match the new version. In particular, make sure that `version` points to the version you are releasing and `dateModified` points to the date you are relasing this version. [CodeMeta generator](https://codemeta.github.io/codemeta-generator/) may help you in updating the file.
5. Update `CITATION.cff` to match the new version. At least update the `version` field.
4. Create a Helm package by running `./build-package.sh` from the chart directory.
......@@ -49,8 +51,10 @@ again be merged into master.
1. Update the Helm `Charts.yaml` file to `0.4.0-SNAPSHOT` (see Step 3).
2. Update the `codemeta.json` file according to Step 3.
2. Update the Theodolite `build.gradle` and `README.md` files `0.4.0-SNAPSHOT` (see Step 3).
3. Update the `codemeta.json` file according to Step 3.
3. Update the `CITATION.cff` file according to Step 3.
4. Update the `CITATION.cff` file according to Step 3.
12. Commit these changes to the `master` branch.
## Infrastructure
The necessary infrastructure for an execution can be defined in the benchmark manifests. The related resources are create *before* an execution is started, and removed *after* an execution is finished.
### Example
```yaml
infrastructure:
resources:
- configMap:
name: "example-configmap"
files:
- "uc1-kstreams-deployment.yaml"
```
## Action Commands
Theodolite allows to execute commands on running pods (similar to the `kubectl exec -it <pod-name> -- <command>` command). This commands can be run either before (via so called `beforeActions`) or after (via so called `afterActions`) an experiment is executed.
Theodolite checks if all required pods are available for the specified actions (i.e. the pods must either be defined as infrastructure or already deployed in the cluster). If not all pods/resources are available, the benchmark will not be set as `Ready`. Consequently, an action cannot be executed on a pod that is defined as an SUT or loadGen resource.
### Example
```yaml
# For the system under test
sut:
resources: ...
beforeActions:
- selector:
pod:
matchLabels:
app: busybox1
exec:
command: ["touch", "test-file-sut"]
timeoutSeconds: 90
afterActions:
- selector:
pod:
matchLabels:
app: busybox1
exec:
command: [ "touch", "test-file-sut-after" ]
timeoutSeconds: 90
# analog, for the load generator
loadGenerator:
resources: ...
beforeActions:
- selector:
pod:
matchLabels:
app: busybox1
exec:
command: ["touch", "test-file-loadGen"]
timeoutSeconds: 90
afterActions:
- selector:
pod:
matchLabels:
app: busybox1
exec:
command: [ "touch", "test-file-loadGen-after" ]
timeoutSeconds: 90
```
\ No newline at end of file
docs/favicon.ico

33.7 KiB

apiVersion: v1
entries:
theodolite:
- apiVersion: v2
appVersion: 0.6.3
created: "2022-01-24T13:40:40.07330713+01:00"
dependencies:
- condition: grafana.enabled
name: grafana
repository: https://grafana.github.io/helm-charts
version: 6.17.5
- condition: kube-prometheus-stack.enabled
name: kube-prometheus-stack
repository: https://prometheus-community.github.io/helm-charts
version: 20.0.1
- condition: cp-helm-charts.enabled
name: cp-helm-charts
repository: https://soerenhenning.github.io/cp-helm-charts
version: 0.6.0
- condition: kafka-lag-exporter.enabled
name: kafka-lag-exporter
repository: https://lightbend.github.io/kafka-lag-exporter/repo/
version: 0.6.7
description: Theodolite is a framework for benchmarking the horizontal and vertical
scalability of cloud-native applications.
digest: ebf08e3bf084fcd96eb2ee0588d495258d1741c74019257e55ba40f574874525
home: https://www.theodolite.rocks
maintainers:
- email: soeren.henning@email.uni-kiel.de
name: Sören Henning
url: https://www.se.informatik.uni-kiel.de/en/team/soeren-henning-m-sc
name: theodolite
sources:
- https://github.com/cau-se/theodolite
type: application
urls:
- https://github.com/cau-se/theodolite/releases/download/v0.6.3/theodolite-0.6.3.tgz
version: 0.6.3
- apiVersion: v2
appVersion: 0.6.2
created: "2022-01-23T22:31:04.773793557+01:00"
dependencies:
- condition: grafana.enabled
name: grafana
repository: https://grafana.github.io/helm-charts
version: 6.17.5
- condition: kube-prometheus-stack.enabled
name: kube-prometheus-stack
repository: https://prometheus-community.github.io/helm-charts
version: 20.0.1
- condition: cp-helm-charts.enabled
name: cp-helm-charts
repository: https://soerenhenning.github.io/cp-helm-charts
version: 0.6.0
- condition: kafka-lag-exporter.enabled
name: kafka-lag-exporter
repository: https://lightbend.github.io/kafka-lag-exporter/repo/
version: 0.6.7
description: Theodolite is a framework for benchmarking the horizontal and vertical
scalability of cloud-native applications.
digest: f6514038741051230dc9be0a6bde3fbc6f92136ecb36c276343e98e550f2c6d0
home: https://www.theodolite.rocks
maintainers:
- email: soeren.henning@email.uni-kiel.de
name: Sören Henning
url: https://www.se.informatik.uni-kiel.de/en/team/soeren-henning-m-sc
name: theodolite
sources:
- https://github.com/cau-se/theodolite
type: application
urls:
- https://github.com/cau-se/theodolite/releases/download/v0.6.2/theodolite-0.6.2.tgz
version: 0.6.2
- apiVersion: v2
appVersion: 0.6.1
created: "2022-01-18T10:40:00.557347616+01:00"
dependencies:
- condition: grafana.enabled
name: grafana
repository: https://grafana.github.io/helm-charts
version: 6.17.5
- condition: kube-prometheus-stack.enabled
name: kube-prometheus-stack
repository: https://prometheus-community.github.io/helm-charts
version: 20.0.1
- condition: cp-helm-charts.enabled
name: cp-helm-charts
repository: https://soerenhenning.github.io/cp-helm-charts
version: 0.6.0
- condition: kafka-lag-exporter.enabled
name: kafka-lag-exporter
repository: https://lightbend.github.io/kafka-lag-exporter/repo/
version: 0.6.7
description: Theodolite is a framework for benchmarking the horizontal and vertical
scalability of cloud-native applications.
digest: 4896111999375c248d7dda0bdff090c155f464b79416decc0e0b47dc6710b5c7
home: https://www.theodolite.rocks
maintainers:
- email: soeren.henning@email.uni-kiel.de
name: Sören Henning
url: https://www.se.informatik.uni-kiel.de/en/team/soeren-henning-m-sc
name: theodolite
sources:
- https://github.com/cau-se/theodolite
type: application
urls:
- https://github.com/cau-se/theodolite/releases/download/v0.6.1/theodolite-0.6.1.tgz
version: 0.6.1
- apiVersion: v2
appVersion: 0.6.0
created: "2022-01-12T13:53:08.413006558+01:00"
dependencies:
- condition: grafana.enabled
name: grafana
repository: https://grafana.github.io/helm-charts
version: 6.17.5
- condition: kube-prometheus-stack.enabled
name: kube-prometheus-stack
repository: https://prometheus-community.github.io/helm-charts
version: 20.0.1
- condition: cp-helm-charts.enabled
name: cp-helm-charts
repository: https://soerenhenning.github.io/cp-helm-charts
version: 0.6.0
- condition: kafka-lag-exporter.enabled
name: kafka-lag-exporter
repository: https://lightbend.github.io/kafka-lag-exporter/repo/
version: 0.6.7
description: Theodolite is a framework for benchmarking the horizontal and vertical
scalability of cloud-native applications.
digest: 53435304229582680d55360ad79a25050f6cc97641cbb88d691b35d91a54d354
home: https://www.theodolite.rocks
maintainers:
- email: soeren.henning@email.uni-kiel.de
name: Sören Henning
url: https://www.se.informatik.uni-kiel.de/en/team/soeren-henning-m-sc
name: theodolite
sources:
- https://github.com/cau-se/theodolite
type: application
urls:
- https://github.com/cau-se/theodolite/releases/download/v0.6.0/theodolite-0.6.0.tgz
version: 0.6.0
- apiVersion: v2
appVersion: 0.5.1
created: "2021-11-12T16:15:01.629937292+01:00"
......@@ -106,4 +246,4 @@ entries:
urls:
- https://github.com/cau-se/theodolite/releases/download/v0.4.0/theodolite-0.4.0.tgz
version: 0.4.0
generated: "2021-11-12T16:15:01.591258889+01:00"
generated: "2022-01-24T13:40:40.036786105+01:00"
......@@ -11,6 +11,7 @@ Running scalability benchmarks with Theodolite involves the following steps:
1. [Deploying a benchmark to Kubernetes](#deploying-a-benchmark)
1. [Creating an execution](#creating-an-execution), which describes the experimental setup for running the benchmark
1. [Accessing benchmark results](#accessing-benchmark-results)
1. [Analyzing benchmark results](#analyzing-benchmark-results) with Theodolite's Jupyter notebooks
## Deploying a Benchmark
......@@ -131,3 +132,32 @@ For installations without persistence, but also as an alternative for installati
```sh
kubectl cp $(kubectl get pod -l app=theodolite -o jsonpath="{.items[0].metadata.name}"):/results . -c results-access
```
## Analyzing Benchmark Results
Theodolite comes with Jupyter notebooks for analyzing and visualizing benchmark execution results.
The easiest way to use them is at MyBinder:
[Launch Notebooks](https://mybinder.org/v2/gh/cau-se/theodolite/HEAD?labpath=analysis){: .btn .btn-primary }
{: .text-center }
Alternatively, you can also [run these notebook locally](https://github.com/cau-se/theodolite/tree/master/analysis), for example, with Docker or Visual Studio Code.
The notebooks allow to compute a scalability function using Theodolite's *demand* metric and to visualize multiple such functions in plots:
### Computing the *demand* metric with `demand-metric.ipynb` (optional)
After finishing a benchmark execution, Theodolite creates a `exp<id>_demand.csv` file. It maps the tested load intensities to the minimal required resources for that load. If the monitoring data collected during benchmark execution should be analyzed in more detail, the `demand-metric.ipynb` notebook can be used.
Theodolite stores monitoring data for each conducted SLO experiment in `exp<id>_<load>_<resources>_<slo-slug>_<rep>.csv` files, where `<id>` is the ID of an execution, `<load>` the corresponding load intensity value, `<resources>` the resources value, `<slo-slug>` the [name of the SLO](creating-an-execution.html#definition-of-slos) and `<rep>` the repetition counter.
The `demand-metric.ipynb` notebook reads these files and generates a new CSV file mapping load intensities to the minimal required resources. The format of this file corresponds to the original `exp<id>_demand.csv` file created when running the benchmark, but allows, for example, to evaluate different warm-up periods.
Currently, the `demand-metric.ipynb` notebook only supports benchmarks with the *lag trend SLO* out-of-the-box, but can easily be adjusted to perform any other type of analysis.
### Plotting benchmark results with the *demand* metric with `demand-metric-plot.ipynb`
The `demand-metric-plot.ipynb` takes one or multiple `exp<id>_demand.csv` files as input and visualize them together in a plot.
Input files can either be taken directly from Theodolite, or created from the `demand-metric.ipynb` notebooks.
All plotting code is only intended to serve as a template. Adjust it as needed to change colors, labels, formatting, etc. as needed.
Please refer to the official docs of [MatPlotLib](https://matplotlib.org/) and the [ggplot](https://matplotlib.org/stable/gallery/style_sheets/ggplot.html) style, which are used to generate the plots.
---
title: Available Benchmarks
has_children: false
has_children: true
nav_order: 7
---
# Theodolite Benchmarks
Theodolite comes with 4 application benchmarks, which are based on typical use cases for stream processing within microservices. For each benchmark, a corresponding load generator is provided. Currently, Theodolite provides benchmark implementations for Apache Kafka Streams and Apache Flink.
Theodolite comes with 4 application benchmarks, which are based on typical use cases for stream processing within microservices. For each benchmark, a corresponding [load generator](load-generator) is provided. Currently, Theodolite provides benchmark implementations for Apache Kafka Streams and Apache Flink.
Theodolite's benchmarks are based on typical use cases for stream processing within microservices. Specifically, all benchmarks represent some sort of microservice doing Industrial Internet of Things data analytics.
......
---
title: Load Generators
parent: Available Benchmarks
has_children: false
nav_order: 1
---
# Load Generator Framework
Theodolite's benchmarks come with a flexible load generator framework. It is used to create load on the [4 Theodolite benchmarks](#prebuilt-container-images), but can also be applied to create [custom load generators](#creating-a-custom-load-generator).
It is particularly designed for scalability: Just spin up multiple instances of the load generator and the instances automatically divide the load to be generated among themselves.
## Prebuilt container images
For each benchmark, we provide a [load generator as OCI container image](https://github.com/orgs/cau-se/packages?tab=packages&q=workload-generator). These load generators simulate smart power meters in an industrial facility, which generate measurement records at a fixed rate. Records are published to an Apache Kafka topic (default) or sent as POST requests to an HTTP endpoint.
You can simply run a load generator container, for example, for benchmark UC1 with:
```sh
docker run ghcr.io/cau-se/theodolite-uc1-workload-generator
```
### Message format
Messages generated by the load generators represent a single measurement of [active power](https://en.wikipedia.org/wiki/AC_power#Active,_reactive,_apparent,_and_complex_power_in_sinusoidal_steady-state). The corresponding message type is specified as [`ActivePowerRecords`](https://github.com/cau-se/titan-ccp-common/blob/master/src/main/avro/ActivePower.avdl)
defined with Avro. It consists of an identifier for simulated power sensor, a timestamp in epoch milliseconds and the actual measured (simulated) value in watts.
When sending generated records via Apache Kafka, these records are serialized with the [Confluent Schema Registry](https://docs.confluent.io/platform/current/schema-registry).
If the load generator is configured to send records as HTTP POST requests, records are serialized as JSON according to the following format:
```json
{
"identifier": "sensor-id",
"timestamp": 1645564942000,
"valueInW": 1234.56
}
```
### Configuration
The prebuilt container images can be configured with the following environment variables:
| Environment Variable | Description | Default |
|:----|:----|:----|
| `BOOTSTRAP_SERVER` | Address (`hostname:port`) of another load generator instance to form a cluster with. Can also be this instance. | `localhost:5701` |
| `KUBERNETES_DNS_NAME` | Kubernetes service name to discover other load generators to form a cluster with. Must be a fully qualified domain name (FQDN), e.g., something like `<service>.<namespace>.svc.cluster.local`. * Requires `BOOTSTRAP_SERVER` not to be set. | |
| `PORT` | Port used for for coordination among load generator instances. | 5701 |
| `PORT_AUTO_INCREMENT` | If set to true and the specified PORT is already used, use the next higher one. Useful if multiple instances should run on the same host, without configuring each instance individually. | true |
| `CLUSTER_NAME_PREFIX` | Only required if unrelated load generators form a cluster. | theodolite-load-generation |
| `TARGET` | The target system the load generator send messages to. Valid values are: `kafka`, `http`. | `kafka` |
| `KAFKA_BOOTSTRAP_SERVERS` | A list of host/port pairs to use for establishing the initial connection to the Kafka cluster. See [Kafka producer config: `bootstrap.servers`](https://kafka.apache.org/documentation/#producerconfigs_bootstrap.servers) for more information. Only used if Kafka is set as `TARGET`. | `localhost:9092` |
| `KAFKA_INPUT_TOPIC` | Name of the Kafka topic, which should receive the generated messages. Only used if Kafka is set as `TARGET`. | input |
| `SCHEMA_REGISTRY_URL` | URL of the [Confluent Schema Registry](https://docs.confluent.io/platform/current/schema-registry). | `http://localhost:8081` |
| `KAFKA_BATCH_SIZE` | Value for the Kafka producer configuration: [`batch.size`](https://kafka.apache.org/documentation/#producerconfigs_batch.size). Only used if Kafka is set as `TARGET`. | see Kafka producer config: [`batch.size`](https://kafka.apache.org/documentation/#producerconfigs_batch.size) |
| `KAFKA_LINGER_MS` | Value for the Kafka producer configuration: [`linger.ms`](https://kafka.apache.org/documentation/#producerconfigs_linger.ms). Only used if Kafka is set as `TARGET`. | see Kafka producer config: [`linger.ms`](https://kafka.apache.org/documentation/#producerconfigs_linger.ms) |
| `KAFKA_BUFFER_MEMORY` | Value for the Kafka producer configuration: [`buffer.memory`](https://kafka.apache.org/documentation/#producerconfigs_buffer.memory) Only used if Kafka is set as `TARGET`. | see Kafka producer config: [`buffer.memory`](https://kafka.apache.org/documentation/#producerconfigs_buffer.memory) |
| `HTTP_URL` | The URL the load generator should post messages to. Only used if HTTP is set as `TARGET`. | |
| `NUM_SENSORS` | The amount of simulated sensors. | 10 |
| `PERIOD_MS` | The time in milliseconds between generating two messages for the same sensor. With our Theodolite benchmarks, we apply an [open workload model](https://www.usenix.org/legacy/event/nsdi06/tech/full_papers/schroeder/schroeder.pdf) in which new messages are generated at a fixed rate, without considering the think time of the target server nor the time required for generating a message. | 1000 |
| `VALUE` | The constant `valueInW` of an `ActivePowerRecord`. | 10 |
| `THREADS` | Number of worker threads used to generate the load. | 4 |
Please note that there are some additional configuration options for benchmark [UC4's load generator](https://github.com/cau-se/theodolite/blob/master/theodolite-benchmarks/uc4-load-generator/src/main/java/theodolite/uc4/workloadgenerator/LoadGenerator.java).
## Creating a custom load generator
To create a custom load generator, you need to import the [load-generator-commons](https://github.com/cau-se/theodolite/tree/master/theodolite-benchmarks/load-generator-commons) project. You can then create an instance of the `LoadGenerator` object and call its `run` method:
```java
LoadGenerator loadGenerator = new LoadGenerator()
.setClusterConfig(clusterConfig)
.setLoadDefinition(new WorkloadDefinition(
new KeySpace(key_prefix, numSensors),
duration))
.setGeneratorConfig(new LoadGeneratorConfig(
recordGenerator,
recordSender))
.withThreads(threads);
loadGenerator.run();
```
Alternatively, you can also start with a load generator populated with a default configuration or created from environment variables and then adjust the `LoadGenerator` as desired:
```java
LoadGenerator loadGeneratorFromDefaults = LoadGenerator.fromDefaults()
LoadGenerator loadGeneratorFromEnv = LoadGenerator.fromEnvironment();
```
......@@ -21,17 +21,16 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
# - name: MODE
# value: yaml-executor # Default is `yaml-executor`
- name: THEODOLITE_EXECUTION
value: "execution/execution.yaml" # The name of this file must correspond to the filename of the execution, from which the config map is created.
value: "/deployments/execution/execution.yaml" # The name of this file must correspond to the filename of the execution, from which the config map is created.
- name: THEODOLITE_BENCHMARK
value: "benchmark/benchmark.yaml" # The name of this file must correspond to the filename of the benchmark, from which the config map is created.
value: "/deployments/benchmark/benchmark.yaml" # The name of this file must correspond to the filename of the benchmark, from which the config map is created.
- name: THEODOLITE_APP_RESOURCES
value: "benchmark-resources"
value: "/deployments/benchmark-resources"
- name: RESULTS_FOLDER # Folder for saving results
value: results # Default is the pwd (/deployments)
value: /deployments/results # Default is the pwd (/deployments)
# - name: CREATE_RESULTS_FOLDER # Specify whether the specified result folder should be created if it does not exist.
# value: "false" # Default is false.
volumeMounts:
......
apiVersion: v2
name: theodolite
description: Theodolite is a framework for benchmarking the scalability of stream processing engines.
home: https://cau-se.github.io/theodolite
description: Theodolite is a framework for benchmarking the horizontal and vertical scalability of cloud-native applications.
home: https://www.theodolite.rocks
sources:
- https://github.com/cau-se/theodolite
maintainers:
......@@ -29,6 +29,6 @@ dependencies:
repository: https://lightbend.github.io/kafka-lag-exporter/repo/
condition: kafka-lag-exporter.enabled
version: 0.6.0-SNAPSHOT
version: 0.7.0-SNAPSHOT
appVersion: 0.6.0-SNAPSHOT
appVersion: 0.7.0-SNAPSHOT
......@@ -8,5 +8,8 @@ cp-helm-charts:
offsets.topic.replication.factor: "1"
operator:
sloChecker:
droppedRecordsKStreams:
enabled: false
resultsVolume:
enabled: false