diff --git a/test/performance/README.md b/test/performance/README.md index 601098ce19b..443d438fb17 100644 --- a/test/performance/README.md +++ b/test/performance/README.md @@ -2,23 +2,24 @@ ## Configuring your cluster to run a benchmark -1. Create a namespace or use an existing namespace. Each namespace can be - configured with a single benchmark. +1. Create a namespace `perf-eventing` if it does not exist. To use a different + namespace, please replace all the namespaces in + all bash commands and yaml configuration files with your choice. -1. Install Knative eventing by following the steps in - https://github.com/knative/eventing/blob/2c6bf0526634804b7ebeee686445901440cc8edd/test/performance/performance-tests.sh#L31 +1. Install Knative eventing and components used in the performance test, + such as MT broker, by following the steps in https://github.com/knative/eventing/blob/master/DEVELOPMENT.md. 1. Create a ConfigMap called `config-mako` in your chosen namespace containing the Mako config file. ``` -kubectl create configmap -n config-mako --from-file=test/performance/benchmarks//dev.config +kubectl create configmap -n perf-eventing config-mako --from-file=test/performance/benchmarks//dev.config ``` 1. Optionally edit the ConfigMap to set additional keys. ``` - kubectl edit configmap -n config-mako + kubectl edit configmap -n perf-eventing config-mako ``` [`NewConfigFromMap`](https://github.com/knative/pkg/blob/master/test/mako/config.go#L41) @@ -55,14 +56,18 @@ To run a benchmark once, and use the result from `mako-stub` for plotting: ko apply -f test/performance/benchmarks/broker-imc/200-broker-perf.yaml ``` +1. Wait until all the pods in namespace `perf-eventing` are completed. + 1. Retrieve results from mako-stub using the script in - [knative/pkg](https://github.com/knative/pkg/blob/master/test/mako/stub-sidecar/read_results.sh): + [knative/pkg](https://github.com/knative/pkg/blob/master/test/mako/stub-sidecar/read_results.sh) + where `pod_name` is the name of the aggregator pod: ``` - bash "$GOPATH/src/knative.dev/pkg/test/mako/stub-sidecar/read_results.sh" "$pod_name" perf-eventing ${mako_port:-10001} ${timeout:-120} ${retries:-100} ${retries_interval:-10} "$output_file" + bash "$GOPATH/src/knative.dev/eventing/vendor/knative.dev/pkg/test/mako/stub-sidecar/read_results.sh" "$pod_name" perf-eventing ${mako_port:-10001} ${timeout:-120} ${retries:-100} ${retries_interval:-10} "$output_file" ``` - This will download a CSV with all raw results. + This will download a CSV with all raw results. Alternatively you can remove the port argument + `-p` in `mako-stub` container to dump the output to container log directly. ## Available benchmarks diff --git a/test/performance/benchmarks/broker-imc/200-broker-perf.yaml b/test/performance/benchmarks/broker-imc/200-broker-perf.yaml index fbdfdb1bef5..6a53dd6d916 100644 --- a/test/performance/benchmarks/broker-imc/200-broker-perf.yaml +++ b/test/performance/benchmarks/broker-imc/200-broker-perf.yaml @@ -35,7 +35,7 @@ spec: image: ko://knative.dev/eventing/test/test_images/performance args: - "--roles=sender,receiver" - - "--sink=http://in-memory-test-broker-broker.perf-eventing.svc.cluster.local" + - "--sink=http://broker-ingress.knative-eventing.svc.cluster.local/perf-eventing/in-memory-test-broker" - "--aggregator=broker-perf-aggregator:10000" - "--pace=500:30,600:30,700:30,800:30,900:30,1000:30" env: @@ -76,6 +76,17 @@ spec: - "--roles=aggregator" # set to the number of sender + receiver (same image that does both counts 2) - "--expect-records=2" + env: + - name: GOGC + value: "off" + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace ports: - name: grpc containerPort: 10000 @@ -89,6 +100,8 @@ spec: terminationMessagePolicy: FallbackToLogsOnError - name: mako-stub image: ko://knative.dev/pkg/test/mako/stub-sidecar + args: + - "-p=10001" ports: - name: quickstore containerPort: 9813 diff --git a/test/performance/benchmarks/broker-imc/continuous/200-broker-imc.yaml b/test/performance/benchmarks/broker-imc/continuous/200-broker-imc.yaml index 09f0025fbc7..7ff05ffb757 100644 --- a/test/performance/benchmarks/broker-imc/continuous/200-broker-imc.yaml +++ b/test/performance/benchmarks/broker-imc/continuous/200-broker-imc.yaml @@ -41,10 +41,12 @@ spec: image: ko://knative.dev/eventing/test/test_images/performance args: - "--roles=sender" - - "--sink=http://imc-broker.default.svc.cluster.local" + - "--sink=http://broker-ingress.knative-eventing.svc.cluster.local/perf-eventing/in-memory-test-broker" - "--aggregator=broker-imc-aggregator:10000" - "--pace=100:10,400:20,800:30,900:60,1000:60,1100:60,1200:60" env: + - name: GOGC + value: "off" - name: POD_NAME valueFrom: fieldRef: @@ -114,6 +116,17 @@ spec: # set to the number of sender + receiver (same image that does both counts 2) - "--expect-records=2" - "--mako-tags=channel=imc" + env: + - name: GOGC + value: "off" + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace ports: - name: grpc containerPort: 10000 diff --git a/test/performance/benchmarks/broker-imc/dev.config b/test/performance/benchmarks/broker-imc/dev.config index 448a8c75968..0707193950f 100644 --- a/test/performance/benchmarks/broker-imc/dev.config +++ b/test/performance/benchmarks/broker-imc/dev.config @@ -16,6 +16,7 @@ owner_list: "gracegao@google.com" owner_list: "nachocano@google.com" owner_list: "cshou@google.com" owner_list: "ngiraldo@google.com" +owner_list: "zhongduo@google.com" # GCP Service Accounts that can publish data to Mako. owner_list: "mako-job@knative-performance.iam.gserviceaccount.com" @@ -25,6 +26,7 @@ owner_list: "mako-upload@gracegao-knative-gcp-testing.iam.gserviceaccount.com" owner_list: "mako-upload@knative-project-228222.iam.gserviceaccount.com" owner_list: "mako-upload@cshou-playground.iam.gserviceaccount.com" owner_list: "mako-upload@ngiraldo-knative-dev.iam.gserviceaccount.com" +owner_list: "mako-upload@jimmy-knative-dev.iam.gserviceaccount.com" # Define the name and type for x-axis of run charts input_value_info: { diff --git a/test/performance/benchmarks/broker-imc/prod.config b/test/performance/benchmarks/broker-imc/prod.config index c82b93faea1..17758c711fe 100644 --- a/test/performance/benchmarks/broker-imc/prod.config +++ b/test/performance/benchmarks/broker-imc/prod.config @@ -16,6 +16,7 @@ owner_list: "gracegao@google.com" owner_list: "nachocano@google.com" owner_list: "cshou@google.com" owner_list: "ngiraldo@google.com" +owner_list: "zhongduo@google.com" # GCP Service Accounts that can publish data to Mako. Since this is a prod # benchmark, only the CI account should be listed here. diff --git a/test/performance/benchmarks/channel-imc/dev.config b/test/performance/benchmarks/channel-imc/dev.config index 549dc1ef565..7d908cea74b 100644 --- a/test/performance/benchmarks/channel-imc/dev.config +++ b/test/performance/benchmarks/channel-imc/dev.config @@ -16,6 +16,7 @@ owner_list: "gracegao@google.com" owner_list: "nachocano@google.com" owner_list: "cshou@google.com" owner_list: "ngiraldo@google.com" +owner_list: "zhongduo@google.com" # GCP Service Accounts that can publish data to Mako. owner_list: "mako-job@knative-performance.iam.gserviceaccount.com" @@ -25,6 +26,7 @@ owner_list: "mako-upload@gracegao-knative-gcp-testing.iam.gserviceaccount.com" owner_list: "mako-upload@knative-project-228222.iam.gserviceaccount.com" owner_list: "mako-upload@cshou-playground.iam.gserviceaccount.com" owner_list: "mako-upload@ngiraldo-knative-dev.iam.gserviceaccount.com" +owner_list: "mako-upload@jimmy-knative-dev.iam.gserviceaccount.com" # Define the name and type for x-axis of run charts input_value_info: { diff --git a/test/performance/benchmarks/channel-imc/prod.config b/test/performance/benchmarks/channel-imc/prod.config index 6e3ab9efec4..c9eef5d76b5 100644 --- a/test/performance/benchmarks/channel-imc/prod.config +++ b/test/performance/benchmarks/channel-imc/prod.config @@ -16,6 +16,7 @@ owner_list: "gracegao@google.com" owner_list: "nachocano@google.com" owner_list: "cshou@google.com" owner_list: "ngiraldo@google.com" +owner_list: "zhongduo@google.com" # GCP Service Accounts that can publish data to Mako. Since this is a prod # benchmark, only the CI account should be listed here.