|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// *scalability_and_performance/cnf-provisioning-and-installing-a-distributed-unit.adoc |
| 4 | + |
| 5 | +[id="cnf-du-creating-a-machine-config-manifest-for-workload-partitioning_{context}"] |
| 6 | + |
| 7 | += Creating a machine config manifest for workload partitioning |
| 8 | + |
| 9 | +Part of configuring workload partitioning requires you to provide a `MachineConfig` manifest during installation to configure CRI-O and kubelet for the workload types. |
| 10 | + |
| 11 | +The manifest, without the encoded file content, looks like this: |
| 12 | + |
| 13 | +[source,yaml] |
| 14 | +---- |
| 15 | +apiVersion: machineconfiguration.openshift.io/v1 |
| 16 | +kind: MachineConfig |
| 17 | +metadata: |
| 18 | + labels: |
| 19 | + machineconfiguration.openshift.io/role: master |
| 20 | + name: 02-master-workload-partitioning |
| 21 | +spec: |
| 22 | + config: |
| 23 | + ignition: |
| 24 | + version: 3.2.0 |
| 25 | + storage: |
| 26 | + files: |
| 27 | + - contents: |
| 28 | + source: data:text/plain;charset=utf-8;base64,<01-workload-partitioning-content> |
| 29 | + mode: 420 |
| 30 | + overwrite: true |
| 31 | + path: /etc/crio/crio.conf.d/01-workload-partitioning |
| 32 | + user: |
| 33 | + name: root |
| 34 | + - contents: |
| 35 | + source: data:text/plain;charset=utf-8;base64,<openshift-workload-pinning content> |
| 36 | + mode: 420 |
| 37 | + overwrite: true |
| 38 | + path: /etc/kubernetes/openshift-workload-pinning |
| 39 | + user: |
| 40 | + name: root |
| 41 | +---- |
| 42 | + |
| 43 | +The contents of `/etc/crio/crio.conf.d/01-workload-partitioning` should look like this. |
| 44 | + |
| 45 | +[source,yaml] |
| 46 | +---- |
| 47 | +[crio.runtime.workloads.management] |
| 48 | +activation_annotation = "target.workload.openshift.io/management" |
| 49 | +annotation_prefix = "resources.workload.openshift.io" |
| 50 | +resources = { "cpushares" = 0, "cpuset" = "0-1,52-53" } <1> |
| 51 | +---- |
| 52 | +<1> The `cpuset` value will vary based on the installation. |
| 53 | + |
| 54 | +If hyperthreading is enabled, specify both threads of each core. The `cpuset` must match the reserved CPU set specified in the performance profile. |
| 55 | + |
| 56 | + |
| 57 | +This content should be base64 encoded and provided in the `01-workload-partitioning-content` in the manifest above. |
| 58 | + |
| 59 | +The contents of `/etc/kubernetes/openshift-workload-pinning` should look like this: |
| 60 | + |
| 61 | +---- |
| 62 | +{ |
| 63 | + "management": { |
| 64 | + "cpuset": "0-1,52-53" <1> |
| 65 | + } |
| 66 | +} |
| 67 | +---- |
| 68 | +<1> The `cpuset` must match the value in `/etc/crio/crio.conf.d/01-workload-partitioning`. |
| 69 | + |
| 70 | +This content should be base64 encoded and provided in the `openshift-workload-pinning-content` in the preceding manifest. |
| 71 | + |
| 72 | +[NOTE] |
| 73 | +==== |
| 74 | +The `cpuset` specified must match the reserved `cpuset` specified in the Performance Addon Operator profile. |
| 75 | +==== |
| 76 | + |
| 77 | +[NOTE] |
| 78 | +==== |
| 79 | +In this release, configuring machines for workload partitioning must be enabled during installation to work correctly. |
| 80 | +Once enabled, changes to the machine configs that enable the feature are not supported. |
| 81 | +==== |
0 commit comments