Added a benchmark to evaluate overhead of unschedulable pods

This commit is contained in:
Abdullah Gharaibeh 2020-06-04 14:51:26 -04:00
parent b8b4186a14
commit 36a3ad8752
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