|
| 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 | + |
0 commit comments