From bf7aed20399a3879f0a73cfbe49e14875d082744 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Wed, 21 Jan 2026 10:54:42 +0200 Subject: [PATCH] DRA: add scheduler_perf benchmark for implicit resources Add ImplicitExtendedResource_25Classes performance configuration that measures scheduling performance of the implicit extended resources. --- .../extendedresource/performance-config.yaml | 45 +++++++++++++++++++ ...eviceclass-implicit-extended-resource.yaml | 8 ++++ ...with-implicit-extended-resource-mod25.yaml | 16 +++++++ 3 files changed, 69 insertions(+) create mode 100644 test/integration/scheduler_perf/dra/templates/deviceclass-implicit-extended-resource.yaml create mode 100644 test/integration/scheduler_perf/dra/templates/pod-with-implicit-extended-resource-mod25.yaml diff --git a/test/integration/scheduler_perf/dra/extendedresource/performance-config.yaml b/test/integration/scheduler_perf/dra/extendedresource/performance-config.yaml index 5a0e5f64436..8d15fede76d 100644 --- a/test/integration/scheduler_perf/dra/extendedresource/performance-config.yaml +++ b/test/integration/scheduler_perf/dra/extendedresource/performance-config.yaml @@ -149,3 +149,48 @@ initPods: 2500 measurePods: 2500 maxClaimsPerNode: 10 + +- name: ImplicitExtendedResource_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-implicit-extended-resource.yaml + countParam: $classes + - opcode: createPods + namespace: init + countParam: $initPods + podTemplatePath: ../templates/pod-with-implicit-extended-resource-mod25.yaml + - opcode: createPods + namespace: test + countParam: $measurePods + podTemplatePath: ../templates/pod-with-implicit-extended-resource-mod25.yaml + collectMetrics: true + workloads: + - name: 2000pods_200nodes + params: + classes: 25 + nodesWithDRA: 200 + nodesWithoutDRA: 0 + initPods: 1000 + measurePods: 1000 + maxClaimsPerNode: 10 + - name: 5000pods_500nodes + labels: [performance] + params: + classes: 25 + nodesWithDRA: 500 + nodesWithoutDRA: 0 + initPods: 2500 + measurePods: 2500 + maxClaimsPerNode: 10 diff --git a/test/integration/scheduler_perf/dra/templates/deviceclass-implicit-extended-resource.yaml b/test/integration/scheduler_perf/dra/templates/deviceclass-implicit-extended-resource.yaml new file mode 100644 index 00000000000..f6a36ab2d07 --- /dev/null +++ b/test/integration/scheduler_perf/dra/templates/deviceclass-implicit-extended-resource.yaml @@ -0,0 +1,8 @@ +apiVersion: resource.k8s.io/v1beta2 +kind: DeviceClass +metadata: + name: test-class-{{.Index}} +spec: + selectors: + - cel: + expression: device.driver == "test-driver.cdi.k8s.io" diff --git a/test/integration/scheduler_perf/dra/templates/pod-with-implicit-extended-resource-mod25.yaml b/test/integration/scheduler_perf/dra/templates/pod-with-implicit-extended-resource-mod25.yaml new file mode 100644 index 00000000000..4dd57815aa4 --- /dev/null +++ b/test/integration/scheduler_perf/dra/templates/pod-with-implicit-extended-resource-mod25.yaml @@ -0,0 +1,16 @@ +# Pod template for implicit extended resource tests. +# Pods cycle through 25 device classes: +# from deviceclass.resource.kubernetes.io/test-class-0 to deviceclass.resource.kubernetes.io/test-class-24 +apiVersion: v1 +kind: Pod +metadata: + name: test-dra-{{.Index}} +spec: + containers: + - image: registry.k8s.io/pause:3.9 + name: pause + resources: + requests: + deviceclass.resource.kubernetes.io/test-class-{{mod .Index 25}}: 1 + limits: + deviceclass.resource.kubernetes.io/test-class-{{mod .Index 25}}: 1