8000 fix(kueue): bound a submitted job's request to what a node can supply by evanjpw · Pull Request #916 · google/xmc · GitHub
[go: up one dir, main page]

Skip to content
{"props":{"color_mode":"dark","logged_in":false,"marketing_page":false,"home_path":"/","login_path":"/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogle%2Fxmc%2Fpull%2F916%2Ffiles","signup_path":"/signup?ref_cta=Sign+up\u0026ref_loc=header+logged+out\u0026ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles\u0026source=header-repo\u0026source_repo=google%2Fxmc","signup_enabled":true,"is_signup_controller":false,"show_search_and_nav":true,"hide_search":false,"private_mode_enabled":false,"should_use_dotcom_links":true,"auth_hydro_click":"{\"event_type\":\"authentication.click\",\"payload\":{\"location_in_page\":\"site header menu\",\"repository_id\":null,\"auth_type\":\"SIGN_UP\",\"originating_url\":\"https://github.com/google/xmc/pull/916/files\",\"user_id\":null}}","auth_hydro_click_hmac":"7f33810404eb115692fcfd28461a7462801bd136e9c349149e45123d95d50d52"}}
Merged
Show file tree
Hide file tree
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
18 changes: 18 additions & 0 deletions deploy/helm/templates/kueue-dev/cpu-queue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $limits := (((.Values.queues).cpu).limits) | default dict }}
apiVersion: kueue.x-k8s.io/v1beta2
kind: ResourceFlavor
metadata:
Expand Down Expand Up @@ -39,6 +40,23 @@ kind: Namespace
metadata:
name: "cpu-queue"
---
apiVersion: v1
kind: LimitRange
metadata:
namespace: "cpu-queue"
name: "cpu-queue-defaults"
spec:
limits:
# Supplies the request XMC's jobs cannot send, and a ceiling nothing could
# host. See `queues` in `values.yaml`.
- type: Container
defaultRequest:
cpu: {{ ($limits.defaultRequest).cpu | default "500m" | quote }}
memory: {{ ($limits.defaultRequest).memory | default "2Gi" | quote }}
max:
cpu: {{ ($limits.max).cpu | default "4" | quote }}
memory: {{ ($limits.max).memory | default "16Gi" | quote }}
---
apiVersion: kueue.x-k8s.io/v1beta2
kind: LocalQueue
metadata:
Expand Down
18 changes: 18 additions & 0 deletions deploy/helm/templates/kueue-dev/gpu-queue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $limits := (((.Values.queues).gpu).limits) | default dict }}
apiVersion: kueue.x-k8s.io/v1beta2
kind: ResourceFlavor
metadata:
Expand Down Expand Up @@ -41,6 +42,23 @@ kind: Namespace
metadata:
name: "gpu-queue"
---
apiVersion: v1
kind: LimitRange
metadata:
namespace: "gpu-queue"
name: "gpu-queue-defaults"
spec:
limits:
# Supplies the request XMC's jobs cannot send, and a ceiling nothing could
# host. See `queues` in `values.yaml`.
- type: Container
defaultRequest:
cpu: {{ ($limits.defaultRequest).cpu | default "2" | quote }}
memory: {{ ($limits.defaultRequest).memory | default "12Gi" | quote }}
max:
cpu: {{ ($limits.max).cpu | default "384" | quote }}
memory: {{ ($limits.max).memory | default "1440Gi" | quote }}
---
apiVersion: kueue.x-k8s.io/v1beta2
kind: LocalQueue
metadata:
Expand Down
33 changes: 33 additions & 0 deletions deploy/helm/values.yaml
6E43
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,39 @@ ui:
apiUrl: "https://YOUR_API_HOSTNAME/v1"
refreshIntervalMs: "30000"

# Per-container defaults and ceilings for the queue namespaces, applied as a
# `LimitRange`.
#
# `ResourceSet` puts `cpu_resources` and `gpu_resources` in a `oneof`, so a job
# asking for a GPU cannot also ask for CPU or memory. Its pod arrives with no
# request for either, which makes it BestEffort, and the kubelet evicts
# BestEffort pods first. `defaultRequest` supplies what the client could not
# send. It reaches only containers naming no request of their own, and sets no
# limit, so a job may still burst above it.
#
# `max` is not a promise that a container fits. Quota is a sum over the fleet,
# so a container can be admitted against quota and still find no single node
# with room. Set it to the capacity of the largest node the queue can reach,
# which at least rejects what nothing could ever host. A deployment whose pools
# differ in size can only state the larger.
queues:
cpu:
limits:
defaultRequest:
cpu: "500m"
memory: "2Gi"
max:
cpu: "4"
memory: "16Gi"
gpu:
limits:
defaultRequest:
cpu: "2"
memory: "12Gi"
max:
cpu: "384"
memory: "1440Gi"

# Pass configuration to Kueue sub-chart
kueue:
controllerManager:
Expand Down
Loading
0