|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * configure/gangscheduling.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: REFERENCE |
| 6 | +[id="configuring-gangscheduling_{context}"] |
| 7 | += Configuring gang scheduling |
| 8 | + |
| 9 | +You can configure gang scheduling by modifying the `gangScheduling` spec in the `Kueue` custom resource (CR). |
| 10 | + |
| 11 | +.Example `Kueue` CR with gang scheduling configured |
| 12 | +[source,yaml] |
| 13 | +---- |
| 14 | +apiVersion: kueue.openshift.io/v1 |
| 15 | +kind: Kueue |
| 16 | +metadata: |
| 17 | + name: cluster |
| 18 | + labels: |
| 19 | + app.kubernetes.io/managed-by: kustomize |
| 20 | + app.kubernetes.io/name: kueue-operator |
| 21 | + namespace: openshift-kueue-operator |
| 22 | +spec: |
| 23 | + config: |
| 24 | + gangScheduling: |
| 25 | + policy: ByWorkload # <1> |
| 26 | + byWorkload: |
| 27 | + admission: Parallel # <2> |
| 28 | +# ... |
| 29 | +---- |
| 30 | +<1> You can set the `policy` value to enable or disable gang scheduling. The possible values are `ByWorkload`, `None`, or empty (`""`). |
| 31 | ++ |
| 32 | +`ByWorkload`:: When the `policy` value is set to `ByWorkload`, each job is processed and considered for admission as a single unit. If the job does not become ready within the specified time, the entire job is evicted and retried at a later time. |
| 33 | ++ |
| 34 | +`None`:: When the `policy` value is set to `None`, gang scheduling is disabled. |
| 35 | ++ |
| 36 | +Empty (`""`):: When the `policy` value is empty or set to `""`, the {product-title} Operator determines settings for gang scheduling. Currently, gang scheduling is disabled by default. |
| 37 | +<2> If the `policy` value is set to `ByWorkload`, you must configure job admission settings. The possible values for the `admission` spec are `Parallel`, `Sequential`, or empty (`""`). |
| 38 | ++ |
| 39 | +`Parallel`:: When the `admission` value is set to `Parallel`, pods from any job can be admitted at any time. This can cause a deadlock, where jobs are in contention for cluster capacity. When a deadlock occurs, the successful scheduling of pods from another job can prevent the scheduling of pods from the current job. |
| 40 | ++ |
| 41 | +`Sequential`:: When the `admission` value is set to `Sequential`, only pods from the currently processing job are admitted. After all of the pods from the current job have been admitted and are ready, {product-title} processes the next job. Sequential processing can slow down admission when the cluster has sufficient capacity for multiple jobs, but provides a higher likelihood that all of the pods for a job are scheduled together successfully. |
| 42 | ++ |
| 43 | +Empty (`""`):: When the `admission` value is empty or set to `""`, the {product-title} Operator determines job admission settings. Currently, the `admission` value is set to `Parallel` by default. |
0 commit comments