You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/proposals/scheduling/20220530-fine-grained-cpu-orchestration.md
+16-13Lines changed: 16 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ reviewers:
11
11
- "@stormgbs"
12
12
- "@zwzhang0107"
13
13
creation-date: 2022-05-30
14
-
last-updated: 2022-08-02
14
+
last-updated: 2022-12-02
15
15
status: provisional
16
16
17
17
---
@@ -34,9 +34,9 @@ status: provisional
34
34
-[Story 6](#story-6)
35
35
-[Design Details](#design-details)
36
36
-[Basic CPU orchestration principles](#basic-cpu-orchestration-principles)
37
-
- [Koordinator QoS CPU orchestration principles](#koordinator-qos-cpu-orchestration-principles)
38
-
- [Compatible kubelet CPU management policies](#compatible-kubelet-cpu-management-policies)
39
-
- [Take over kubelet CPU management policies](#take-over-kubelet-cpu-management-policies)
37
+
-[Koordinator QoS CPU orchestration principles](#koordinator-qos-cpu-orchestration-principles)
38
+
-[Compatible kubelet CPU management policies](#compatible-kubelet-cpu-management-policies)
39
+
-[Take over kubelet CPU management policies](#take-over-kubelet-cpu-management-policies)
40
40
-[CPU orchestration API](#cpu-orchestration-api)
41
41
-[Application CPU CPU orchestration API](#application-cpu-cpu-orchestration-api)
42
42
- [Resource spec](#resource-spec)
@@ -135,27 +135,29 @@ As the application scaling or rolling deployment, the best-fit allocatable space
135
135
1. Koordinator divides the CPU on the machine into `CPU Shared Pool`, `statically exclusive CPUs` and `BE CPU Shared Pool`.
136
136
1. The `CPU Shared Pool` is the set of CPUs on which any containers in `K8s Burstable` and `Koordinator LS` Pods run. Containers in `K8s Guaranteed` pods with `fractional CPU requests` also run on CPUs in the shared pool. The shared pool contains all unallocated CPUs in the node but excluding CPUs allocated by K8s Guaranteed, LSE and LSR Pods. If kubelet reserved CPUs, the shared pool includes the reserved CPUs.
137
137
1. The `statically exclusive CPUs` are the set of CPUs on which any containers in `K8s Guaranteed`, `Koordinator LSE` and `LSR` Pods that have integer CPU run. When K8s Guaranteed, LSE and LSR Pods request CPU, koord-scheduler will be allocated from the `CPU Shared Pool`.
138
-
1. The `BE CPU Shared pool` is the set of CPUs on which any containers in `K8s BestEffort` and `Koordinator BE` Pods run. The `BE CPU Shared Pool` contains all CPUs in the node but excluding CPUs allocated by K8s Guaranteed and Koordinator Pods.
138
+
1. The `BE CPU Shared pool` is the set of CPUs on which any containers in `K8s BestEffort` and `Koordinator BE` Pods run. The `BE CPU Shared Pool` contains all CPUs in the node but excluding CPUs allocated by `K8s Guaranteed` and `Koordinator LSE` Pods.
139
139
140
-
####Koordinator QoS CPU orchestration principles
140
+
### Koordinator QoS CPU orchestration principles
141
141
142
-
1. The Request and Limit of LSE/LSR Pods **MUST BE** equal and the CPU value **MUST BE** an integer multiple of 1000.
143
-
1. The CPUs allocated by the LSE Pod are completely **exclusive** and **MUST NOT BE** shared. If the node is hyper-threading architecture, only the logical core dimension is guaranteed to be isolated, but better isolation can be obtained through the `CPUBindPolicyFullPCPUs` policy.
142
+
1. The Request and Limit of LSE/LSR Pods **MUST**be equal and the CPU value **MUST** be an integer multiple of 1000.
143
+
1. The CPUs allocated by the LSE Pod are completely **exclusive** and **MUST NOT** be shared. If the node is hyper-threading architecture, only the logical core dimension is guaranteed to be isolated, but better isolation can be obtained through the `CPUBindPolicyFullPCPUs` policy.
144
144
1. The CPUs allocated by the LSR Pod only can be shared with BE Pods.
145
-
1. LS Pods bind the CPU shared pool that is **exclusive**with LSE/LSR Pods.
146
-
1. BE Pods bind all CPUs in the node **exclusive**with LSE Pods.
145
+
1. LS Pods bind the CPU shared pool, **excluding**CPUs allocated by LSE/LSR Pods.
146
+
1. BE Pods bind all CPUs in the node,**excluding**CPUs allocated by LSE Pods.
147
147
1. The K8s Guaranteed Pods already running is equivalent to Koordinator LSR if kubelet enables the CPU manager `static` policy.
148
148
1. The K8s Guaranteed Pods already running is equivalent to Koordinator LS if kubelet enables the CPU manager `none` policy.
149
149
1. Newly created K8s Guaranteed Pod without Koordinator QoS specified will be treated as LS.
150
150
151
-
#### Compatible kubelet CPU management policies
151
+

152
+
153
+
### Compatible kubelet CPU management policies
152
154
153
155
1. If kubelet set the CPU manager policy options `full-pcpus-only=true` / `distribute-cpus-across-numa=true`, and there is no new CPU bind policy defined by Koordinator in the node, follow the semantics of these parameters defined by the kubelet.
154
156
1. If kubelet set the Topology manager policy, and there is no new NUMA Topology Alignment policy defined by Koordinator in the node, follow the semantics of these parameters defined by the kubelet.
155
157
156
-
####Take over kubelet CPU management policies
158
+
### Take over kubelet CPU management policies
157
159
158
-
Because the CPU reserved by kubelet mainly serves K8s BestEffort and Burstable Pods. But Koordinator will not follow the policy. The K8s Burstable Pods should use the CPU Shared Pool, and the K8s BestEffort Pods should use the `BE CPU Shared Pool`. The Koordinator LSE and LSR Pods can allocate from the CPU reserved by the kubelet.
160
+
Because the CPU reserved by kubelet mainly serves K8s BestEffort and Burstable Pods. But Koordinator will not follow the policy. The K8s Burstable Pods should use the CPU Shared Pool, and the K8s BestEffort Pods should use the `BE CPU Shared Pool`.
159
161
160
162
1. For K8s Burstable and Koordinator LS Pods:
161
163
1. When the koordlet starts, calculates the `CPU Shared Pool` and applies the shared pool to all Burstable and LS Pods in the node, that is, updating their cgroups to set cpuset. The same logic is executed when LSE/LSR Pods are creating or destroying.
@@ -704,3 +706,4 @@ type ScoringStrategy struct {
704
706
- 2022-07-11: Adjust CPUBindPolicyNone to CPUBindPolicyDefault
705
707
- 2022-08-02: Update PodCPUAllocs definition
706
708
- 2022-09-08: Add ReservedCPUs in KubeletCPUManagerPolicy
709
+
- 2022-12-02: Clarify the mistakes in the original text and add QoS CPU orchestration picture
0 commit comments