|
1 | 1 | // Module included in the following assemblies:
|
2 | 2 | //
|
3 |
| -// scalability_and_performance/cnf-low-latency-tuning.adoc |
| 3 | +// * scalability_and_performance/low_latency_tuning/cnf-tuning-low-latency-nodes-with-perf-profile.adoc |
4 | 4 |
|
5 | 5 | :_mod-docs-content-type: PROCEDURE
|
6 | 6 | [id="configuring_for_irq_dynamic_load_balancing_{context}"]
|
7 |
| -= Configuring a node for IRQ dynamic load balancing |
| 7 | += Configuring node interrupt affinity |
8 | 8 |
|
9 | 9 | Configure a cluster node for IRQ dynamic load balancing to control which cores can receive device interrupt requests (IRQ).
|
10 | 10 |
|
@@ -34,154 +34,8 @@ spec:
|
34 | 34 | +
|
35 | 35 | [NOTE]
|
36 | 36 | ====
|
37 |
| -When you configure reserved and isolated CPUs, the infra containers in pods use the reserved CPUs and the application containers use the isolated CPUs. |
| 37 | +When you configure reserved and isolated CPUs, operating system processes, kernel processes, and systemd services run on reserved CPUs. |
| 38 | +Infrastructure pods run on any CPU except where the low latency workload is running. |
| 39 | +Low latency workload pods run on exclusive CPUs from the isolated pool. |
| 40 | +For more information, see "Restricting CPUs for infra and application containers". |
38 | 41 | ====
|
39 |
| - |
40 |
| -. Create the pod that uses exclusive CPUs, and set `irq-load-balancing.crio.io` and `cpu-quota.crio.io` annotations to `disable`. For example: |
41 |
| -+ |
42 |
| -[source,yaml,subs="attributes+"] |
43 |
| ----- |
44 |
| -apiVersion: v1 |
45 |
| -kind: Pod |
46 |
| -metadata: |
47 |
| - name: dynamic-irq-pod |
48 |
| - annotations: |
49 |
| - irq-load-balancing.crio.io: "disable" |
50 |
| - cpu-quota.crio.io: "disable" |
51 |
| -spec: |
52 |
| - securityContext: |
53 |
| - runAsNonRoot: true |
54 |
| - seccompProfile: |
55 |
| - type: RuntimeDefault |
56 |
| - containers: |
57 |
| - - name: dynamic-irq-pod |
58 |
| - image: "registry.redhat.io/openshift4/cnf-tests-rhel8:v{product-version}" |
59 |
| - command: ["sleep", "10h"] |
60 |
| - resources: |
61 |
| - requests: |
62 |
| - cpu: 2 |
63 |
| - memory: "200M" |
64 |
| - limits: |
65 |
| - cpu: 2 |
66 |
| - memory: "200M" |
67 |
| - securityContext: |
68 |
| - allowPrivilegeEscalation: false |
69 |
| - capabilities: |
70 |
| - drop: [ALL] |
71 |
| - nodeSelector: |
72 |
| - node-role.kubernetes.io/worker-cnf: "" |
73 |
| - runtimeClassName: performance-dynamic-irq-profile |
74 |
| -# ... |
75 |
| ----- |
76 |
| - |
77 |
| -. Enter the pod `runtimeClassName` in the form performance-<profile_name>, where <profile_name> is the `name` from the `PerformanceProfile` YAML, in this example, `performance-dynamic-irq-profile`. |
78 |
| -. Set the node selector to target a cnf-worker. |
79 |
| -. Ensure the pod is running correctly. Status should be `running`, and the correct cnf-worker node should be set: |
80 |
| -+ |
81 |
| -[source,terminal] |
82 |
| ----- |
83 |
| -$ oc get pod -o wide |
84 |
| ----- |
85 |
| -+ |
86 |
| -.Expected output |
87 |
| -+ |
88 |
| -[source,terminal] |
89 |
| ----- |
90 |
| -NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES |
91 |
| -dynamic-irq-pod 1/1 Running 0 5h33m <ip-address> <node-name> <none> <none> |
92 |
| ----- |
93 |
| -. Get the CPUs that the pod configured for IRQ dynamic load balancing runs on: |
94 |
| -+ |
95 |
| -[source,terminal] |
96 |
| ----- |
97 |
| -$ oc exec -it dynamic-irq-pod -- /bin/bash -c "grep Cpus_allowed_list /proc/self/status | awk '{print $2}'" |
98 |
| ----- |
99 |
| -+ |
100 |
| -.Expected output |
101 |
| -+ |
102 |
| -[source,terminal] |
103 |
| ----- |
104 |
| -Cpus_allowed_list: 2-3 |
105 |
| ----- |
106 |
| -. Ensure the node configuration is applied correctly. Log in to the node to verify the configuration. |
107 |
| -+ |
108 |
| -[source,terminal] |
109 |
| ----- |
110 |
| -$ oc debug node/<node-name> |
111 |
| ----- |
112 |
| -+ |
113 |
| -.Expected output |
114 |
| -+ |
115 |
| -[source,terminal] |
116 |
| ----- |
117 |
| -Starting pod/<node-name>-debug ... |
118 |
| -To use host binaries, run `chroot /host` |
119 |
| -
|
120 |
| -Pod IP: <ip-address> |
121 |
| -If you do not see a command prompt, try pressing enter. |
122 |
| -
|
123 |
| -sh-4.4# |
124 |
| ----- |
125 |
| - |
126 |
| -. Verify that you can use the node file system: |
127 |
| -+ |
128 |
| -[source,terminal] |
129 |
| ----- |
130 |
| -sh-4.4# chroot /host |
131 |
| ----- |
132 |
| -+ |
133 |
| -.Expected output |
134 |
| -+ |
135 |
| -[source,terminal] |
136 |
| ----- |
137 |
| -sh-4.4# |
138 |
| ----- |
139 |
| - |
140 |
| -. Ensure the default system CPU affinity mask does not include the `dynamic-irq-pod` CPUs, for example, CPUs 2 and 3. |
141 |
| -+ |
142 |
| -[source,terminal] |
143 |
| ----- |
144 |
| -$ cat /proc/irq/default_smp_affinity |
145 |
| ----- |
146 |
| -+ |
147 |
| -.Example output |
148 |
| -+ |
149 |
| -[source,terminal] |
150 |
| ----- |
151 |
| -33 |
152 |
| ----- |
153 |
| -. Ensure the system IRQs are not configured to run on the `dynamic-irq-pod` CPUs: |
154 |
| -+ |
155 |
| -[source,terminal] |
156 |
| ----- |
157 |
| -find /proc/irq/ -name smp_affinity_list -exec sh -c 'i="$1"; mask=$(cat $i); file=$(echo $i); echo $file: $mask' _ {} \; |
158 |
| ----- |
159 |
| -+ |
160 |
| -.Example output |
161 |
| -+ |
162 |
| -[source,terminal] |
163 |
| ----- |
164 |
| -/proc/irq/0/smp_affinity_list: 0-5 |
165 |
| -/proc/irq/1/smp_affinity_list: 5 |
166 |
| -/proc/irq/2/smp_affinity_list: 0-5 |
167 |
| -/proc/irq/3/smp_affinity_list: 0-5 |
168 |
| -/proc/irq/4/smp_affinity_list: 0 |
169 |
| -/proc/irq/5/smp_affinity_list: 0-5 |
170 |
| -/proc/irq/6/smp_affinity_list: 0-5 |
171 |
| -/proc/irq/7/smp_affinity_list: 0-5 |
172 |
| -/proc/irq/8/smp_affinity_list: 4 |
173 |
| -/proc/irq/9/smp_affinity_list: 4 |
174 |
| -/proc/irq/10/smp_affinity_list: 0-5 |
175 |
| -/proc/irq/11/smp_affinity_list: 0 |
176 |
| -/proc/irq/12/smp_affinity_list: 1 |
177 |
| -/proc/irq/13/smp_affinity_list: 0-5 |
178 |
| -/proc/irq/14/smp_affinity_list: 1 |
179 |
| -/proc/irq/15/smp_affinity_list: 0 |
180 |
| -/proc/irq/24/smp_affinity_list: 1 |
181 |
| -/proc/irq/25/smp_affinity_list: 1 |
182 |
| -/proc/irq/26/smp_affinity_list: 1 |
183 |
| -/proc/irq/27/smp_affinity_list: 5 |
184 |
| -/proc/irq/28/smp_affinity_list: 1 |
185 |
| -/proc/irq/29/smp_affinity_list: 0 |
186 |
| -/proc/irq/30/smp_affinity_list: 0-5 |
187 |
| ----- |
0 commit comments