Skip to content

Commit

Permalink
Add huge-services module
Browse files Browse the repository at this point in the history
  • Loading branch information
jupblb committed May 24, 2021
1 parent 6f9dff8 commit 9e72f2a
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 35 deletions.
23 changes: 23 additions & 0 deletions clusterloader2/testing/load/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
{{$MEDIUM_STATEFUL_SETS_PER_NAMESPACE := DefaultParam .MEDIUM_STATEFUL_SETS_PER_NAMESPACE 1}}
{{$ENABLE_CHAOSMONKEY := DefaultParam .ENABLE_CHAOSMONKEY false}}
{{$ENABLE_API_AVAILABILITY_MEASUREMENT := DefaultParam .CL2_ENABLE_API_AVAILABILITY_MEASUREMENT false}}
{{$ENABLE_HUGE_SERVICES := DefaultParam .CL2_ENABLE_HUGE_SERVICES false}}
#Variables
{{$namespaces := DivideInt .Nodes $NODES_PER_NAMESPACE}}
{{$totalPods := MultiplyInt $namespaces $NODES_PER_NAMESPACE $PODS_PER_NODE}}
Expand Down Expand Up @@ -155,6 +156,15 @@ steps:

{{if not $IS_SMALL_CLUSTER}}
# BEGIN scheduler throughput
{{if $ENABLE_HUGE_SERVICES}}
- module:
path: modules/huge-services.yaml
params:
action: create
namespaces: {{$namespaces}}
replicasPerNamespace: 1
schedulerThroughputNamespaces: {{$schedulerThroughputNamespaces}}
{{end}}
- module:
path: modules/scheduler-throughput.yaml
params:
Expand All @@ -163,6 +173,9 @@ steps:
replicasPerNamespace: 1
schedulerThroughputNamespaces: {{$schedulerThroughputNamespaces}}
schedulerThroughputPodsPerDeployment: {{$schedulerThroughputPodsPerDeployment}}
{{if $ENABLE_HUGE_SERVICES}}
serviceName: huge-service
{{end}}
{{end}}

{{if $EXEC_COMMAND}}
Expand Down Expand Up @@ -214,6 +227,16 @@ steps:
replicasPerNamespace: 0
schedulerThroughputNamespaces: {{$schedulerThroughputNamespaces}}
schedulerThroughputPodsPerDeployment: {{$schedulerThroughputPodsPerDeployment}}
{{if $ENABLE_HUGE_SERVICES}}
serviceName: huge-service
- module:
path: modules/huge-services.yaml
params:
action: delete
namespaces: {{$namespaces}}
replicasPerNamespace: 0
schedulerThroughputNamespaces: {{$schedulerThroughputNamespaces}}
{{end}}
# END scheduler throughput
{{end}}

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

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

steps:
- name: {{$action}} huge services
phases:
- namespaceRange:
min: {{AddInt $namespaces 1}}
max: {{AddInt $namespaces $schedulerThroughputNamespaces}}
replicasPerNamespace: {{$replicasPerNamespace}}
tuningSet: Sequence
objectBundle:
- basename: huge-service
objectTemplatePath: service.yaml
{{if $is_deleting}}
- name: Sleeping after deleting huge services
measurements:
- Identifier: WaitAfterHugeServicesDeletion
Method: Sleep
Params:
duration: "3m"
{{end}}
38 changes: 3 additions & 35 deletions clusterloader2/testing/load/modules/scheduler-throughput.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
{{$replicasPerNamespace := .replicasPerNamespace}}
{{$schedulerThroughputNamespaces := .schedulerThroughputNamespaces}}
{{$schedulerThroughputPodsPerDeployment := .schedulerThroughputPodsPerDeployment}}
# .serviceName is optional
{{$serviceName := DefaultParam .serviceName ""}}

## 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:
Expand Down Expand Up @@ -40,18 +40,6 @@ steps:
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:
Expand All @@ -68,33 +56,13 @@ steps:
Group: scheduler-throughput
CpuRequest: 1m
MemoryRequest: 10M
{{if $ENABLE_HUGE_SERVICES}}
SvcName: huge-service
{{end}}
SvcName: {{$serviceName}}
- 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:
Expand Down

0 comments on commit 9e72f2a

Please sign in to comment.