Skip to content

Instantly share code, notes, and snippets.

@v1k0d3n
Last active November 12, 2024 19:54
Show Gist options
  • Save v1k0d3n/d66825aca25fdfc7b3b98408fa3620a2 to your computer and use it in GitHub Desktop.
Save v1k0d3n/d66825aca25fdfc7b3b98408fa3620a2 to your computer and use it in GitHub Desktop.
Updating Performance Profiles for SNO (OpenShift v4.16.x)

Performance Profiles for SNO (OpenShift 4.16.x)

CRITICAL: DO NOT APPLY THE MANIFEST BELOW UNLESS YOU KNOW WHAT YOU'RE DOING!

You will need to edit the performance profile sample (below) according to your own environment! Read and understand what you are applying first.

So, while a lot of my other gists include installations and configuration of operators, this one is a litle different. There is no operator to install, because the PerformanceProfile object is already defined with OpenShift installations now. The information below is just an example of a PerformanceProfile; some very specific options are used in my deployments. You only need this applied, if you're enabling SR-IOV (which some applications/workloads require). Use a performance profile that is recommended for the workloads you intend/need to run.

Details

For better details on configuring a PerformanceProfile, visit the following Red Hat documentation for custom-tuning your system.

Additionally, you will find the following GitHub document useful in explaining each of the sections (as shown in the example below).

Working Example

Below is a sample of a real world scenario. Do not apply this in your own environment, but read through the link above for further details.

oc apply -f - <<EOF
---
apiVersion: performance.openshift.io/v2
kind: PerformanceProfile
metadata:
  name: performance-sno
spec:
  additionalKernelArgs:
  - audit=0
  - mce=off
  - nmi_watchdog=0
  - efi=runtime
  - intel_iommu=on
  cpu:
    isolated: 2-93
    reserved: 0-1,94-95
  hugepages:
    defaultHugepagesSize: 1G
    pages:
    - count: 8
      node: 0
      size: 1G
    - count: 8
      node: 1
      size: 1G
  numa:
    topologyPolicy: best-effort
  net:
    userLevelNetworking: true
  realTimeKernel:
    enabled: false
  nodeSelector:
    node-role.kubernetes.io/master: ""
  machineConfigPoolSelector:
    machineconfiguration.openshift.io/role: master
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment