mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
40 lines
1.8 KiB
Plaintext
40 lines
1.8 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * ai_workloads/kueue/configuring-fairsharing.adoc
|
|
|
|
:_mod-docs-content-type: REFERENCE
|
|
[id="clusterqueue-share-value_{context}"]
|
|
= Cluster queue weights
|
|
|
|
After you have enabled fair sharing, you must set share values for each cluster queue before fair sharing can take place. Share values are represented as the `weight` value in a `ClusterQueue` object.
|
|
|
|
Share values are important because they allow administrators to prioritize specific job types or teams. Critical applications or high-priority teams can be configured with a weighted value so that they receive a proportionally larger share of the available resources. Configuring weights ensures that unused resources are distributed according to defined organizational or project priorities rather than on a first-come, first-served basis.
|
|
|
|
The `weight` value, or share value, defines a comparative advantage for the cluster queue when competing for borrowable resources. Generally, {kueue-name} admits jobs with a lower share value first. Jobs with a higher share value are more likely to be preempted before those with lower share values.
|
|
|
|
.Example cluster queue with a fair sharing weight configured
|
|
[source,yaml]
|
|
----
|
|
apiVersion: kueue.x-k8s.io/v1beta1
|
|
kind: ClusterQueue
|
|
metadata:
|
|
name: cluster-queue
|
|
spec:
|
|
namespaceSelector: {}
|
|
resourceGroups:
|
|
- coveredResources: ["cpu"]
|
|
flavors:
|
|
- name: default-flavor
|
|
resources:
|
|
- name: cpu
|
|
nominalQuota: 9
|
|
cohort: example-cohort
|
|
fairSharing:
|
|
weight: 2
|
|
----
|
|
|
|
[id="clusterqueue-share-value-zero_{context}"]
|
|
== Zero weight
|
|
|
|
A `weight` value of `0` represents an infinite share value. This means that the cluster queue is always at a disadvantage compared to others, and its workloads are always the first to be preempted when fair sharing is enabled.
|