From c75ada9e0465928d97b3ebaeb105149009a592ef Mon Sep 17 00:00:00 2001 From: Simon Mo Date: Mon, 11 Nov 2019 14:06:34 -0800 Subject: [PATCH] [Autoscaler][K8s] Enforce memory limit in k8s yaml (#6138) * Enforce memory limit in k8s yaml * Update python/ray/autoscaler/kubernetes/example-full.yaml Co-Authored-By: Edward Oakes * Line wrap --- python/ray/autoscaler/kubernetes/example-full.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/python/ray/autoscaler/kubernetes/example-full.yaml b/python/ray/autoscaler/kubernetes/example-full.yaml index df6c97f06..b78c15f14 100644 --- a/python/ray/autoscaler/kubernetes/example-full.yaml +++ b/python/ray/autoscaler/kubernetes/example-full.yaml @@ -135,6 +135,15 @@ head_node: requests: cpu: 1000m memory: 512Mi + limits: + # The maximum memory that this pod is allowed to use. The + # limit will be detected by ray and split to use 10% for + # redis, 30% for the shared memory object store, and the + # rest for application memory. If this limit is not set and + # the object store size is not set manually, ray will + # allocate a very large object store in each pod that may + # cause problems for other pods. + memory: 2Gi env: # This is used in the head_start_ray_commands below so that # Ray can spawn the correct number of processes. Omitting this @@ -191,6 +200,10 @@ worker_nodes: requests: cpu: 1000m memory: 512Mi + limits: + # This memory limit will be detected by ray and split into + # 30% for plasma, and 70% for workers. + memory: 2Gi env: # This is used in the head_start_ray_commands below so that # Ray can spawn the correct number of processes. Omitting this