Skip to content

Commit

Permalink
Add scheduler-throughput module
Browse files Browse the repository at this point in the history
  • Loading branch information
jupblb committed May 21, 2021
1 parent 8a5a7a2 commit 4ce863d
Show file tree
Hide file tree
Showing 2 changed files with 127 additions and 108 deletions.
124 changes: 16 additions & 108 deletions clusterloader2/testing/load/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@
{{$totalSchedulerThroughputPods := MaxInt (MultiplyInt 2 $MIN_PODS_IN_SMALL_CLUSTERS) .Nodes}}
{{$schedulerThroughputPodsPerDeployment := .Nodes}}
{{$schedulerThroughputNamespaces := DivideInt $totalSchedulerThroughputPods $schedulerThroughputPodsPerDeployment}}
{{$schedulerThroughputThreshold := DefaultParam .CL2_SCHEDULER_THROUGHPUT_THRESHOLD 100}}
{{$ENABLE_HUGE_SERVICES := DefaultParam .CL2_ENABLE_HUGE_SERVICES false}}
# END scheduler-throughput section

# Set schedulerThroughputNamespaces to 1 on small clusters otherwise it will result
Expand Down Expand Up @@ -316,78 +314,14 @@ steps:

{{if not $IS_SMALL_CLUSTER}}
# BEGIN scheduler throughput
- name: Creating scheduler throughput measurements
measurements:
- Identifier: HighThroughputPodStartupLatency
Method: PodStartupLatency
Params:
action: start
labelSelector: group = scheduler-throughput
threshold: 1h # TODO(https://github.com/kubernetes/perf-tests/issues/1024): Ideally, this should be 5s
- Identifier: WaitForSchedulerThroughputDeployments
Method: WaitForControlledPodsRunning
Params:
action: start
apiVersion: apps/v1
kind: Deployment
labelSelector: group = scheduler-throughput
# The operation timeout shouldn't be less than 20m to make sure that ~10m node
# failure won't fail the test. See https://github.com/kubernetes/kubernetes/issues/73461#issuecomment-467338711
operationTimeout: 20m
- Identifier: SchedulingThroughput
Method: SchedulingThroughput
Params:
action: start
labelSelector: group = scheduler-throughput
measurmentInterval: 1s
{{if $ENABLE_HUGE_SERVICES}}
- name: Creating huge services
phases:
- namespaceRange:
min: {{AddInt $namespaces 1}}
max: {{AddInt $namespaces $schedulerThroughputNamespaces}}
replicasPerNamespace: 1
tuningSet: Sequence
objectBundle:
- basename: huge-service
objectTemplatePath: service.yaml
{{end}}
- name: Creating scheduler throughput pods
phases:
- namespaceRange:
min: {{AddInt $namespaces 1}}
max: {{AddInt $namespaces $schedulerThroughputNamespaces}}
replicasPerNamespace: 1
tuningSet: SchedulerThroughputParallel
objectBundle:
- basename: scheduler-throughput-deployment
objectTemplatePath: simple-deployment.yaml
templateFillMap:
Replicas: {{$schedulerThroughputPodsPerDeployment}}
Group: scheduler-throughput
CpuRequest: 1m
MemoryRequest: 10M
{{if $ENABLE_HUGE_SERVICES}}
SvcName: huge-service
{{end}}
- name: Waiting for scheduler throughput pods to be created
measurements:
- Identifier: WaitForSchedulerThroughputDeployments
Method: WaitForControlledPodsRunning
Params:
action: gather
- name: Collecting scheduler throughput measurements
measurements:
- Identifier: HighThroughputPodStartupLatency
Method: PodStartupLatency
Params:
action: gather
- Identifier: SchedulingThroughput
Method: SchedulingThroughput
Params:
action: gather
enableViolations: true
threshold: {{$schedulerThroughputThreshold}}
- module:
path: modules/scheduler-throughput.yaml
params:
action: create
namespaces: {{$namespaces}}
replicasPerNamespace: 1
schedulerThroughputNamespaces: {{$schedulerThroughputNamespaces}}
schedulerThroughputPodsPerDeployment: {{$schedulerThroughputPodsPerDeployment}}
{{end}}

{{if $EXEC_COMMAND}}
Expand Down Expand Up @@ -431,40 +365,14 @@ steps:
{{if not $EXIT_AFTER_EXEC}}

{{if not $IS_SMALL_CLUSTER}}
- name: Deleting scheduler throughput pods
phases:
- namespaceRange:
min: {{AddInt $namespaces 1}}
max: {{AddInt $namespaces $schedulerThroughputNamespaces}}
replicasPerNamespace: 0
tuningSet: SchedulerThroughputParallel
objectBundle:
- basename: scheduler-throughput-deployment
objectTemplatePath: simple-deployment.yaml
- name: Waiting for scheduler throughput pods to be deleted
measurements:
- Identifier: WaitForSchedulerThroughputDeployments
Method: WaitForControlledPodsRunning
Params:
action: gather
{{if $ENABLE_HUGE_SERVICES}}
- name: Deleting huge services
phases:
- namespaceRange:
min: {{AddInt $namespaces 1}}
max: {{AddInt $namespaces $schedulerThroughputNamespaces}}
replicasPerNamespace: 0
tuningSet: Sequence
objectBundle:
- basename: huge-service
objectTemplatePath: service.yaml
- name: Sleeping after deleting huge services
measurements:
- Identifier: WaitAfterHugeServicesDeletion
Method: Sleep
Params:
duration: "3m"
{{end}}
- module:
path: modules/scheduler-throughput.yaml
params:
action: delete
namespaces: {{$namespaces}}
replicasPerNamespace: 0
schedulerThroughputNamespaces: {{$schedulerThroughputNamespaces}}
schedulerThroughputPodsPerDeployment: {{$schedulerThroughputPodsPerDeployment}}
# END scheduler throughput
{{end}}

Expand Down
111 changes: 111 additions & 0 deletions clusterloader2/testing/load/modules/scheduler-throughput.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
## Input params
# Valid actions: "create", "delete"
{{$action := .action}}
{{$namespaces := .namespaces}}
{{$replicasPerNamespace := .replicasPerNamespace}}
{{$schedulerThroughputNamespaces := .schedulerThroughputNamespaces}}
{{$schedulerThroughputPodsPerDeployment := .schedulerThroughputPodsPerDeployment}}

## Derivative variables
{{$is_creating := (eq .action "create")}}
{{$is_deleting := (eq .action "delete")}}

## CL2 params
{{$ENABLE_HUGE_SERVICES := DefaultParam .CL2_ENABLE_HUGE_SERVICES false}}
{{$SCHEDULER_THROUGHPUT_THRESHOLD := DefaultParam .CL2_SCHEDULER_THROUGHPUT_THRESHOLD 100}}

steps:
{{if $is_creating}}
- name: Creating scheduler throughput measurements
measurements:
- Identifier: HighThroughputPodStartupLatency
Method: PodStartupLatency
Params:
action: start
labelSelector: group = scheduler-throughput
threshold: 1h # TODO(https://github.com/kubernetes/perf-tests/issues/1024): Ideally, this should be 5s
- Identifier: WaitForSchedulerThroughputDeployments
Method: WaitForControlledPodsRunning
Params:
action: start
apiVersion: apps/v1
kind: Deployment
labelSelector: group = scheduler-throughput
# The operation timeout shouldn't be less than 20m to make sure that ~10m node
# failure won't fail the test. See https://github.com/kubernetes/kubernetes/issues/73461#issuecomment-467338711
operationTimeout: 20m
- Identifier: SchedulingThroughput
Method: SchedulingThroughput
Params:
action: start
labelSelector: group = scheduler-throughput
measurmentInterval: 1s
{{if $ENABLE_HUGE_SERVICES}}
- name: Creating huge services
phases:
- namespaceRange:
min: {{AddInt $namespaces 1}}
max: {{AddInt $namespaces $schedulerThroughputNamespaces}}
replicasPerNamespace: 1
tuningSet: Sequence
objectBundle:
- basename: huge-service
objectTemplatePath: service.yaml
{{end}}
{{end}}
- name: {{$action}} scheduler throughput pods
phases:
- namespaceRange:
min: {{AddInt $namespaces 1}}
max: {{AddInt $namespaces $schedulerThroughputNamespaces}}
replicasPerNamespace: {{$replicasPerNamespace}}
tuningSet: SchedulerThroughputParallel
objectBundle:
- basename: scheduler-throughput-deployment
objectTemplatePath: simple-deployment.yaml
templateFillMap:
Replicas: {{$schedulerThroughputPodsPerDeployment}}
Group: scheduler-throughput
CpuRequest: 1m
MemoryRequest: 10M
{{if $ENABLE_HUGE_SERVICES}}
SvcName: huge-service
{{end}}
- name: Waiting for scheduler throughput pods to be {{$action}}d
measurements:
- Identifier: WaitForSchedulerThroughputDeployments
Method: WaitForControlledPodsRunning
Params:
action: gather
{{if and $is_deleting $ENABLE_HUGE_SERVICES}}
- name: Deleting huge services
phases:
- namespaceRange:
min: {{AddInt $namespaces 1}}
max: {{AddInt $namespaces $schedulerThroughputNamespaces}}
replicasPerNamespace: 0
tuningSet: Sequence
objectBundle:
- basename: huge-service
objectTemplatePath: service.yaml
- name: Sleeping after deleting huge services
measurements:
- Identifier: WaitAfterHugeServicesDeletion
Method: Sleep
Params:
duration: "3m"
{{end}}
{{if $is_creating}}
- name: Collecting scheduler throughput measurements
measurements:
- Identifier: HighThroughputPodStartupLatency
Method: PodStartupLatency
Params:
action: gather
- Identifier: SchedulingThroughput
Method: SchedulingThroughput
Params:
action: gather
enableViolations: true
threshold: {{$SCHEDULER_THROUGHPUT_THRESHOLD}}
{{end}}

0 comments on commit 4ce863d

Please sign in to comment.