mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Added a benchmark to evaluate overhead of unschedulable pods
This commit is contained in:
parent
b8b4186a14
commit
36a3ad8752
@ -240,3 +240,20 @@
|
||||
- numNodes: 5000
|
||||
numInitPods: [20000]
|
||||
numPodsToSchedule: 5000
|
||||
- template:
|
||||
desc: Unschedulable
|
||||
skipWaitUntilInitPodsScheduled: true
|
||||
initPods:
|
||||
- podTemplatePath: config/pod-large-cpu.yaml
|
||||
podsToSchedule:
|
||||
podTemplatePath: config/pod-default.yaml
|
||||
params:
|
||||
- numNodes: 500
|
||||
numInitPods: [200]
|
||||
numPodsToSchedule: 1000
|
||||
- numNodes: 5000
|
||||
numInitPods: [200]
|
||||
numPodsToSchedule: 5000
|
||||
- numNodes: 5000
|
||||
numInitPods: [2000]
|
||||
numPodsToSchedule: 5000
|
||||
|
14
test/integration/scheduler_perf/config/pod-large-cpu.yaml
Normal file
14
test/integration/scheduler_perf/config/pod-large-cpu.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
generateName: pod-
|
||||
spec:
|
||||
containers:
|
||||
- image: k8s.gcr.io/pause:3.2
|
||||
name: pause
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
requests:
|
||||
cpu: 9
|
||||
memory: 500Mi
|
@ -68,6 +68,9 @@ type testCase struct {
|
||||
Nodes nodeCase
|
||||
// configures pods in the cluster before running the tests
|
||||
InitPods []podCase
|
||||
// configures the test to now wait for init pods to schedule before creating
|
||||
// test pods.
|
||||
SkipWaitUntilInitPodsScheduled bool
|
||||
// pods to be scheduled during the test.
|
||||
PodsToSchedule podCase
|
||||
// optional, feature gates to set before running the test
|
||||
@ -156,9 +159,11 @@ func perfScheduling(test testCase, b *testing.B) []DataItem {
|
||||
}
|
||||
total += p.Num
|
||||
}
|
||||
if !test.SkipWaitUntilInitPodsScheduled {
|
||||
if err := waitNumPodsScheduled(b, total, podInformer, setupNamespace); err != nil {
|
||||
b.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
// start benchmark
|
||||
b.ResetTimer()
|
||||
|
Loading…
Reference in New Issue
Block a user