Merge pull request #91787 from ahg-g/ahg-bench

A benchmark to evaluate overhead of unschedulable pods
This commit is contained in:
Kubernetes Prow Robot 2020-06-05 20:49:45 -07:00 committed by GitHub
commit f72299b09f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 2 deletions

View File

@ -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

View 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

View File

@ -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,8 +159,10 @@ func perfScheduling(test testCase, b *testing.B) []DataItem {
}
total += p.Num
}
if err := waitNumPodsScheduled(b, total, podInformer, setupNamespace); err != nil {
b.Fatal(err)
if !test.SkipWaitUntilInitPodsScheduled {
if err := waitNumPodsScheduled(b, total, podInformer, setupNamespace); err != nil {
b.Fatal(err)
}
}
// start benchmark