Skip to content

Commit 5a836b6

Browse files
authored
add sample that uses --system-reserved-cpu and --system-reserved-memory (#4237)
Signed-off-by: Andrew Sy Kim <[email protected]>
1 parent 9198189 commit 5a836b6

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
apiVersion: ray.io/v1
2+
kind: RayCluster
3+
metadata:
4+
name: raycluster-resource-isolation
5+
spec:
6+
rayVersion: '2.52.0'
7+
headGroupSpec:
8+
rayStartParams:
9+
enable-resource-isolation: "true" # Set --enable-resource-isolation flag in `ray start`
10+
system-reserved-cpu: "2.0"
11+
system-reserved-memory: "4000000000" # 4GB
12+
template:
13+
metadata:
14+
annotations:
15+
node.gke.io/enable-writable-cgroups.ray-head: "true"
16+
spec:
17+
containers:
18+
- name: ray-head
19+
image: rayproject/ray:2.52.0
20+
resources:
21+
limits:
22+
cpu: 4
23+
memory: 8G
24+
requests:
25+
cpu: 4
26+
memory: 8G
27+
ports:
28+
- containerPort: 6379
29+
name: gcs-server
30+
- containerPort: 8265
31+
name: dashboard
32+
- containerPort: 10001
33+
name: client
34+
nodeSelector:
35+
node.gke.io/enable-writable-cgroups: "true"
36+
workerGroupSpecs:
37+
- replicas: 1
38+
minReplicas: 1
39+
maxReplicas: 5
40+
groupName: workergroup
41+
rayStartParams:
42+
enable-resource-isolation: "true" # Set --enable-resource-isolation flag in `ray start`
43+
system-reserved-cpu: "1.0"
44+
system-reserved-memory: "2000000000" # 2GB
45+
template:
46+
metadata:
47+
annotations:
48+
node.gke.io/enable-writable-cgroups.ray-worker: "true"
49+
spec:
50+
containers:
51+
- name: ray-worker
52+
image: rayproject/ray:2.52.0
53+
resources:
54+
limits:
55+
cpu: 2
56+
memory: 8G
57+
requests:
58+
cpu: 2
59+
memory: 8G
60+
nodeSelector:
61+
node.gke.io/enable-writable-cgroups: "true"

0 commit comments

Comments
 (0)