Skip to content

Commit 8d62037

Browse files
committed
TELCODOCS-1512: Adding content for new feature that enables defining shared CPUs in the performance profile
1 parent ff18e46 commit 8d62037

File tree

3 files changed

+134
-0
lines changed

3 files changed

+134
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2709,6 +2709,9 @@ Topics:
27092709
- Name: Creating a performance profile
27102710
File: cnf-create-performance-profiles
27112711
Distros: openshift-origin,openshift-enterprise
2712+
- Name: Shared CPUs for peripheral workload tasks
2713+
File: cnf-shared-cpu-for-workloads
2714+
Distros: openshift-origin,openshift-enterprise
27122715
- Name: Workload partitioning
27132716
File: enabling-workload-partitioning
27142717
Distros: openshift-origin,openshift-enterprise
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
3+
[id="configuring-shared-cpus-for-a-workload_{context}"]
4+
= Configuring shared CPUs in a performance profile
5+
6+
You can define and enable shared CPUs by using a performance profile. You can use these shared CPUs for lightweight application tasks.
7+
8+
.Prerequisites
9+
10+
* Log in as a user with `cluster-admin` privileges.
11+
12+
.Procedure
13+
14+
. Create a `PerformanceProfile` resource:
15+
16+
.. Create a YAML file that defines the `PerformanceProfile` resource:
17+
+
18+
.Example `shared-cpu-pp.yaml` file
19+
[source,yaml]
20+
----
21+
apiVersion: performance.openshift.io/v2
22+
kind: PerformanceProfile
23+
metadata:
24+
name: example-shared-cpu-pp
25+
spec:
26+
cpu:
27+
reserved: "0-1"
28+
isolated: "4-8"
29+
shared: "2-3" <1>
30+
workloadHints:
31+
mixedCpus: true <2>
32+
nodeSelector:
33+
node-role.kubernetes.io/performance: "test"
34+
----
35+
<1> Define the shared CPU cores.
36+
<2> Enable the shared CPUs feature by enabling on the `mixedCpus` workload hint.
37+
38+
.. Create the `PerformanceProfile` resource by running the following command:
39+
+
40+
[source,bash]
41+
----
42+
$ oc create -f shared-cpu-pp.yaml
43+
----
44+
+
45+
.Example output
46+
[source,terminal]
47+
----
48+
performanceprofile.performance.openshift.io/example-shared-cpu-pp created
49+
----
50+
51+
52+
.Verification
53+
54+
. Verify that the performance profile is active by running the following command:
55+
+
56+
[source,terminal]
57+
----
58+
$ oc describe performanceprofile example-shared-cpu-pp
59+
----
60+
+
61+
.Example output
62+
[source,terminal]
63+
----
64+
...
65+
Events:
66+
Type Reason Age From Message
67+
---- ------ ---- ---- -------
68+
Normal Creation succeeded 27m (x17 over 35m) performance-profile-controller Succeeded to create all components
69+
----
70+
71+
. Verify the shared CPUs are present under the `reservedSystemCPUs` pool:
72+
73+
.. Enter into a debug session on the target node:
74+
+
75+
[source,terminal]
76+
----
77+
$ oc debug node/<node_name>
78+
----
79+
80+
.. Set `/host` as the root directory within the debug shell prompt.
81+
+
82+
[source,terminal]
83+
----
84+
sh-4.4# chroot /host
85+
----
86+
87+
.. Check that the `reservedSystemCPUs` pool includes the `shared` and `reserved` CPUs by running the following command:
88+
+
89+
[source,terminal]
90+
----
91+
sh-5.1# cat /etc/kubernetes/kubelet.conf | grep "reservedSystemCPUs"
92+
----
93+
+
94+
.Example output
95+
[source,terminal]
96+
----
97+
"reservedSystemCPUs": "0-3",
98+
----
99+
100+
[role="_additional-resources"]
101+
.Next steps
102+
103+
* [link to assigning workload tasks to shared CPUs - overkill?]
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="cnf-shared-cpu-for-workloads"]
3+
= Optimize compute resources by using shared CPUs
4+
include::_attributes/common-attributes.adoc[]
5+
:context: cnf-shared-cpu-for-workloads
6+
7+
toc::[]
8+
9+
Within high-performance workloads, some lightweight application tasks can occupy valuable CPU resources. For example, log printing or configuration processing can occupy an isolated core that could be used for critical workload demands. You can increase workload performance, and more efficiently use CPU resources, by moving lightweight application tasks to a set of shared CPUs.
10+
11+
You can define a set of shared CPUs by using a performance profile. When you enable shared CPUs, the kublet's `reservedSystemCpus` pool is internally partitioned into a `shared` CPU pool and a `reserved` CPU pool.
12+
13+
Shared CPUs can process system housekeeping tasks and lightweight workload tasks. In contrast, reserved CPUs only process system housekeeping tasks. This ensures no added latency in system housekeeping tasks, while minor latency in peripheral workload tasks is acceptable.
14+
15+
A typical use-case for shared CPUs is Data Plane Development Kit (DPDK) applications. DPDK applications require intensive data processing, such as packet forwarding, routing, and network function virtualization (NFV). Moving peripheral DPDK application tasks to a set of shared CPUs prevents lightweight tasks from monopolizing isolated cores meant for critical workload processing.
16+
17+
[NOTE]
18+
====
19+
System housekeeping tasks can only run on shared CPUs when workload partitioning is disabled.
20+
====
21+
22+
include::modules/configuring-shared-cpus-for-a-workload.adoc[leveloffset=+1]
23+
24+
25+
[id="{context}-additional-resources"]
26+
[role="_additional-resources"]
27+
== Additional resources
28+
* For more information about xyz

0 commit comments

Comments
 (0)