Skip to content

Commit

Permalink
Update documentation for strategies
Browse files Browse the repository at this point in the history
Change-Id: I4d56c73f4a949fa5c2b2053fd83a7161553755b0
  • Loading branch information
alculquicondor committed May 6, 2024
1 parent 6dce54c commit a93e785
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
15 changes: 11 additions & 4 deletions apis/config/v1beta1/configuration_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,17 @@ type FairSharing struct {
// The preemption algorithm will only use the next strategy in the list if the
// incoming workload (preemptor) doesn't fit after using the previous strategies.
// Possible values are:
// - LessThanOrEqualToFinalShare: Only preempt if the share of the preemptor CQ
// will be less than or equal to the share of the preemptee CQ after the preemption occurs.
// - LessThanInitialShare: Only preempt if the share of the preemptor CQ will be strictly less
// than the share of the preemptee CQ before the preemption.
// - LessThanOrEqualToFinalShare: Only preempt a workload if the share of the preemptor CQ
// with the preemptor workload is less than or equal to the share of the preemptee CQ
// without the workload to be preempted.
// This strategy might favor preemption of smaller workloads in the preemptee CQ,
// regardless of priority or start time, in an effort to keep the share of the CQ
// as high as possible.
// - LessThanInitialShare: Only preempt a workload if the share of the preemptor CQ
// with the incoming workload is strictly less than the share of the preemptee CQ.
// This strategy doesn't depend on the share usage of the workload being preempted.
// As a result, the strategy chooses to preempt workloads with the lowest priority and
// newest start time first.
// The default strategy is ["LessThanOrEqualToFinalShare"].
PreemptionStrategies []PreemptionStrategy `json:"preemptionStrategies,omitempty"`
}
15 changes: 11 additions & 4 deletions site/content/en/docs/reference/kueue-config.v1beta1.md
Original file line number Diff line number Diff line change
Expand Up @@ -432,10 +432,17 @@ The preemption algorithm will only use the next strategy in the list if the
incoming workload (preemptor) doesn't fit after using the previous strategies.
Possible values are:</p>
<ul>
<li>LessThanOrEqualToFinalShare: Only preempt if the share of the preemptor CQ
will be less than or equal to the share of the preemptee CQ after the preemption occurs.</li>
<li>LessThanInitialShare: Only preempt if the share of the preemptor CQ will be strictly less
than the share of the preemptee CQ before the preemption.
<li>LessThanOrEqualToFinalShare: Only preempt a workload if the share of the preemptor CQ
with the preemptor workload is less than or equal to the share of the preemptee CQ
without the workload to be preempted.
This strategy might favor preemption of smaller workloads in the preemptee CQ,
regardless of priority or start time, in an effort to keep the share of the CQ
as high as possible.</li>
<li>LessThanInitialShare: Only preempt a workload if the share of the preemptor CQ
with the incoming workload is strictly less than the share of the preemptee CQ.
This strategy doesn't depend on the share usage of the workload being preempted.
As a result, the strategy chooses to preempt workloads with the lowest priority and
newest start time first.
The default strategy is [&quot;LessThanOrEqualToFinalShare&quot;].</li>
</ul>
</td>
Expand Down

0 comments on commit a93e785

Please sign in to comment.