Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove artificial pod creation/update/delete rate limiting #2128

Merged
merged 1 commit into from
Aug 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package common
import (
"context"
"fmt"
"os"
"strings"
"sync"
"time"
Expand Down Expand Up @@ -438,7 +439,11 @@ func (w *waitForControlledPodsRunningMeasurement) handleObjectLocked(oldObj, new
}

operationTimeout := w.operationTimeout
if isObjDeleted || isScalingDown {
// exactOperationTimeout controls whether we should skip multiplying by two operationTimeout on scale down/deletion.
// Defaults to false for backward compatibility.
// TODO(mborsz): Change default to true and remove.
_, exactOperationTimeout := os.LookupEnv("CL2_WAIT_FOR_CONTROLLED_PODS_USE_EXACT_OPERATION_TIMEOUT")
if !exactOperationTimeout && (isObjDeleted || isScalingDown) {
// In case of deleting pods, twice as much time is required.
// The pod deletion throughput equals half of the pod creation throughput.
// NOTE: Starting from k8s 1.23 it's not true anymore, at least not in all cases.
Expand Down
19 changes: 19 additions & 0 deletions clusterloader2/testing/load/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
{{$PODS_PER_NODE := DefaultParam .PODS_PER_NODE 30}}
{{$LOAD_TEST_THROUGHPUT := DefaultParam .CL2_LOAD_TEST_THROUGHPUT 10}}
{{$DELETE_TEST_THROUGHPUT := DefaultParam .CL2_DELETE_TEST_THROUGHPUT $LOAD_TEST_THROUGHPUT}}
{{$RATE_LIMIT_POD_CREATION := DefaultParam .CL2_RATE_LIMIT_POD_CREATION true}}
{{$BIG_GROUP_SIZE := DefaultParam .BIG_GROUP_SIZE 250}}
{{$MEDIUM_GROUP_SIZE := DefaultParam .MEDIUM_GROUP_SIZE 30}}
{{$SMALL_GROUP_SIZE := DefaultParam .SMALL_GROUP_SIZE 5}}
Expand Down Expand Up @@ -168,7 +169,13 @@ steps:
params:
actionName: "create"
namespaces: {{$namespaces}}
{{if .RATE_LIMIT_POD_CREATION}}
Copy link
Member Author

@mborsz mborsz Aug 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be $RATE_LIMIT_POD_CREATION

tuningSet: RandomizedSaturationTimeLimited
operationTimeout: 15m
{{else}}
tuningSet: Global100qps
operationTimeout: {{AddInt $saturationTime 900}}s
{{end}}
testMaxReplicaFactor: {{$RANDOM_SCALE_FACTOR}}
# We rely on the fact that daemonset is using the same image as the 'pod-startup-latency' module.
# The goal is to cache the image to all nodes before we start any latency pod,
Expand Down Expand Up @@ -277,7 +284,13 @@ steps:
params:
actionName: "scale and update"
namespaces: {{$namespaces}}
{{if .RATE_LIMIT_POD_CREATION}}
tuningSet: RandomizedScalingTimeLimited
operationTimeout: 15m
{{else}}
tuningSet: Global100qps
operationTimeout: {{AddInt (DivideInt $saturationTime 4) 900}}s
{{end}}
randomScaleFactor: {{$RANDOM_SCALE_FACTOR}}
testMaxReplicaFactor: {{$RANDOM_SCALE_FACTOR}}
daemonSetImage: {{$latencyPodImage}}
Expand Down Expand Up @@ -305,7 +318,13 @@ steps:
params:
actionName: "delete"
namespaces: {{$namespaces}}
{{if .RATE_LIMIT_POD_CREATION}}
tuningSet: RandomizedDeletionTimeLimited
operationTimeout: 15m
{{else}}
tuningSet: Global100qps
operationTimeout: {{AddInt $deletionTime 900}}s
{{end}}
testMaxReplicaFactor: {{$RANDOM_SCALE_FACTOR}}
daemonSetReplicas: 0
bigDeploymentSize: {{$BIG_GROUP_SIZE}}
Expand Down
9 changes: 5 additions & 4 deletions clusterloader2/testing/load/modules/reconcile-objects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
{{$minReplicaFactor := SubtractFloat 1 $randomScaleFactor}}
{{$maxReplicaFactor := AddFloat 1 $randomScaleFactor}}
{{$testMaxReplicaFactor := AddFloat 1 .testMaxReplicaFactor}}
{{$operationTimeout := .operationTimeout}}

# DaemonSets
{{$daemonSetImage := DefaultParam .daemonSetImage "k8s.gcr.io/pause:3.0"}}
Expand Down Expand Up @@ -75,7 +76,7 @@ steps:
action: start
checkIfPodsAreUpdated: {{$CHECK_IF_PODS_ARE_UPDATED}}
labelSelector: group = load
operationTimeout: 15m
operationTimeout: {{$operationTimeout}}

- name: {{$actionName}}
phases:
Expand Down Expand Up @@ -212,7 +213,7 @@ steps:
min: 1
max: {{$namespaces}}
replicasPerNamespace: 0
tuningSet: RandomizedDeletionTimeLimited
tuningSet: {{$tuningSet}}
objectBundle:
{{range $ssIndex := Loop $pvSmallStatefulSetSize}}
- basename: pv-small-statefulset-{{$ssIndex}}
Expand All @@ -226,7 +227,7 @@ steps:
min: 1
max: {{$namespaces}}
replicasPerNamespace: 0
tuningSet: RandomizedDeletionTimeLimited
tuningSet: {{$tuningSet}}
objectBundle:
{{range $ssIndex := Loop $pvMediumStatefulSetSize}}
- basename: pv-medium-statefulset-{{$ssIndex}}
Expand Down Expand Up @@ -254,5 +255,5 @@ steps:
Params:
desiredPVCCount: 0
labelSelector: group = load
timeout: 15m
timeout: {{$operationTimeout}}
{{end}}