Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jobset] Partial-Admission KEP #1001

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions keps/420-partial-admission/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- [Jobframework](#jobframework)
- [batch/Job controller](#batchjob-controller)
- [kubeflow/MPIJob controller](#kubeflowmpijob-controller)
- [kubernetes-sigs/jobset](#kubernetes-sigsjobset)
- [Test Plan](#test-plan)
- [Unit Tests](#unit-tests)
- [Integration tests](#integration-tests)
Expand Down Expand Up @@ -70,6 +71,14 @@ type PodSet struct {
// enabled.
// +optional
MinCount *int32 `json:"minCount,omitempty"`

// partialAdmissionDecrementStep is the step in which partialadmission will decremet the admission count.
//
// If this is provided, both minCount and count should be a multiple of it.
// If not provided and partial admission for the current PodSet is enabled this will be considered 1.
// This field is ignored if partial admission is not enabled (minCount == nil)
// +optional
PartialAdmissionDecrementStep *int32 `json:"partialAdmissionDecrementStep,omitempty"`
}

```
Expand All @@ -80,6 +89,8 @@ In case the workload proposed for the current scheduling cycle, does not fit, wi

The search should be optimized (binary search) and preserve the proportion of pods lost across the variable count PodSets.

If `partialAdmissionDecrementStep` is provided, the returned acceptable count will be rounded down to the closest multiple of `partialAdmissionDecrementStep`.

The accepted number of pods in each PodSet are recorded in `workload.Status.Admission.PodSetAssignments[*].ResourceUsage.Count`

In order to evaluate the potential success of the preemption, the preemption process should be split in:
Expand Down Expand Up @@ -144,6 +155,21 @@ In case of MPIJob `j.Spec.RunPolicy.SchedulingPolicy.MinAvailable` can be used t
Whether an MPIJob supports partial admission or not can be deduced based on `MinAvailable` without the need of a dedicated annotation.
Additional research is needed into the potential usage of multiple variable count PodSets.

### kubernetes-sigs/jobset

Besides adapting `RunWithPodSetsInfo` and `RestorePodSetsInfo` it should also:

- rework `PodSets()` to populate `MinCount` and `PartialAdmissionDecrementStep` if the jobset is marked to support partial admission.
* jobsets supporting partial admission should have a dedicated annotation. eg. `kueue.x-k8s.io/jobset-min-replicas`, indicating the index of the replicated job that supports partial admission as well as the minimum `replicas` acceptable.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of another annotation, would it make sense for JobSet to have a minReplicas field in their PodSet definition?
@ahg-g

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping @ahg-g


```
MinCount = minimumReplicas * replicatedJobParallelism
PartialAdmissionDecrementStep = replicatedJobParallelism
```

NOTE: Currently jobset is not supporting `replicas` updates, this needs to be implemented on the jobset side.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you post this on Jobset repo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are going ahead with this, I'll open an issue on jobset side and try to provide the implementation.



### Test Plan

No regressions in the current test should be observed.
Expand Down