diff --git a/execution/run_uc3-new.sh b/execution/run_uc3-new.sh index 4517041dc32303407a0c60da4184db25e1a579be..52aa8a3b11666d7eed7a2fa064416cb39622727f 100755 --- a/execution/run_uc3-new.sh +++ b/execution/run_uc3-new.sh @@ -4,9 +4,9 @@ EXP_ID=$1 DIM_VALUE=$2 INSTANCES=$3 PARTITIONS=$4 -#CPU_LIMIT=1000 -#MEMORY_LIMIT=4Gi -#KAFKA_STREAMS_COMMIT_INTERVAL_MS=100 +CPU_LIMIT=1000m +MEMORY_LIMIT=4Gi +KAFKA_STREAMS_COMMIT_INTERVAL_MS=100 EXECUTION_MINUTES=5 # Create Topics @@ -19,11 +19,15 @@ kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-z NUM_SENSORS=$DIM_VALUE WL_MAX_RECORDS=150000 WL_INSTANCES=$(((NUM_SENSORS + (WL_MAX_RECORDS -1 ))/ WL_MAX_RECORDS)) -sed "s/{{NUM_SENSORS}}/$NUM_SENSORS/g; s/{{INSTANCES}}/$WL_INSTANCES/g" uc3-workload-generator/deployment.yaml | kubectl apply -f - + +WORKLOAD_GENERATOR_YAML=$(sed "s/{{NUM_SENSORS}}/$NUM_SENSORS/g; s/{{INSTANCES}}/$WL_INSTANCES/g" uc3-workload-generator/deployment.yaml) +echo "$WORKLOAD_GENERATOR_YAML" | kubectl apply -f - # Start application REPLICAS=$INSTANCES -kubectl apply -f uc3-application/aggregation-deployment.yaml +#kubectl apply -f uc3-application/aggregation-deployment.yaml +APPLICATION_YAML=$(sed "s/{{CPU_LIMIT}}/$CPU_LIMIT/g; s/{{MEMORY_LIMIT}}/$MEMORY_LIMIT/g; s/{{KAFKA_STREAMS_COMMIT_INTERVAL_MS}}/$KAFKA_STREAMS_COMMIT_INTERVAL_MS/g" uc3-application/aggregation-deployment.yaml) +echo "$APPLICATION_YAML" | kubectl apply -f - kubectl scale deployment titan-ccp-aggregation --replicas=$REPLICAS # Execute for certain time @@ -37,8 +41,11 @@ deactivate # Stop wl and app #kubectl delete -f uc3-workload-generator/deployment.yaml #sed "s/{{INSTANCES}}/1/g" uc3-workload-generator/deployment.yaml | kubectl delete -f - -sed "s/{{NUM_SENSORS}}/$NUM_SENSORS/g; s/{{INSTANCES}}/$WL_INSTANCES/g" uc3-workload-generator/deployment.yaml | kubectl delete -f - -kubectl delete -f uc1-application/aggregation-deployment.yaml +echo "$WORKLOAD_GENERATOR_YAML" | kubectl delete -f - +#kubectl delete -f uc1-application/aggregation-deployment.yaml +#sed "s/{{CPU_LIMIT}}/1000m/g; s/{{MEMORY_LIMIT}}/4Gi/g; s/{{KAFKA_STREAMS_COMMIT_INTERVAL_MS}}/100/g" uc3-application/aggregation-deployment.yaml | kubectl delete -f - +echo "$APPLICATION_YAML" | kubectl delete -f - + # Delete topics instead of Kafka diff --git a/execution/uc3-application/aggregation-deployment.yaml b/execution/uc3-application/aggregation-deployment.yaml index df0c6400b4ff0f1c96a511fcaa1436d9d56149c6..0f3327af3119df125e3431574e3e406183abc132 100644 --- a/execution/uc3-application/aggregation-deployment.yaml +++ b/execution/uc3-application/aggregation-deployment.yaml @@ -25,13 +25,13 @@ spec: - name: KAFKA_WINDOW_DURATION_MINUTES value: "1" - name: COMMIT_INTERVAL_MS - value: "100" + value: "{{KAFKA_STREAMS_COMMIT_INTERVAL_MS}}" - name: JAVA_OPTS value: "-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=5555" resources: limits: - memory: "4Gi" - cpu: "1000m" + memory: "{{MEMORY_LIMIT}}" + cpu: "{{CPU_LIMIT}}" - name: prometheus-jmx-exporter image: "solsson/kafka-prometheus-jmx-exporter@sha256:6f82e2b0464f50da8104acd7363fb9b995001ddff77d248379f8788e78946143" command: