Skip to content
Snippets Groups Projects
Commit 2312a25f authored by Björn Vonheiden's avatar Björn Vonheiden
Browse files

Merge branch 'master' into feature/theodolitePython

parents 44e97647 3ca76330
No related branches found
No related tags found
1 merge request!42Integerate theodolite and run uc python scripts
......@@ -6,7 +6,7 @@ Theodolite is a framework for benchmarking the horizontal and vertical scalabili
## Theodolite Benchmarks
Theodolite contains 4 application benchmarks, which are based on typical use cases for stream processing within microservices. For each benchmark, a corresponding workload generator is provided. Currently, this repository provides benchmark implementations for Kafka Streams.
Theodolite contains 4 application benchmarks, which are based on typical use cases for stream processing within microservices. For each benchmark, a corresponding workload generator is provided. Currently, this repository provides benchmark implementations for Apache Kafka Streams. Benchmark implementation for Apache Flink are currently under development and can be found in the *apache-flink* branch of this repository.
## Theodolite Execution Framework
......
......@@ -166,14 +166,14 @@ The `./theodolite.py` is the entrypoint for all benchmark executions. Is has to
* `<memory-limit>`: Kubernetes memory limit. Optional. Default `4Gi`.
* `<commit-interval>`: Kafka Streams' commit interval in milliseconds. Optional. Default `100`.
* `<duration>`: Duration in minutes subexperiments should be executed for. Optional. Default `5`.
* `<domain-restriction>`: The domain restriction: `domain-restriction` to use domain restriction `no-domain-restriction` to not use domain restriction. Default `no-domain-restriction`. For more details see Section _Domain Restriction_.
* `<domain-restriction>`: The domain restriction: `restrict-domain` to use domain restriction, `no-domain-restriction` to not use domain restriction. Default `no-domain-restriction`. For more details see Section _Domain Restriction_.
* `<search-strategy>`: The benchmarking search strategy. Can be set to `check-all`, `linear-search` or `binary-search`. Default `check-all`. For more details see Section _Benchmarking Search Strategies_.
### Domain Restriction
For dimension value, we have a domain of the amounts of instances. As a consequence, for each dimension value the maximum number of lag experiments is equal to the size of the domain. How the domain is determined is defined by the following domain restriction strategies.
* `no-domain-restriction`: For each dimension value, the domain of instances is equal to the set of all amounts of instances.
* `domain-restriction`: For each dimension value, the domain is computed as follows:
* `restrict-domain`: For each dimension value, the domain is computed as follows:
* If the dimension value is the smallest dimension value the domain of the amounts of instances is equal to the set of all amounts of instances.
* If the dimension value is not the smallest dimension value and N is the amount of minimal amount of instances that was suitable for the last smaller dimension value the domain for this dimension value contains all amounts of instances greater than, or equal to N.
......
......@@ -88,6 +88,7 @@ def test_binary_search_strategy():
# execute
experiment_config = ExperimentConfig(
exp_id="0",
use_case=uc,
dim_values=dim_values,
replicass=replicass,
......
......@@ -103,6 +103,7 @@ def test_linear_search_strategy():
# execute
experiment_config = ExperimentConfig(
exp_id="0",
use_case=uc,
dim_values=dim_values,
replicass=replicass,
......
......@@ -84,6 +84,7 @@ def test_linear_search_strategy():
# execute
experiment_config = ExperimentConfig(
exp_id="0",
use_case=uc,
dim_values=dim_values,
replicass=replicass,
......
......@@ -93,6 +93,7 @@ def test_binary_search_strategy():
# execute
experiment_config = ExperimentConfig(
exp_id="0",
use_case=uc,
dim_values=dim_values,
replicass=replicass,
......
......@@ -120,6 +120,7 @@ def test_linear_search_strategy():
# execute
experiment_config = ExperimentConfig(
exp_id="0",
use_case=uc,
dim_values=dim_values,
replicass=replicass,
......
......@@ -101,6 +101,7 @@ def test_linear_search_strategy():
# execute
experiment_config = ExperimentConfig(
exp_id="0",
use_case=uc,
dim_values=dim_values,
replicass=replicass,
......
......@@ -21,7 +21,7 @@ memory_limit=sys.argv[6] if len(sys.argv) >= 7 and sys.argv[6] else "4Gi"
kafka_streams_commit_interval_ms=sys.argv[7] if len(sys.argv) >= 8 and sys.argv[7] else 100
execution_minutes=sys.argv[8] if len(sys.argv) >= 9 and sys.argv[8] else 5
domain_restriction=bool(sys.argv[9]) if len(sys.argv) >= 10 and sys.argv[9] == "restrict-domain" else False
search_strategy=sys.argv[10] if len(sys.argv) >= 11 and (sys.argv[10] == "linear-search" or sys.argv[10] == "binary-search") else "default"
search_strategy=sys.argv[10] if len(sys.argv) >= 11 and (sys.argv[10] == "linear-search" or sys.argv[10] == "binary-search") else "check-all"
print(f"Domain restriction of search space activated: {domain_restriction}")
print(f"Chosen search strategy: {search_strategy}")
......@@ -35,6 +35,23 @@ else:
with open("exp_counter.txt", mode="w") as write_stream:
write_stream.write(str(exp_id+1))
# Store metadata
separator = ","
lines = [
f"UC={uc}\n",
f"DIM_VALUES={separator.join(dim_values)}\n",
f"REPLICAS={separator.join(replicas)}\n",
f"PARTITIONS={partitions}\n",
f"CPU_LIMIT={cpu_limit}\n",
f"MEMORY_LIMIT={memory_limit}\n",
f"KAFKA_STREAMS_COMMIT_INTERVAL_MS={kafka_streams_commit_interval_ms}\n",
f"EXECUTION_MINUTES={execution_minutes}\n",
f"DOMAIN_RESTRICTION={domain_restriction}\n",
f"SEARCH_STRATEGY={search_strategy}"
]
with open(f"exp{exp_id}_uc{uc}_meta.txt", "w") as stream:
stream.writelines(lines)
# domain restriction
if domain_restriction:
# domain restriction + linear-search
......
......@@ -6,6 +6,9 @@ kafka.input.topic=input
kafka.output.topic=output
aggregation.duration.days=30
aggregation.advance.days=1
schema.registry.url=http://localhost:8091
num.threads=1
commit.interval.ms=100
cache.max.bytes.buffering=-1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment