Skip to content

Commit cad4cbc

Browse files
committed
Docs update for OpportunisticBatching
1 parent eb2053c commit cad4cbc

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

content/en/docs/concepts/scheduling-eviction/scheduler-perf-tuning.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,27 @@ Node 1, Node 5, Node 2, Node 6, Node 3, Node 4
159159

160160
After going over all the Nodes, it goes back to Node 1.
161161

162+
## Enabling Opportunistic Batching
163+
164+
{{< feature-state for_k8s_version="v1.35" state="beta" >}}
165+
166+
When scheduling large workloads, pod definitions are typically identical and require scheduler
167+
to perform the same operations over and over again. The [Opportunistic Batching](/docs/reference/command-line-tools-reference/feature-gates/OpportunisticBatching.md)
168+
feature allows scheduler to reuse the intermediate data between scheduling cycles which
169+
greatly speeds up the scheduling process.
170+
171+
The benefits come with certain limitations:
172+
1. Pods need to have equivalent definitions
173+
1. Pods need to be scheduled at the same time (cache expires afer 0.5s)
174+
1. Pods cannot use inter pod affinity/anti-affinity
175+
1. Pods cannot use topology spread constraints
176+
1. Pods cannot use neither DRA nor [DRAExtendedResource](/docs/reference/command-line-tools-reference/feature-gates/DRAExtendedResource.md) feature.
177+
1. Scheduling profile needs to disable [default topology spread](/docs/concepts/scheduling-eviction/topology-spread-constraints/#internal-default-constraints)
178+
1. `IgnorePreferredTermsOfExistingPods` of [InterPodAffinityArgs](/docs/reference/config-api/kube-scheduler-config.v1/#kubescheduler-config-k8s-io-v1-InterPodAffinityArgs)
179+
needs to be set to `true`
180+
1. Whenever exisiting pods use pod affinity constraints that match any of the scheduled pods' labels, the feature may bring no benefit
181+
1. Whenever a custom plugin is used, it needs to implement the Signature extension point
182+
162183
## {{% heading "whatsnext" %}}
163184

164185
* Check the [kube-scheduler configuration reference (v1)](/docs/reference/config-api/kube-scheduler-config.v1/)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: OpportunisticBatching
3+
content_type: feature_gate
4+
_build:
5+
list: never
6+
render: false
7+
8+
stages:
9+
- stage: beta
10+
defaultValue: true
11+
fromVersion: "1.35"
12+
---
13+
Enable reusing of scheduling results from the previous scheduling cycle for equivalent pods.

0 commit comments

Comments
 (0)