Skip to content

Instantly share code, notes, and snippets.

@williamcaban
Last active January 14, 2021 15:11
Show Gist options
  • Save williamcaban/b3a4f5153e695323bc0c329ee911016b to your computer and use it in GitHub Desktop.
Save williamcaban/b3a4f5153e695323bc0c329ee911016b to your computer and use it in GitHub Desktop.
OpenShift RAN Machine Config Pool
---
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
metadata:
name: ran-cu
labels:
machineconfiguration.openshift.io/role: ran-cu
spec:
machineConfigSelector:
matchExpressions:
- {key: machineconfiguration.openshift.io/role, operator: In, values: [worker,rwn,ran,ran-cu]}
nodeSelector:
matchLabels:
node-role.kubernetes.io/ran-cu: ""
# Example SuperMicro DU: ran-du-smci-47c-smci00
---
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
metadata:
name: ran-du-smci-47c-smci00
labels:
machineconfiguration.openshift.io/role: ran-du-smci-47c-smci00
spec:
machineConfigSelector:
matchExpressions:
- {
key: machineconfiguration.openshift.io/role,
operator: In,
values: [worker, ran, ran-du, ran-du-smci-47c-smci00]
}
nodeSelector:
matchLabels:
node-role.kubernetes.io/ran-du-smci-47c-smci00: ""
---
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
metadata:
name: ran-du
labels:
machineconfiguration.openshift.io/role: ran-du
spec:
machineConfigSelector:
matchExpressions:
- {
key: machineconfiguration.openshift.io/role,
operator: In,
values: [worker, rwn, ran, ran-du]
}
nodeSelector:
matchLabels:
node-role.kubernetes.io/ran-du: ""
# Example RAN management cluster: ran-mgmt
---
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
metadata:
name: ran-mgmt
labels:
machineconfiguration.openshift.io/role: ran-mgmt
spec:
machineConfigSelector:
matchExpressions:
- {
key: machineconfiguration.openshift.io/role,
operator: In,
values: [worker, mgmt, ran-mgmt]
}
nodeSelector:
matchLabels:
node-role.kubernetes.io/ran-mgmt: ""
---
# Validate CPU topology
# $ for file in /sys/devices/system/cpu/cpu[0-9]*/topology/thread_siblings_list; do echo -n "$file "; cat $file; done |sort -k2 -n
# SuperMicro with 1x Intel Gold 6212U
apiVersion: performance.openshift.io/v1
kind: PerformanceProfile
metadata:
name: ran-du-47c
spec:
cpu:
isolated: 4-23,28-47
reserved: 0-3,24-27
hugepages:
defaultHugepagesSize: "1G"
pages:
- size: "1G"
count: 32
node: 0
numa:
topologyPolicy: best-effort
realTimeKernel:
enabled: true
nodeSelector:
node-role.kubernetes.io/ran-du: ""
---
# Validate CPU topology
# $ for file in /sys/devices/system/cpu/cpu[0-9]*/topology/thread_siblings_list; do echo -n "$file "; cat $file; done |sort -k2 -n
# SuperMicro with 2x Intel Gold 6248R
apiVersion: performance.openshift.io/v1
kind: PerformanceProfile
metadata:
name: ran-cu-96c
spec:
cpu:
isolated: 2-23,26-47,50-71,74-95
reserved: 0-1,48-49,24-25,72-73
hugepages:
defaultHugepagesSize: "1G"
pages:
- size: "1G"
count: 32
node: 0
numa:
topologyPolicy: restricted
nodeSelector:
node-role.kubernetes.io/ran-cu: ""
# ToplogyManager Policies:
# https://kubernetes.io/blog/2020/04/01/kubernetes-1-18-feature-topoloy-manager-beta/#align-up-it-s-a-team-effort
---
apiVersion: tuned.openshift.io/v1
kind: Tuned
metadata:
name: performance-patch-ran-du-47c
namespace: openshift-cluster-node-tuning-operator
spec:
profile:
- data: |
[main]
summary=Configuration changes profile inherited from performance created tuned
include=openshift-node-performance-ran-du-47c
[scheduler]
group.ksoftirqd=0:f:11:*:ksoftirqd.*
group.rcuc=0:f:11:*:rcuc.*
group.rcub=0:f:11:*:rcub.*
[service]
service.stalld=start,enable
[sysctl]
# Only enable if DPDK zero latency required (may cause latency for some configurations)
net.core.busy_read=0
net.core.busy_poll=0
[sysfs]
## set CPU affinity for the kernel's write-back bdi-flush threads to the housekeeping core
/sys/devices/virtual/workqueue/nvme-wq/cpumask = ${not_isolated_cpumask}
/sys/devices/virtual/workqueue/nvme-delete-wq/cpumask = ${not_isolated_cpumask}
/sys/devices/virtual/workqueue/nvme-reset-wq/cpumask = ${not_isolated_cpumask}
/sys/bus/workqueue/devices/nvme-wq/cpumask = ${not_isolated_cpumask}
/sys/bus/workqueue/devices/nvme-delete-wq/cpumask = ${not_isolated_cpumask}
/sys/bus/workqueue/devices/nvme-reset-wq/cpumask = ${not_isolated_cpumask}
/sys/bus/workqueue/devices/writeback/cpumask = ${not_isolated_cpumask}
/sys/devices/virtual/workqueue/cpumask = ${not_isolated_cpumask}
/sys/devices/system/machinecheck/machinecheck*/ignore_ce = 1
/sys/bus/workqueue/devices/ib-comp-unb-wq/cpumask = ${not_isolated_cpumask}
[bootloader]
cmdline_removeKernelArgs=-nohz=on
cmdline_additionalKernelArgs=+intel_idle.max_cstate=0 processor.max_cstate=1 idle=poll nohz=off rcu_nocbs=all rcu_nocb_poll nmi_watchdog=0
# Optional: nowatchdog
name: performance-patch-ran-du-47c
recommend:
- machineConfigLabels:
machineconfiguration.openshift.io/role: "ran-du"
priority: 19
profile: performance-patch-ran-du-47c
apiVersion: performance.openshift.io/v1
kind: PerformanceProfile
metadata:
name: ocp4-rwn-1
spec:qq
cpu:
isolated: 3-23,27-47
reserved: 0-2,24-26
hugepages:
defaultHugepagesSize: "1G"
pages:
- size: "1G"
count: 32
node: 0
numa:
topologyPolicy: best-effort
realTimeKernel:
enabled: true
nodeSelector:
node-role.kubernetes.io/ocp4-rwn-1: ""
---
apiVersion: tuned.openshift.io/v1
kind: Tuned
metadata:
name: performance-patch-rwn-1
namespace: openshift-cluster-node-tuning-operator
spec:
profile:
- data: |
[main]
summary=Configuration changes profile inherited from performance created tuned
include=openshift-node-performance-ocp4-rwn-1
[scheduler]
group.ksoftirqd=0:f:11:*:ksoftirqd.*
group.rcuc=0:f:11:*:rcuc.*
[service]
service.stalld=start,enable
[sysfs]
## set CPU affinity for the kernel's write-back bdi-flush threads to the housekeeping core
/sys/devices/virtual/workqueue/nvme-wq/cpumask = ${not_isolated_cpumask}
/sys/devices/virtual/workqueue/nvme-delete-wq/cpumask = ${not_isolated_cpumask}
/sys/devices/virtual/workqueue/nvme-reset-wq/cpumask = ${not_isolated_cpumask}
/sys/bus/workqueue/devices/nvme-wq/cpumask = ${not_isolated_cpumask}
/sys/bus/workqueue/devices/nvme-delete-wq/cpumask = ${not_isolated_cpumask}
/sys/bus/workqueue/devices/nvme-reset-wq/cpumask = ${not_isolated_cpumask}
/sys/bus/workqueue/devices/writeback/cpumask = ${not_isolated_cpumask}
/sys/devices/virtual/workqueue/cpumask = ${not_isolated_cpumask}
/sys/devices/system/machinecheck/machinecheck*/ignore_ce = 1
/sys/bus/workqueue/devices/ib-comp-unb-wq/cpumask = ${not_isolated_cpumask}
[bootloader]
cmdline_additionalKernelArgs=+intel_idle.max_cstate=0 processor.max_cstate=1 idle=poll nohz=off rcu_nocbs=all rcu_nocb_poll nowatchdog nohz_full=${isolated_cores}
name: performance-patch-rwn-1
recommend:
- machineConfigLabels:
machineconfiguration.openshift.io/role: "ocp4-rwn-1"
priority: 19
profile: performance-patch-rwn-1
---
apiVersion: tuned.openshift.io/v1
kind: Tuned
metadata:
name: performance-patch-rwn-0
namespace: openshift-cluster-node-tuning-operator
spec:
profile:
- data: |
[main]
summary=Configuration changes profile inherited from performance created tuned
include=openshift-node-performance-ocp4-rwn-0
[scheduler]
group.ksoftirqd=0:f:11:*:ksoftirqd.*
group.rcuc=0:f:11:*:rcuc.*
[service]
service.stalld=start,enable
[sysfs]
## set CPU affinity for the kernel's write-back bdi-flush threads to the housekeeping core
/sys/devices/virtual/workqueue/nvme-wq/cpumask = ${not_isolated_cpumask}
/sys/devices/virtual/workqueue/nvme-delete-wq/cpumask = ${not_isolated_cpumask}
/sys/devices/virtual/workqueue/nvme-reset-wq/cpumask = ${not_isolated_cpumask}
/sys/bus/workqueue/devices/nvme-wq/cpumask = ${not_isolated_cpumask}
/sys/bus/workqueue/devices/nvme-delete-wq/cpumask = ${not_isolated_cpumask}
/sys/bus/workqueue/devices/nvme-reset-wq/cpumask = ${not_isolated_cpumask}
/sys/bus/workqueue/devices/writeback/cpumask = ${not_isolated_cpumask}
/sys/devices/virtual/workqueue/cpumask = ${not_isolated_cpumask}
/sys/devices/system/machinecheck/machinecheck*/ignore_ce = 1
/sys/bus/workqueue/devices/ib-comp-unb-wq/cpumask = ${not_isolated_cpumask}
[bootloader]
cmdline_additionalKernelArgs=+intel_idle.max_cstate=0 processor.max_cstate=1 idle=poll nohz=off rcu_nocbs=all rcu_nocb_poll nowatchdog nohz_full=${isolated_cores}
name: performance-patch-rwn-0
recommend:
- machineConfigLabels:
machineconfiguration.openshift.io/role: "ocp4-rwn-0"
priority: 19
profile: performance-patch-rwn-0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment