Merge pull request #134989 from alaypatel07/extended-resources-scheduler-perf

refactor scheduler_perf test for extended resources by dra to have 10-50 device classes
This commit is contained in:
Kubernetes Prow Robot
2025-10-31 03:52:12 -07:00
committed by GitHub
3 changed files with 109 additions and 2 deletions

View File

@@ -18,6 +18,7 @@
# before/after comparisons with benchstat.
# ExtendedResource uses pods with extended resources requests.
# Each pod requests a unique extended resource.
- name: ExtendedResource
featureGates:
DynamicResourceAllocation: true
@@ -58,17 +59,91 @@
initPods: 0
measurePods: 10
maxClaimsPerNode: 10
- name: ExtendedResource_25Classes
featureGates:
DynamicResourceAllocation: true
DRAExtendedResource: true
workloadTemplate:
- opcode: createNodes
countParam: $nodesWithoutDRA
- opcode: createNodes
nodeTemplatePath: ../templates/node-with-dra-test-driver.yaml
countParam: $nodesWithDRA
- opcode: createResourceDriver
driverName: test-driver.cdi.k8s.io
nodes: scheduler-perf-dra-*
maxClaimsPerNodeParam: $maxClaimsPerNode
- opcode: createAny
templatePath: ../templates/deviceclass-extended-resource.yaml
countParam: $classes
- opcode: createPods
namespace: init
countParam: $initPods
podTemplatePath: ../templates/pod-with-extended-resource-mod25.yaml
- opcode: createPods
namespace: test
countParam: $measurePods
podTemplatePath: ../templates/pod-with-extended-resource-mod25.yaml
collectMetrics: true
workloads:
- name: 2000pods_200nodes
params:
classes: 1000
classes: 25
nodesWithDRA: 200
nodesWithoutDRA: 0
initPods: 1000
measurePods: 1000
maxClaimsPerNode: 10
- name: 5000pods_500nodes
labels: [performance]
params:
classes: 2500
classes: 25
nodesWithDRA: 500
nodesWithoutDRA: 0
initPods: 2500
measurePods: 2500
maxClaimsPerNode: 10
- name: ExtendedResource_50Classes
featureGates:
DynamicResourceAllocation: true
DRAExtendedResource: true
workloadTemplate:
- opcode: createNodes
countParam: $nodesWithoutDRA
- opcode: createNodes
nodeTemplatePath: ../templates/node-with-dra-test-driver.yaml
countParam: $nodesWithDRA
- opcode: createResourceDriver
driverName: test-driver.cdi.k8s.io
nodes: scheduler-perf-dra-*
maxClaimsPerNodeParam: $maxClaimsPerNode
- opcode: createAny
templatePath: ../templates/deviceclass-extended-resource.yaml
countParam: $classes
- opcode: createPods
namespace: init
countParam: $initPods
podTemplatePath: ../templates/pod-with-extended-resource-mod50.yaml
- opcode: createPods
namespace: test
countParam: $measurePods
podTemplatePath: ../templates/pod-with-extended-resource-mod50.yaml
collectMetrics: true
workloads:
- name: 2000pods_200nodes
params:
classes: 50
nodesWithDRA: 200
nodesWithoutDRA: 0
initPods: 1000
measurePods: 1000
maxClaimsPerNode: 10
- name: 5000pods_500nodes
labels: [performance]
params:
classes: 50
nodesWithDRA: 500
nodesWithoutDRA: 0
initPods: 2500

View File

@@ -0,0 +1,16 @@
# Pod template for extended resource tests.
# Pods cycle through 25 device classes (example.com/gpu-0 through example.com/gpu-24)
apiVersion: v1
kind: Pod
metadata:
name: test-dra-{{.Index}}
spec:
containers:
- image: registry.k8s.io/pause:3.9
name: pause
resources:
requests:
example.com/gpu-{{mod .Index 25}}: 1
limits:
example.com/gpu-{{mod .Index 25}}: 1

View File

@@ -0,0 +1,16 @@
# Pod template for extended resource tests.
# Pods cycle through 50 device classes (example.com/gpu-0 through example.com/gpu-49)
apiVersion: v1
kind: Pod
metadata:
name: test-dra-{{.Index}}
spec:
containers:
- image: registry.k8s.io/pause:3.9
name: pause
resources:
requests:
example.com/gpu-{{mod .Index 50}}: 1
limits:
example.com/gpu-{{mod .Index 50}}: 1