Skip to content

Commit ef9e14d

Browse files
committed
scheduler_perf: measure the degradation of daemonset scheduling
1 parent d0aaa66 commit ef9e14d

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

test/integration/scheduler_perf/config/performance-config.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,33 @@
277277
initPods: 5000
278278
measurePods: 1000
279279

280+
# This test case simulates the scheduling of daemonset.
281+
# https://github.com/kubernetes/kubernetes/issues/124709
282+
- name: SchedulingDaemonset
283+
defaultPodTemplatePath: config/templates/daemonset-pod.yaml
284+
workloadTemplate:
285+
# Create one node with a specific name (scheduler-perf-node),
286+
# which is supposed to get all Pods created in this test case.
287+
- opcode: createNodes
288+
count: 1
289+
nodeTemplatePath: config/templates/node-with-name.yaml
290+
# Create other nodes that the scheduler has to filter out with PreFilterResult from NodeAffinity plugin.
291+
- opcode: createNodes
292+
countParam: $initNodes
293+
nodeTemplatePath: config/templates/node-default.yaml
294+
# Create pods with nodeAffinity (metadata.name=scheduler-perf-node).
295+
# This scenario doesn't schedule each Pod to each Node though,
296+
# they go through completely the same scheduling process as daemonset pods does.
297+
- opcode: createPods
298+
countParam: $measurePods
299+
collectMetrics: true
300+
workloads:
301+
- name: 15000Nodes
302+
labels: [performance, fast]
303+
params:
304+
initNodes: 15000
305+
measurePods: 30000
306+
280307
- name: SchedulingNodeAffinity
281308
defaultPodTemplatePath: config/templates/pod-with-node-affinity.yaml
282309
workloadTemplate:
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
generateName: daemonset-
5+
spec:
6+
affinity:
7+
nodeAffinity:
8+
requiredDuringSchedulingIgnoredDuringExecution:
9+
nodeSelectorTerms:
10+
- matchFields:
11+
- key: metadata.name
12+
operator: In
13+
values:
14+
- scheduler-perf-node
15+
containers:
16+
- image: registry.k8s.io/pause:3.10
17+
name: pause
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: v1
2+
kind: Node
3+
metadata:
4+
name: scheduler-perf-node
5+
spec: {}
6+
status:
7+
capacity:
8+
pods: "90000"
9+
cpu: "4"
10+
memory: 32Gi
11+
conditions:
12+
- status: "True"
13+
type: Ready
14+
phase: Running

0 commit comments

Comments
 (0)