Skip to content

Commit 4ad1671

Browse files
committed
OSDOCS-14877: Fair sharing Kueue docs
1 parent 6266219 commit 4ad1671

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ Topics:
5555
File: configuring-quotas
5656
- Name: Using cohorts
5757
File: using-cohorts
58+
- Name: Configuring fair sharing
59+
File: configuring-fairsharing
5860
---
5961
Name: Support
6062
Dir: support
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
include::_attributes/common-attributes.adoc[]
3+
[id="configuring-fairsharing"]
4+
= Configuring fair sharing
5+
:context: configuring-fairsharing
6+
7+
toc::[]
8+
9+
Fair sharing is a preemption strategy that is used to achieve an equal or weighted share of borrowable resources between the tenants of a cohort. Borrowable resources are the unused nominal quota of all the cluster queues in a cohort.
10+
11+
You can configure fair sharing by setting the `preemptionPolicy` value in the `Kueue` custom resource (CR) to `FairSharing`.
12+
13+
include::modules/clusterqueue-share-value.adoc[leveloffset=+1]
14+
15+
[role="_additional-resources"]
16+
[id="additional-resources_{context}"]
17+
== Additional resources
18+
* xref:../install/install-kueue.adoc#create-kueue-cr_install-kueue[Creating a `Kueue` custom resource]

modules/clusterqueue-share-value.adoc

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * configure/configuring-fairsharing.adoc
4+
5+
:_mod-docs-content-type: REFERENCE
6+
[id="clusterqueue-share-value_{context}"]
7+
= Cluster queue weights
8+
9+
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.
10+
11+
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.
12+
13+
The `weight` value, or share value, defines a comparative advantage for the cluster queue when competing for borrowable resources. Generally, {product-title} 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.
14+
15+
.Example cluster queue with a fair sharing weight configured
16+
[source,yaml]
17+
----
18+
apiVersion: kueue.x-k8s.io/v1beta1
19+
kind: ClusterQueue
20+
metadata:
21+
name: example-queue
22+
spec:
23+
namespaceSelector: {}
24+
resourceGroups:
25+
- coveredResources: ["cpu"]
26+
flavors:
27+
- name: default-flavor
28+
resources:
29+
- name: cpu
30+
nominalQuota: 9
31+
cohort: example-cohort
32+
fairSharing:
33+
weight: 2
34+
----
35+
36+
[id="clusterqueue-share-value-zero_{context}"]
37+
== Zero weight
38+
39+
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.

0 commit comments

Comments
 (0)