diff --git a/clusterloader2/testing/batch/config.yaml b/clusterloader2/testing/batch/config.yaml index de1453dd08..57e2e4f215 100644 --- a/clusterloader2/testing/batch/config.yaml +++ b/clusterloader2/testing/batch/config.yaml @@ -1,37 +1,67 @@ +{{$jobs_per_node := 5}} +{{$num_jobs := MultiplyInt .Nodes $jobs_per_node}} +{{$pods_per_job := 10}} + name: batch namespace: - number: 1 + number: 2 tuningSets: -- name: Uniform1qps +- name: Uniform5qps qpsLoad: - qps: 1 + qps: 5 steps: - name: Start measurements measurements: - - Identifier: WaitForFinishedJobs + - Identifier: WaitForFinishedNonIndexedJobs + Method: WaitForFinishedJobs + Params: + action: start + labelSelector: mode = NonIndexed + - Identifier: WaitForFinishedIndexedJobs Method: WaitForFinishedJobs Params: action: start - labelSelector: group = test-job -- name: Create job + labelSelector: mode = Indexed +- name: Create non-indexed jobs phases: - namespaceRange: min: 1 max: 1 - replicasPerNamespace: 1 - tuningSet: Uniform1qps + replicasPerNamespace: {{$num_jobs}} + tuningSet: Uniform5qps + objectBundle: + - basename: test-job + objectTemplatePath: "job.yaml" + templateFillMap: + Replicas: {{$pods_per_job}} + Mode: NonIndexed +- name: Wait for non-indexed jobs to finish + measurements: + - Identifier: WaitForFinishedNonIndexedJobs + Method: WaitForFinishedJobs + Params: + action: gather + timeout: 5m +- name: Create indexed jobs + phases: + - namespaceRange: + min: 2 + max: 2 + replicasPerNamespace: {{$num_jobs}} + tuningSet: Uniform5qps objectBundle: - basename: test-job objectTemplatePath: "job.yaml" templateFillMap: - Replicas: 10 -- name: Wait for jobs to finish + Replicas: {{$pods_per_job}} + Mode: Indexed +- name: Wait for indexed jobs to finish measurements: - - Identifier: WaitForFinishedJobs + - Identifier: WaitForFinishedIndexedJobs Method: WaitForFinishedJobs Params: action: gather - timeout: 1m \ No newline at end of file + timeout: 5m diff --git a/clusterloader2/testing/batch/job.yaml b/clusterloader2/testing/batch/job.yaml index ab728da9da..b9497e8851 100644 --- a/clusterloader2/testing/batch/job.yaml +++ b/clusterloader2/testing/batch/job.yaml @@ -3,10 +3,11 @@ kind: Job metadata: name: {{.Name}} labels: - group: test-job + mode: {{.Mode}} spec: parallelism: {{.Replicas}} completions: {{.Replicas}} + completionMode: {{.Mode}} template: metadata: labels: @@ -14,6 +15,5 @@ spec: spec: containers: - name: {{.Name}} - image: bash - args: ["-c", "exit"] - restartPolicy: Never \ No newline at end of file + image: gcr.io/k8s-staging-perf-tests/sleep:v0.0.3 + restartPolicy: Never