package
0.0.0-20250123060244-3b77fb55b835
Repository: https://github.com/openshift/cluster-node-tuning-operator.git
Documentation: pkg.go.dev

# README

Performance Profile Creator (PPC)

A tool to automate the process of creating Performance Profile using the user supplied profile parameters.

Software Components

  1. A CLI tool part of the Node Tuning Operator image

Flow

  1. PPC consumes a must-gather output.
  2. PPC output is a bunch of YAML data (PAO profile + NTO tuned part).

Things to note before running Performance Profile Creator

  1. Performance Profile Creator is present as an entrypoint (in /usr/bin/performance-profile-creator) in the Node Tuning Operator image.
  2. It is assumed that we have a must-gather directory available where we run the tool.
    1. Option 1: Run must-gather tool like below and use its output dir when you run PPC.

       oc adm must-gather --image=quay.io/openshift-kni/performance-addon-operator-must-gather:4.9-snapshot --dest-dir=<dir>
      
    2. Option 2: Use an existing must-gather tarball decompressed to a directory.

Building Performance Profile Creator binary and image

Developers can build the Performance Profile Creator images from the source tree using make targets.

  1. Setup Environment variables

    export REGISTRY_NAMESPACE=<your quay.io namespace>
    export IMAGE_TAG=<the image tag to use> #defaults to "latest"
    export IMAGE_BUILD_CMD=podman
    
  2. To build from Performance Profile Creator source:

    make build-performance-profile-creator
    
  3. To build the Performance addon Operator image from source:

    make local-image
    

Alternatively, you can pull the latest master upstream image. In the following examples, TAG has the format major.minor. For example, the TAG for OpenShift 4.11 will be 4.11:

podman pull quay.io/openshift/origin-cluster-node-tuning-operator:4.11

Running Performance Profile Creator

Depending on how the must-gather directory was set up the operator can now run the Performance Profile Creator tool with the required parameters.

PPC Tool help output:

$ podman run --entrypoint performance-profile-creator quay.io/openshift/origin-cluster-node-tuning-operator:4.11 -h
A tool that automates creation of Performance Profiles

Usage:
  performance-profile-creator [flags]

Flags:
      --disable-ht                        Disable Hyperthreading
  -h, --help                              help for performance-profile-creator
      --info string                       Show cluster information; requires --must-gather-dir-path, ignore the other arguments. [Valid values: log, json] (default "log")
      --mcp-name string                   MCP name corresponding to the target machines (required)
      --must-gather-dir-path string       Must gather directory path (default "must-gather")
      --power-consumption-mode string     The power consumption mode.  [Valid values: default, low-latency, ultra-low-latency] (default "default")
      --profile-name string               Name of the performance profile to be created (default "performance")
      --reserved-cpu-count int            Number of reserved CPUs (required)
      --rt-kernel                         Enable Real Time Kernel (required)
      --split-reserved-cpus-across-numa   Split the Reserved CPUs across NUMA nodes
      --topology-manager-policy string    Kubelet Topology Manager Policy of the performance profile to be created. [Valid values: single-numa-node, best-effort, restricted] (default "restricted")
      --user-level-networking             Run with User level Networking(DPDK) enabled
  1. Option 1: Example of using must-gather output dir (obtained after running must gather manually) along with required arguments

    podman run --entrypoint performance-profile-creator -v /path/to/must-gather-output:/must-gather:z \
    quay.io/openshift/origin-cluster-node-tuning-operator:4.11 --must-gather-dir-path /must-gather \
    --reserved-cpu-count 20 --mcp-name worker-cnf --rt-kernel false > performance-profile.yaml
    
  2. Option 2: Example of using an existing must-gather tarball which is decompressed to a directory along with required arguments

    podman run --entrypoint performance-profile-creator -v /path/to/decompressed-tarball:/must-gather:z \
    quay.io/openshift/origin-cluster-node-tuning-operator:4.11 --must-gather-dir-path /must-gather \
    --reserved-cpu-count 20 --mcp-name worker-cnf --rt-kernel false > performance-profile.yaml
    

Running Performance Profile Creator using Wrapper script

  1. Example of how the following wrapper script can be used to create a performance profle:

    ./hack/run-perf-profile-creator.sh -t must-gather.tar.gz -- --mcp-name=worker-cnf --reserved-cpu-count=20 \
    --rt-kernel=false --split-reserved-cpus-across-numa=true --topology-manager-policy=restricted \
    --power-consumption-mode=low-latency > performace-profile.yaml
    

Discovery mode

To learn about the key details of the cluster you want to create a profile for, you may use the discovery (aka info) mode:

   ./hack/run-perf-profile-creator.sh -t must-gather.tar.gz -- --info=log

The info option requires a value which drives the output format. Please refer to the online help of the performance-profile-creator tool to learn about the supported formats.

# Packages

No description provided by the author