Questo contenuto non è disponibile nella lingua selezionata.
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
install-config.yamlfile, add the additional field:cpuPartitioningMode.Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 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
isolatedandreservedCPUs.Recommended performance profile configuration
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Expand Table 20.1. PerformanceProfile CR options for single-node OpenShift clusters PerformanceProfile CR field Description metadata.nameEnsure that
namematches the following fields set in related GitOps ZTP custom resources (CRs):-
include=openshift-node-performance-${PerformanceProfile.metadata.name}inTunedPerformancePatch.yaml -
name: 50-performance-${PerformanceProfile.metadata.name}invalidatorCRs/informDuValidator.yaml
spec.additionalKernelArgs"efi=runtime"Configures UEFI secure boot for the cluster host.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
nodeto the NUMA node where thehugepagesare allocated (node)
spec.realTimeKernelSet
enabledtotrueto use the realtime kernel.spec.workloadHintsUse
workloadHintsto define the set of top level flags for different type of workloads. The example configuration configures the cluster for low latency and high performance.-
Workload partitioning introduces an extended management.workload.openshift.io/cores resource type for platform pods. kubelet advertises the resources and CPU requests by pods allocated to the pool within the corresponding resource. When workload partitioning is enabled, the management.workload.openshift.io/cores resource allows the scheduler to correctly assign pods based on the cpushares capacity of the host, not just the default cpuset.