mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
Updates for Max David's comments Adding merge comparison Reorg for clarity Updates for David
81 lines
2.9 KiB
Plaintext
81 lines
2.9 KiB
Plaintext
:_mod-docs-content-type: SNIPPET
|
|
[source,yaml]
|
|
----
|
|
apiVersion: ran.openshift.io/v1
|
|
kind: PolicyGenTemplate
|
|
metadata:
|
|
name: "example-sno-workers"
|
|
namespace: "example-sno"
|
|
spec:
|
|
bindingRules:
|
|
sites: "example-sno" <1>
|
|
mcp: "worker" <2>
|
|
sourceFiles:
|
|
- fileName: MachineConfigGeneric.yaml <3>
|
|
policyName: "config-policy"
|
|
metadata:
|
|
labels:
|
|
machineconfiguration.openshift.io/role: worker
|
|
name: enable-workload-partitioning
|
|
spec:
|
|
config:
|
|
storage:
|
|
files:
|
|
- contents:
|
|
source: data:text/plain;charset=utf-8;base64,W2NyaW8ucnVudGltZS53b3JrbG9hZHMubWFuYWdlbWVudF0KYWN0aXZhdGlvbl9hbm5vdGF0aW9uID0gInRhcmdldC53b3JrbG9hZC5vcGVuc2hpZnQuaW8vbWFuYWdlbWVudCIKYW5ub3RhdGlvbl9wcmVmaXggPSAicmVzb3VyY2VzLndvcmtsb2FkLm9wZW5zaGlmdC5pbyIKcmVzb3VyY2VzID0geyAiY3B1c2hhcmVzIiA9IDAsICJjcHVzZXQiID0gIjAtMyIgfQo=
|
|
mode: 420
|
|
overwrite: true
|
|
path: /etc/crio/crio.conf.d/01-workload-partitioning
|
|
user:
|
|
name: root
|
|
- contents:
|
|
source: data:text/plain;charset=utf-8;base64,ewogICJtYW5hZ2VtZW50IjogewogICAgImNwdXNldCI6ICIwLTMiCiAgfQp9Cg==
|
|
mode: 420
|
|
overwrite: true
|
|
path: /etc/kubernetes/openshift-workload-pinning
|
|
user:
|
|
name: root
|
|
- fileName: PerformanceProfile.yaml
|
|
policyName: "config-policy"
|
|
metadata:
|
|
name: openshift-worker-node-performance-profile
|
|
spec:
|
|
cpu: <4>
|
|
isolated: "4-47"
|
|
reserved: "0-3"
|
|
hugepages:
|
|
defaultHugepagesSize: 1G
|
|
pages:
|
|
- size: 1G
|
|
count: 32
|
|
realTimeKernel:
|
|
enabled: true
|
|
- fileName: TunedPerformancePatch.yaml
|
|
policyName: "config-policy"
|
|
metadata:
|
|
name: performance-patch-worker
|
|
spec:
|
|
profile:
|
|
- name: performance-patch-worker
|
|
data: |
|
|
[main]
|
|
summary=Configuration changes profile inherited from performance created tuned
|
|
include=openshift-node-performance-openshift-worker-node-performance-profile
|
|
[bootloader]
|
|
cmdline_crash=nohz_full=4-47 <5>
|
|
[sysctl]
|
|
kernel.timer_migration=1
|
|
[scheduler]
|
|
group.ice-ptp=0:f:10:*:ice-ptp.*
|
|
[service]
|
|
service.stalld=start,enable
|
|
service.chronyd=stop,disable
|
|
recommend:
|
|
- profile: performance-patch-worker
|
|
----
|
|
<1> The policies are applied to all clusters with this label.
|
|
<2> The `MCP` field must be set to `worker`.
|
|
<3> This generic `MachineConfig` CR is used to configure workload partitioning on the worker node.
|
|
<4> The `cpu.isolated` and `cpu.reserved` fields must be configured for each particular hardware platform.
|
|
<5> The `cmdline_crash` CPU set must match the `cpu.isolated` set in the `PerformanceProfile` section.
|