Skip to content

Commit 9fec0c0

Browse files
RUN-14095 added images.
1 parent 49b4174 commit 9fec0c0

File tree

5 files changed

+31
-22
lines changed

5 files changed

+31
-22
lines changed
15.2 KB
Loading
14.3 KB
Loading
18.2 KB
Loading
17.1 KB
Loading

docs/Researcher/scheduling/node-level-scheduler.md

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,46 +7,55 @@ authors:
77
date: 2024-Apr-4
88
---
99

10-
Node Level Scheduler optimizes the performance of your pods and maximizes the utilization of GPUs by making optimal local decisions on GPU allocation to your pods. While the Cluster Scheduler chooses the specific node for a POD, but has no visibility to node’s GPUs internal state, the Node Level Scheduler is aware of the local GPUs states and makes optimal local decisions such that it can optimize both the GPU utilization and pods’ performance running on the node’s GPUs.
10+
The Node Level Scheduler optimizes the performance of your pods and maximizes the utilization of GPUs by making optimal local decisions on GPU allocation to your pods. While the Cluster Scheduler chooses the specific node for a POD, but has no visibility to node’s GPUs internal state, the Node Level Scheduler is aware of the local GPUs states and makes optimal local decisions such that it can optimize both the GPU utilization and pods’ performance running on the node’s GPUs.
1111

1212
Node Level Scheduler applies to all workload types, but will best optimize the performance of burstable workloads, giving those more GPU memory than requested and up to the limit specified. Be aware, burstable workloads are always susceptible to an OOM Kill signal if the owner of the excess memory requires it back. This means that using the Node Level Scheduler with Inference or Training workloads may cause pod preemption. Interactive workloads that are using notebooks behave differently since the OOM Kill signal will cause the GPU process to exit but not the notebook, hence keeping the Interactive pod running and retrying to attach a GPU again. This makes Interactive workloads with notebooks a great use case for burstable workloads and Node Level Scheduler.
13-
Interactive Notebooks Use Case
13+
14+
## Interactive Notebooks Use Case
15+
1416
Consider the following example of a node with 2 GPUs and 2 interactive pods that are submitted and want GPU resources.
1517

16-
[Add picture #1]
18+
![Unallocated GPU nodes](img/gpu-node-1.png)
1719

1820
The Scheduler instructs the node to put the two pods on a single GPU, bin packing a single GPU and leaving the other free for a workload that might want a full GPU or more than half GPU. However that would mean GPU#2 is idle while the two notebooks can only use up to half a GPU, even if they temporarily need more.
1921

20-
[Add picture #2]
22+
![Single allocated GPU node](img/gpu-node-2.png)
2123

2224
However, with Node Level Scheduler enabled, the local decision will be to spread those two pods on two GPUs and allow them to maximize bot pods’ performance and GPUs’ utilization by bursting out up to the full GPU memory and GPU compute resources.
2325

24-
[Add picture #3]
26+
![Two allocated GPU nodes](img/gpu-node-3.png)
2527

26-
The Cluster Scheduler still sees a node with a full empty GPU.
27-
When a 3rd pod is scheduled, and it requires a full GPU (or more than 0.5 GPU), the scheduler will send it to that node, and Node Level Scheduler will move one of the Interactive workloads to run with the other pod in GPU#1, as was the Cluster Scheduler initial plan.
28+
The Cluster Scheduler still sees a node with a full empty GPU.
29+
When a 3rd pod is scheduled, and it requires a full GPU (or more than 0.5 GPU), the scheduler will send it to that node, and Node Level Scheduler will move one of the Interactive workloads to run with the other pod in GPU#1, as was the Cluster Scheduler initial plan.
2830

29-
[Add picture #4]
31+
![Node Level Scheduler locally optimized GPU nodes](img/gpu-node-4.png)
3032

31-
This is an example of one scenario that shows how Node Level Scheduler locally optimizes and maximizes GPU utilization and pods’ performance.
33+
This is an example of one scenario that shows how Node Level Scheduler locally optimizes and maximizes GPU utilization and pods’ performance.
3234

33-
How to configure Node Level Scheduler
35+
## How to configure Node Level Scheduler
3436

3537
Node Level Scheduler can be enabled per Node-Pool, giving the Administrator the option to decide which Node-Pools will be used with this new feature.
3638

37-
To use Node Level Scheduler the Administrator should follow the steps:
38-
Enable Node Level Scheduler at the cluster level (per cluster), edit the runaiconfigs file and set:
39-
spec:
40-
global:
41-
core:
42-
nodeScheduler:
43-
enabled: true
44-
The Administrator can also use this patch command to perform the change:
45-
kubectl patch -n runai runaiconfigs.run.ai/runai --type='merge' --patch '{"spec":{"global":{"core":{"nodeScheduler":{"enabled": true}}}}}'
39+
To use Node Level Scheduler the Administrator should follow the steps:
4640

47-
1. Enable ‘GPU resource optimization’ on your tenant’s, go to your tenant’s UI: ‘Settings->General->Resources->GPU Resource Optimization’ and enable the flag.
41+
1. Enable Node Level Scheduler at the cluster level (per cluster), edit the `runaiconfig` file and set:
4842

49-
2. Enable ‘Node Level Scheduler’ on any of the Node Pools you want to use this feature. Go to the tenant’s UI ‘Node Pools’ tab (under ‘Nodes’), and either create a new Node-Pool or edit an existing Node-Pool. In the Node-Pool’s form, under the ‘Resource Utilization Optimization’ tab - change the ‘Number of workloads on each GPU’ to any value other than ‘Not Enforced’ (i.e. 2, 3, 4, 5).
43+
```YAML
44+
spec:
45+
global:
46+
core:
47+
nodeScheduler:
48+
enabled: true
49+
```
5050
51-
The Node Level Scheduler is now ready to be used on that Node-Pool.
51+
The Administrator can also use this patch command to perform the change:
52+
53+
```bash
54+
kubectl patch -n runai runaiconfigs.run.ai/runai --type='merge' --patch '{"spec":{"global":{"core":{"nodeScheduler":{"enabled": true}}}}}'
55+
```
5256
57+
2. To enable ‘GPU resource optimization’ on your tenant’s, go to your tenant’s UI and press *Tools & Settings*, *General*, the open the *Resources* pane and toggle *Resource Optimization* to on.
58+
59+
3. To enable ‘Node Level Scheduler’ on any of the Node Pools you want to use this feature, go to the tenant’s UI ‘Node Pools’ tab (under ‘Nodes’), and either create a new Node-Pool or edit an existing Node-Pool. In the Node-Pool’s form, under the ‘Resource Utilization Optimization’ tab, change the ‘Number of workloads on each GPU’ to any value other than ‘Not Enforced’ (i.e. 2, 3, 4, 5).
60+
61+
The Node Level Scheduler is now ready to be used on that Node-Pool.

0 commit comments

Comments
 (0)