Skip to content

Commit f93e442

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

File tree

3 files changed

+120
-0
lines changed

3 files changed

+120
-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: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
3+
[id="configuring-shared-cpus-for-a-workload_{context}"]
4+
= Configuring shared CPUs for a workload
5+
6+
Assign peripheral workload application tasks to a set of shared CPUs to improve CPU resource efficiency and workload performance. You can implement shared CPUs for your workloads by completing the following steps:
7+
8+
* Define and enable shared CPUs in a performance profile.
9+
* Pin lightweight application tasks to the shared CPUs.
10+
11+
.Prerequisites
12+
13+
* A bulleted list of conditions that must be satisfied before the user starts the steps in this module.
14+
* Prerequisites can be full sentences or sentence fragments; however, prerequisite list items must be parallel.
15+
16+
.Procedure
17+
18+
. Create a `PerformanceProfile` resource:
19+
20+
.. Create a YAML file that defines the `PerformanceProfile` resource:
21+
+
22+
.Example `shared-cpu-pp.yaml` file
23+
[source,yaml]
24+
----
25+
apiVersion: performance.openshift.io/v2
26+
kind: PerformanceProfile
27+
metadata:
28+
name: example-performance-profile
29+
spec:
30+
cpu:
31+
reserved: "0-1"
32+
isolated: "4-8"
33+
shared: "2-3" <1>
34+
hugepages:
35+
defaultHugepagesSize: "1G"
36+
pages:
37+
- size: "1G"
38+
count: 2
39+
node: 0
40+
realTimeKernel:
41+
enabled: true
42+
workloadHints:
43+
mixedCpus: true
44+
nodeSelector:
45+
node-role.kubernetes.io/performance: "test"
46+
----
47+
<1> Define the shared CPU cores.
48+
<2> Enable the shared CPUs feature by turning on the `mixedCpus` workload hint.
49+
50+
.. Create the `PerformanceProfile` resource by running the following command:
51+
+
52+
+
53+
[source,bash]
54+
----
55+
$ oc create -f shared-cpu-pp.yaml
56+
----
57+
58+
59+
60+
. Include one command or action for each step with the exception of simple follow-step, for example:
61+
.. Do this thing and then select *Next*.
62+
.. Do this other thing and then select *Next*.
63+
64+
. Use an unnumbered bullet (*) if the procedure includes only one step.
65+
66+
.Verification
67+
68+
Delete this section if it does not apply to your module. Provide the user with verification methods for the procedure, such as expected output or commands that confirm success or failure.
69+
70+
* Provide an example of expected command output or a pop-up window that the user receives when the procedure is successful.
71+
* List actions for the user to complete, such as entering a command, to determine the success or failure of the procedure.
72+
* Make each step an instruction.
73+
* Include one command or action per step.
74+
* Use an unnumbered bullet (*) if the verification includes only one step.
75+
76+
[role="_additional-resources"]
77+
.Next steps
78+
79+
* This section is optional.
80+
* Provide a bulleted list of links that contain instructions that might be useful to the user after they complete this procedure.
81+
* Use an unnumbered bullet (*) if the list includes only one step.
82+
83+
NOTE: Do not use *Next steps* to provide a second list of instructions.
84+
85+
[role="_additional-resources"]
86+
.Additional resources
87+
88+
* This section is optional.
89+
* Provide a bulleted list of links to other closely-related material. These links can include `link:` and `xref:` macros.
90+
* Use an unnumbered bullet (*) if the list includes only one step.
91+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="cnf-shared-cpu-for-workloads"]
3+
= Shared CPUs for peripheral workload tasks
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 would be better used for integral, resource-instensive workload demands. You can increase workload performance, and more efficiently use CPU resources, by moving these lightweight tasks to a set of shared CPUs.
10+
11+
You can define a set of shared CPUs by using a performance profile. Shared CPUs are a part of the kublet's `reservedSystemCpus` pool. When you enable shared CPUs, the `reservedSystemCpus` pool is internally partitioned into a `shared` CPU pool and a `reserved` CPU pool. 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.
12+
13+
[NOTE]
14+
====
15+
System housekeeping tasks can only run on shared CPUs when workload partitioning is disabled.
16+
====
17+
18+
19+
include::modules/cnf-about-the-profile-creator-tool.adoc[leveloffset=+1]
20+
21+
22+
23+
[id="{context}-additional-resources"]
24+
[role="_additional-resources"]
25+
== Additional resources
26+
* For more information about xyz

0 commit comments

Comments
 (0)