Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 20. Workload partitioning
In resource-constrained environments, you can use workload partitioning to isolate OpenShift Container Platform services, cluster management workloads, and infrastructure pods to run on a reserved set of CPUs.
The minimum number of reserved CPUs required for the cluster management is four CPU Hyper-Threads (HTs). With workload partitioning, you annotate the set of cluster management pods and a set of typical add-on Operators for inclusion in the cluster management workload partition. These pods operate normally within the minimum size CPU configuration. Additional Operators or workloads outside of the set of minimum cluster management pods require additional CPUs to be added to the workload partition.
Workload partitioning isolates user workloads from platform workloads using standard Kubernetes scheduling capabilities.
The following changes are required for workload partitioning:
In the
file, add the additional field:install-config.yaml.cpuPartitioningModeapiVersion: v1 baseDomain: devcluster.openshift.com cpuPartitioningMode: AllNodes1 compute: - architecture: amd64 hyperthreading: Enabled name: worker platform: {} replicas: 3 controlPlane: architecture: amd64 hyperthreading: Enabled name: master platform: {} replicas: 3- 1
- Sets up a cluster for CPU partitioning at install time. The default value is
None.
NoteWorkload partitioning can only be enabled during cluster installation. You cannot disable workload partitioning postinstallation.
In the performance profile, specify the
andisolatedCPUs.reservedRecommended performance profile configuration
apiVersion: performance.openshift.io/v2 kind: PerformanceProfile metadata: # if you change this name make sure the 'include' line in TunedPerformancePatch.yaml # matches this name: include=openshift-node-performance-${PerformanceProfile.metadata.name} # Also in file 'validatorCRs/informDuValidator.yaml': # name: 50-performance-${PerformanceProfile.metadata.name} name: openshift-node-performance-profile annotations: ran.openshift.io/reference-configuration: "ran-du.redhat.com" spec: additionalKernelArgs: - "rcupdate.rcu_normal_after_boot=0" - "efi=runtime" - "vfio_pci.enable_sriov=1" - "vfio_pci.disable_idle_d3=1" - "module_blacklist=irdma" cpu: isolated: $isolated reserved: $reserved hugepages: defaultHugepagesSize: $defaultHugepagesSize pages: - size: $size count: $count node: $node machineConfigPoolSelector: pools.operator.machineconfiguration.openshift.io/$mcp: "" nodeSelector: node-role.kubernetes.io/$mcp: "" numa: topologyPolicy: "restricted" # To use the standard (non-realtime) kernel, set enabled to false realTimeKernel: enabled: true workloadHints: # WorkloadHints defines the set of upper level flags for different type of workloads. # See https://github.com/openshift/cluster-node-tuning-operator/blob/master/docs/performanceprofile/performance_profile.md#workloadhints # for detailed descriptions of each item. # The configuration below is set for a low latency, performance mode. realTime: true highPowerConsumption: false perPodPowerManagement: falseExpand Table 20.1. PerformanceProfile CR options for single-node OpenShift clusters PerformanceProfile CR field Description metadata.nameEnsure that
matches the following fields set in related GitOps ZTP custom resources (CRs):name-
in
include=openshift-node-performance-${PerformanceProfile.metadata.name}TunedPerformancePatch.yaml -
in
name: 50-performance-${PerformanceProfile.metadata.name}validatorCRs/informDuValidator.yaml
spec.additionalKernelArgsConfigures UEFI secure boot for the cluster host."efi=runtime"spec.cpu.isolatedSet the isolated CPUs. Ensure all of the Hyper-Threading pairs match.
ImportantThe reserved and isolated CPU pools must not overlap and together must span all available cores. CPU cores that are not accounted for cause an undefined behaviour in the system.
spec.cpu.reservedSet the reserved CPUs. When workload partitioning is enabled, system processes, kernel threads, and system container threads are restricted to these CPUs. All CPUs that are not isolated should be reserved.
spec.hugepages.pages-
Set the number of huge pages ()
count -
Set the huge pages size ().
size -
Set to the NUMA node where the
nodeare allocated (hugepages)node
spec.realTimeKernelSet
toenabledto use the realtime kernel.truespec.workloadHintsUse
to define the set of top level flags for different type of workloads. The example configuration configures the cluster for low latency and high performance.workloadHints-
Workload partitioning introduces an extended
management.workload.openshift.io/cores
management.workload.openshift.io/cores
cpushares
cpuset