第15章 パフォーマンスプロファイルによる低レイテンシーを実現するためのノードのチューニング
ノードをチューニングして低レイテンシーを実現するには、クラスターパフォーマンスプロファイルを使用します。インフラストラクチャーおよびアプリケーションコンテナーの CPU を制限したり、huge page やハイパースレッディングを設定したり、レイテンシーの影響を受けやすいプロセスの CPU パーティションを設定したりすることができます。
15.1. パフォーマンスプロファイルの作成
Performance Profile Creator (PPC) ツールを使用して、クラスターパフォーマンスプロファイルを作成できます。PPC は Node Tuning Operator の機能です。
PPC は、クラスターに関する情報とユーザー指定の設定を組み合わせて、ハードウェア、トポロジー、ユースケースに適したパフォーマンスプロファイルを生成します。
パフォーマンスプロファイルは、クラスターが基盤となるハードウェアリソースに直接アクセスできるベアメタル環境にのみ適用されます。シングルノード OpenShift とマルチノードクラスターの両方に対してパフォーマンスプロファイルを設定できます。
以下は、クラスターでパフォーマンスプロファイルを作成して適用するための大まかなワークフローです。
-
パフォーマンス設定の対象となるノードのマシン設定プール (MCP) を作成します。シングルノードの OpenShift クラスターでは、クラスター内にノードが 1 つしかないため、
master
MCP を使用する必要があります。 -
must-gather
コマンドを使用してクラスターに関する情報を収集します。 次のいずれかの方法で PPC ツールを使用してパフォーマンスプロファイルを作成します。
- Podman を使用して PPC ツールを実行します。
- ラッパースクリプトを使用して PPC ツールを実行します。
- ユースケースに合わせてパフォーマンスプロファイルを設定し、そのパフォーマンスプロファイルをクラスターに適用します。
Telco では、cgroups v2 サポートがないため、低レイテンシー、リアルタイム、および Data Plane Development Kit (DPDK)ワークロードに PerformanceProfile
を使用するクラスターは自動的に cgroups v1 に戻ります。PerformanceProfile
を使用している場合は、cgroup v2 を有効にすることはできません。
15.1.1. Performance Profile Creator の概要
Performance Profile Creator (PPC) は、Node Tuning Operator とともに提供されるコマンドラインツールで、クラスターのパフォーマンスプロファイルを作成するのに役立ちます。
最初に、PPC ツールを使用して must-gather
データを処理し、次の情報を含むクラスターの主要なパフォーマンス設定を表示できます。
- 割り当てられた CPU ID でパーティショニングされた NUMA セル
- ハイパースレッディングノード設定
この情報を使用して、パフォーマンスプロファイルを設定することができます。
PPC の実行
PPC ツールにパフォーマンス設定引数を指定して、ハードウェア、トポロジー、およびユースケースに適した提案されたパフォーマンスプロファイルを生成します。
次のいずれかの方法で PPC を実行できます。
- Podman を使用して PPC を実行する
- ラッパースクリプトを使用して PPC を実行する
ラッパースクリプトを使用すると、より細かい Podman タスクの一部が実行可能なスクリプトに抽象化されます。たとえば、ラッパースクリプトは、必要なコンテナーイメージをプルして実行したり、コンテナーにディレクトリーをマウントしたり、Podman を介してコンテナーに直接パラメーターを提供したりといったタスクを処理します。どちらの方法でも同じ結果が得られます。
15.1.2. パフォーマンスチューニングの対象となるノードにマシン設定プールを作成する
マルチノードクラスターの場合、マシン設定プール (MCP) を定義して、パフォーマンスプロファイルで設定するターゲットノードを識別できます。
シングルノードの OpenShift クラスターでは、クラスター内にノードが 1 つしかないため、master
MCP を使用する必要があります。シングルノードの OpenShift クラスター用に別の MCP を作成する必要はありません。
前提条件
-
cluster-admin
ロールへのアクセス権がある。 -
OpenShift CLI (
oc
) がインストールされている。
手順
次のコマンドを実行して、設定用のターゲットノードにラベルを付けます。
$ oc label node <node_name> node-role.kubernetes.io/worker-cnf="" 1
- 1
<node_name>
をノードの名前に置き換えます。この例では、worker-cnf
ラベルを適用します。
ターゲットノードを含む
MachineConfigPool
リソースを作成します。MachineConfigPool
リソースを定義する YAML ファイルを作成します。mcp-worker-cnf.yaml
ファイルの例apiVersion: machineconfiguration.openshift.io/v1 kind: MachineConfigPool metadata: name: worker-cnf 1 labels: machineconfiguration.openshift.io/role: worker-cnf 2 spec: machineConfigSelector: matchExpressions: - { key: machineconfiguration.openshift.io/role, operator: In, values: [worker, worker-cnf], } paused: false nodeSelector: matchLabels: node-role.kubernetes.io/worker-cnf: "" 3
次のコマンドを実行して、
MachineConfigPool
リソースを適用します。$ oc apply -f mcp-worker-cnf.yaml
出力例
machineconfigpool.machineconfiguration.openshift.io/worker-cnf created
検証
次のコマンドを実行して、クラスター内のマシン設定プールを確認します。
$ oc get mcp
出力例
NAME CONFIG UPDATED UPDATING DEGRADED MACHINECOUNT READYMACHINECOUNT UPDATEDMACHINECOUNT DEGRADEDMACHINECOUNT AGE master rendered-master-58433c7c3c1b4ed5ffef95234d451490 True False False 3 3 3 0 6h46m worker rendered-worker-168f52b168f151e4f853259729b6azc4 True False False 2 2 2 0 6h46m worker-cnf rendered-worker-cnf-168f52b168f151e4f853259729b6azc4 True False False 1 1 1 0 73s
15.1.3. PPC 用のクラスターに関するデータを収集する
Performance Profile Creator (PPC) ツールには must-gather
データが必要です。クラスター管理者は、must-gather
コマンドを実行し、クラスターに関する情報を取得します。
前提条件
-
cluster-admin
ロールを持つユーザーとしてクラスターにアクセスできる。 -
OpenShift CLI (
oc
) がインストールされている。 - パフォーマンスプロファイルを使用して設定するターゲット MCP を特定している。
手順
-
must-gather
データを保存するディレクトリーに移動します。 次のコマンドを実行してクラスター情報を収集します。
$ oc adm must-gather
このコマンドは、
must-gather.local.1971646453781853027
のような命名形式で、ローカルディレクトリーにmust-gather
データを含むフォルダーを作成します。オプション:
must-gather
ディレクトリーから圧縮ファイルを作成します。$ tar cvaf must-gather.tar.gz <must_gather_folder> 1
- 1
must-gather
データフォルダーの名前に置き換えます。
注記Performance Profile Creator ラッパースクリプトを実行している場合は、出力を圧縮する必要があります。
関連情報
-
must-gather
ツールの詳細は、クラスターに関するデータの収集 を参照してください。
15.1.4. Podman を使用した Performance Profile Creator の実行
クラスター管理者は、Podman と Performance Profile Creator (PPC) を使用してパフォーマンスプロファイルを作成できます。
PPC 引数の詳細は、Performance Profile Creator の引数 のセクションを参照してください。
PPC は、クラスターからの must-gather
データを使用して、パフォーマンスプロファイルを作成します。パフォーマンス設定の対象となるノードのラベルを変更するなど、クラスターに変更を加えた場合は、PPC を再度実行する前に、must-gather
データを再作成する必要があります。
前提条件
-
cluster-admin
ロールを持つユーザーとしてクラスターにアクセスできる。 - ベアメタルハードウェアにクラスターがインストールされている。
-
podman
と OpenShift CLI (oc
) がインストールされている。 - Node Tuning Operator イメージへのアクセスがある。
- 設定のターゲットノードを含むマシン設定プールが特定されている。
-
クラスターの
must-gather
データにアクセスできる。
手順
次のコマンドを実行して、マシン設定プールを確認します。
$ oc get mcp
出力例
NAME CONFIG UPDATED UPDATING DEGRADED MACHINECOUNT READYMACHINECOUNT UPDATEDMACHINECOUNT DEGRADEDMACHINECOUNT AGE master rendered-master-58433c8c3c0b4ed5feef95434d455490 True False False 3 3 3 0 8h worker rendered-worker-668f56a164f151e4a853229729b6adc4 True False False 2 2 2 0 8h worker-cnf rendered-worker-cnf-668f56a164f151e4a853229729b6adc4 True False False 1 1 1 0 79m
次のコマンドを実行して、Podman を使用して
registry.redhat.io
に認証します。$ podman login registry.redhat.io
Username: <user_name> Password: <password>
オプション: 次のコマンドを実行して、PPC ツールのヘルプを表示します。
$ podman run --rm --entrypoint performance-profile-creator registry.redhat.io/openshift4/ose-cluster-node-tuning-rhel9-operator:v4.15 -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") --offlined-cpu-count int Number of offlined CPUs --per-pod-power-management Enable Per Pod Power Management --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
クラスターに関する情報を表示するには、次のコマンドを実行して、
log
引数を指定した PPC ツールを実行します。$ podman run --entrypoint performance-profile-creator -v <path_to_must_gather>:/must-gather:z registry.redhat.io/openshift4/ose-cluster-node-tuning-rhel9-operator:v4.15 --info log --must-gather-dir-path /must-gather
-
--entrypoint performance-profile-creator
は、podman
への新しいエントリーポイントとして、パフォーマンスプロファイルクリエーターを定義します。 -v <path_to_must_gather>
は、次のいずれかのコンポーネントへのパスを指定します。-
must-gather
データが含まれるディレクトリー。 -
must-gather
の展開された .tar ファイルを含む既存のディレクトリー
-
--info log
は、出力形式の値を指定します。出力例
level=info msg="Cluster info:" level=info msg="MCP 'master' nodes:" level=info msg=--- level=info msg="MCP 'worker' nodes:" level=info msg="Node: host.example.com (NUMA cells: 1, HT: true)" level=info msg="NUMA cell 0 : [0 1 2 3]" level=info msg="CPU(s): 4" level=info msg="Node: host1.example.com (NUMA cells: 1, HT: true)" level=info msg="NUMA cell 0 : [0 1 2 3]" level=info msg="CPU(s): 4" level=info msg=--- level=info msg="MCP 'worker-cnf' nodes:" level=info msg="Node: host2.example.com (NUMA cells: 1, HT: true)" level=info msg="NUMA cell 0 : [0 1 2 3]" level=info msg="CPU(s): 4" level=info msg=---
-
次のコマンドを実行して、パフォーマンスプロファイルを作成します。この例では、サンプルの PPC 引数と値を使用します。
$ podman run --entrypoint performance-profile-creator -v <path_to_must_gather>:/must-gather:z registry.redhat.io/openshift4/ose-cluster-node-tuning-rhel9-operator:v4.15 --mcp-name=worker-cnf --reserved-cpu-count=1 --rt-kernel=true --split-reserved-cpus-across-numa=false --must-gather-dir-path /must-gather --power-consumption-mode=ultra-low-latency --offlined-cpu-count=1 > my-performance-profile.yaml
-v <path_to_must_gather>
は、次のいずれかのコンポーネントへのパスを指定します。-
must-gather
データが含まれるディレクトリー。 -
must-gather
の展開された .tar ファイルを含むディレクトリー。
-
-
--mcp-name=worker-cnf
は、worker-=cnf
マシン設定プールを指定します。 -
--reserved-cpu-count=1
は、予約済みの CPU を 1 つ指定します。 -
--rt-kernel=true
は、リアルタイムカーネルを有効にします。 -
--split-reserved-cpus-across-numa=false
は、NUMA ノード間での予約済み CPU の分割を無効にします。 -
--power-consumption-mode=ultra-low-latency
は、消費電力の増加を犠牲にして、レイテンシーを最小限に抑えることを指定します。 --offlined-cpu-count=1
は、オフラインの CPU を 1 つ指定します。注記この例の
mcp-name
引数は、コマンドoc get mcp
の出力に基づいてworker-cnf
に設定されます。シングルノード OpenShift の場合は、--mcp-name=master
を使用します。出力例
level=info msg="Nodes targeted by worker-cnf MCP are: [worker-2]" level=info msg="NUMA cell(s): 1" level=info msg="NUMA cell 0 : [0 1 2 3]" level=info msg="CPU(s): 4" level=info msg="1 reserved CPUs allocated: 0 " level=info msg="2 isolated CPUs allocated: 2-3" level=info msg="Additional Kernel Args based on configuration: []"
次のコマンドを実行して、作成された YAML ファイルを確認します。
$ cat my-performance-profile.yaml
出力例
--- apiVersion: performance.openshift.io/v2 kind: PerformanceProfile metadata: name: performance spec: cpu: isolated: 2-3 offlined: "1" reserved: "0" machineConfigPoolSelector: machineconfiguration.openshift.io/role: worker-cnf nodeSelector: node-role.kubernetes.io/worker-cnf: "" numa: topologyPolicy: restricted realTimeKernel: enabled: true workloadHints: highPowerConsumption: true perPodPowerManagement: false realTime: true
生成されたプロファイルを適用します。
$ oc apply -f my-performance-profile.yaml
出力例
performanceprofile.performance.openshift.io/performance created
15.1.5. Performance Profile Creator ラッパースクリプトの実行
ラッパースクリプトは、Performance Profile Creator (PPC) ツールを使用してパフォーマンスプロファイルを作成するプロセスを簡素化します。このスクリプトは、必要なコンテナーイメージのプルと実行、コンテナーへのディレクトリーのマウント、Podman を介してコンテナーに直接パラメーターを提供するなどのタスクを処理します。
Performance Profile Creator の引数の詳細は、Performance Profile Creator の引数 のセクションを参照してください。
PPC は、クラスターからの must-gather
データを使用して、パフォーマンスプロファイルを作成します。パフォーマンス設定の対象となるノードのラベルを変更するなど、クラスターに変更を加えた場合は、PPC を再度実行する前に、must-gather
データを再作成する必要があります。
前提条件
-
cluster-admin
ロールを持つユーザーとしてクラスターにアクセスできる。 - ベアメタルハードウェアにクラスターがインストールされている。
-
podman
と OpenShift CLI (oc
) がインストールされている。 - Node Tuning Operator イメージへのアクセスがある。
- 設定のターゲットノードを含むマシン設定プールが特定されている。
-
must-gather
tarball にアクセスできる。
手順
ローカルマシンにファイル (例:
run-perf-profile-creator.sh
) を作成します。$ vi run-perf-profile-creator.sh
ファイルに以下のコードを貼り付けます。
#!/bin/bash readonly CONTAINER_RUNTIME=${CONTAINER_RUNTIME:-podman} readonly CURRENT_SCRIPT=$(basename "$0") readonly CMD="${CONTAINER_RUNTIME} run --entrypoint performance-profile-creator" readonly IMG_EXISTS_CMD="${CONTAINER_RUNTIME} image exists" readonly IMG_PULL_CMD="${CONTAINER_RUNTIME} image pull" readonly MUST_GATHER_VOL="/must-gather" NTO_IMG="registry.redhat.io/openshift4/ose-cluster-node-tuning-rhel9-operator:v4.15" MG_TARBALL="" DATA_DIR="" usage() { print "Wrapper usage:" print " ${CURRENT_SCRIPT} [-h] [-p image][-t path] -- [performance-profile-creator flags]" print "" print "Options:" print " -h help for ${CURRENT_SCRIPT}" print " -p Node Tuning Operator image" print " -t path to a must-gather tarball" ${IMG_EXISTS_CMD} "${NTO_IMG}" && ${CMD} "${NTO_IMG}" -h } function cleanup { [ -d "${DATA_DIR}" ] && rm -rf "${DATA_DIR}" } trap cleanup EXIT exit_error() { print "error: $*" usage exit 1 } print() { echo "$*" >&2 } check_requirements() { ${IMG_EXISTS_CMD} "${NTO_IMG}" || ${IMG_PULL_CMD} "${NTO_IMG}" || \ exit_error "Node Tuning Operator image not found" [ -n "${MG_TARBALL}" ] || exit_error "Must-gather tarball file path is mandatory" [ -f "${MG_TARBALL}" ] || exit_error "Must-gather tarball file not found" DATA_DIR=$(mktemp -d -t "${CURRENT_SCRIPT}XXXX") || exit_error "Cannot create the data directory" tar -zxf "${MG_TARBALL}" --directory "${DATA_DIR}" || exit_error "Cannot decompress the must-gather tarball" chmod a+rx "${DATA_DIR}" return 0 } main() { while getopts ':hp:t:' OPT; do case "${OPT}" in h) usage exit 0 ;; p) NTO_IMG="${OPTARG}" ;; t) MG_TARBALL="${OPTARG}" ;; ?) exit_error "invalid argument: ${OPTARG}" ;; esac done shift $((OPTIND - 1)) check_requirements || exit 1 ${CMD} -v "${DATA_DIR}:${MUST_GATHER_VOL}:z" "${NTO_IMG}" "$@" --must-gather-dir-path "${MUST_GATHER_VOL}" echo "" 1>&2 } main "$@"
このスクリプトの実行権限を全員に追加します。
$ chmod a+x run-perf-profile-creator.sh
次のコマンドを実行して、Podman を使用して
registry.redhat.io
に認証します。$ podman login registry.redhat.io
Username: <user_name> Password: <password>
オプション: 次のコマンドを実行して、PPC ツールのヘルプを表示します。
$ ./run-perf-profile-creator.sh -h
出力例
Wrapper usage: run-perf-profile-creator.sh [-h] [-p image][-t path] -- [performance-profile-creator flags] Options: -h help for run-perf-profile-creator.sh -p Node Tuning Operator image -t path to a must-gather tarball 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") --offlined-cpu-count int Number of offlined CPUs --per-pod-power-management Enable Per Pod Power Management --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
注記オプションで、
-p
オプションを使用して Node Tuning Operator イメージのパスを設定できます。パスを設定しない場合、ラッパースクリプトはデフォルトのイメージ (registry.redhat.io/openshift4/ose-cluster-node-tuning-rhel9-operator:v4.18) を使用します。クラスターに関する情報を表示するには、次のコマンドを実行して、
log
引数を指定した PPC ツールを実行します。$ ./run-perf-profile-creator.sh -t /<path_to_must_gather_dir>/must-gather.tar.gz -- --info=log
-t /<path_to_must_gather_dir>/must-gather.tar.gz
は、must-gather tarball を含むディレクトリーへのパスを指定します。これはラッパースクリプトに必要な引数です。出力例
level=info msg="Cluster info:" level=info msg="MCP 'master' nodes:" level=info msg=--- level=info msg="MCP 'worker' nodes:" level=info msg="Node: host.example.com (NUMA cells: 1, HT: true)" level=info msg="NUMA cell 0 : [0 1 2 3]" level=info msg="CPU(s): 4" level=info msg="Node: host1.example.com (NUMA cells: 1, HT: true)" level=info msg="NUMA cell 0 : [0 1 2 3]" level=info msg="CPU(s): 4" level=info msg=--- level=info msg="MCP 'worker-cnf' nodes:" level=info msg="Node: host2.example.com (NUMA cells: 1, HT: true)" level=info msg="NUMA cell 0 : [0 1 2 3]" level=info msg="CPU(s): 4" level=info msg=---
次のコマンドを実行して、パフォーマンスプロファイルを作成します。
$ ./run-perf-profile-creator.sh -t /path-to-must-gather/must-gather.tar.gz -- --mcp-name=worker-cnf --reserved-cpu-count=1 --rt-kernel=true --split-reserved-cpus-across-numa=false --power-consumption-mode=ultra-low-latency --offlined-cpu-count=1 > my-performance-profile.yaml
この例では、サンプルの PPC 引数と値を使用します。
-
--mcp-name=worker-cnf
は、worker-=cnf
マシン設定プールを指定します。 -
--reserved-cpu-count=1
は、予約済みの CPU を 1 つ指定します。 -
--rt-kernel=true
は、リアルタイムカーネルを有効にします。 -
--split-reserved-cpus-across-numa=false
は、NUMA ノード間での予約済み CPU の分割を無効にします。 -
--power-consumption-mode=ultra-low-latency
は、消費電力の増加を犠牲にして、レイテンシーを最小限に抑えることを指定します。 --offlined-cpu-count=1
は、オフラインの CPU を 1 つ指定します。注記この例の
mcp-name
引数は、コマンドoc get mcp
の出力に基づいてworker-cnf
に設定されます。シングルノード OpenShift の場合は、--mcp-name=master
を使用します。
-
次のコマンドを実行して、作成された YAML ファイルを確認します。
$ cat my-performance-profile.yaml
出力例
--- apiVersion: performance.openshift.io/v2 kind: PerformanceProfile metadata: name: performance spec: cpu: isolated: 2-3 offlined: "1" reserved: "0" machineConfigPoolSelector: machineconfiguration.openshift.io/role: worker-cnf nodeSelector: node-role.kubernetes.io/worker-cnf: "" numa: topologyPolicy: restricted realTimeKernel: enabled: true workloadHints: highPowerConsumption: true perPodPowerManagement: false realTime: true
生成されたプロファイルを適用します。
$ oc apply -f my-performance-profile.yaml
出力例
performanceprofile.performance.openshift.io/performance created
15.1.6. Performance Profile Creator の引数
引数 | 説明 |
---|---|
|
ターゲットマシンに対応する |
| must gather ディレクトリーのパス。
この引数は、Podman を使用して PPC ツールを実行する場合にのみ必要です。ラッパースクリプトで PPC を使用する場合は、この引数を使用しないでください。代わりに、ラッパースクリプトの |
| 予約された CPU の数。ゼロより大きい自然数を使用してください。 |
| リアルタイムカーネルを有効にします。
使用できる値は |
引数 | 説明 |
---|---|
| ハイパースレッディングを無効にします。
使用できる値は
デフォルト: 警告
この引数が |
|
クラスター情報を取得します。この引数には、 以下の値を使用できます。
デフォルト: |
| オフラインの CPU の数。 注記 ゼロより大きい自然数を使用してください。十分な数の論理プロセッサーがオフラインになっていない場合、エラーメッセージがログに記録されます。メッセージは次のとおりです。 Error: failed to compute the reserved and isolated CPUs: please ensure that reserved-cpu-count plus offlined-cpu-count should be in the range [0,1] Error: failed to compute the reserved and isolated CPUs: please specify the offlined CPU count in the range [0,1] |
| 電力消費モード。 以下の値を使用できます。
デフォルト: |
|
Pod ごとの電源管理を有効にします。電力消費モードとして
使用できる値は
デフォルト: |
| 作成するパフォーマンスプロファイルの名前。
デフォルト: |
| NUMA ノード全体で予約された CPU を分割します。
使用できる値は
デフォルト: |
| 作成するパフォーマンスプロファイルの kubelet Topology Manager ポリシー。 以下の値を使用できます。
デフォルト: |
| ユーザーレベルのネットワーク (DPDK) を有効にして実行します。
使用できる値は
デフォルト: |
15.1.7. リファレンスパフォーマンスプロファイル
次のリファレンスパフォーマンスプロファイルをベースに、独自のカスタムプロファイルを作成してください。
15.1.7.1. OpenStack で OVS-DPDK を使用するクラスター用のパフォーマンスプロファイルテンプレート
Red Hat OpenStack Platform (RHOSP) で Open vSwitch と Data Plane Development Kit (OVS-DPDK) を使用するクラスターでマシンのパフォーマンスを最大化するには、パフォーマンスプロファイルを使用できます。
次のパフォーマンスプロファイルテンプレートを使用して、デプロイメント用のプロファイルを作成できます。
OVS-DPDK を使用するクラスター用のパフォーマンスプロファイルテンプレート
apiVersion: performance.openshift.io/v2 kind: PerformanceProfile metadata: name: cnf-performanceprofile spec: additionalKernelArgs: - nmi_watchdog=0 - audit=0 - mce=off - processor.max_cstate=1 - idle=poll - intel_idle.max_cstate=0 - default_hugepagesz=1GB - hugepagesz=1G - intel_iommu=on cpu: isolated: <CPU_ISOLATED> reserved: <CPU_RESERVED> hugepages: defaultHugepagesSize: 1G pages: - count: <HUGEPAGES_COUNT> node: 0 size: 1G nodeSelector: node-role.kubernetes.io/worker: '' realTimeKernel: enabled: false globallyDisableIrqLoadBalancing: true
CPU_ISOLATED
キー、CPU_RESERVED
キー、および HUGEPAGES_COUNT
キーの設定に適した値を入力します。
15.1.7.2. 通信事業者 RAN DU 用のリファレンス設計パフォーマンスプロファイル
次のパフォーマンスプロファイルは、通信事業者の RAN DU ワークロードをホストするコモディティーハードウェア上の OpenShift Container Platform クラスターのパフォーマンス設定を指定します。
通信事業者 RAN DU 用のリファレンス設計パフォーマンスプロファイル
apiVersion: performance.openshift.io/v2 kind: PerformanceProfile metadata: # if you change this name make sure the 'include' line in TunedPerformancePatch.yaml # matches this name: include=openshift-node-performance-${PerformanceProfile.metadata.name} # Also in file 'validatorCRs/informDuValidator.yaml': # name: 50-performance-${PerformanceProfile.metadata.name} name: openshift-node-performance-profile annotations: ran.openshift.io/reference-configuration: "ran-du.redhat.com" spec: additionalKernelArgs: - "rcupdate.rcu_normal_after_boot=0" - "efi=runtime" - "vfio_pci.enable_sriov=1" - "vfio_pci.disable_idle_d3=1" - "module_blacklist=irdma" cpu: isolated: $isolated reserved: $reserved hugepages: defaultHugepagesSize: $defaultHugepagesSize pages: - size: $size count: $count node: $node machineConfigPoolSelector: pools.operator.machineconfiguration.openshift.io/$mcp: "" nodeSelector: node-role.kubernetes.io/$mcp: '' numa: topologyPolicy: "restricted" # To use the standard (non-realtime) kernel, set enabled to false realTimeKernel: enabled: true workloadHints: # WorkloadHints defines the set of upper level flags for different type of workloads. # See https://github.com/openshift/cluster-node-tuning-operator/blob/master/docs/performanceprofile/performance_profile.md#workloadhints # for detailed descriptions of each item. # The configuration below is set for a low latency, performance mode. realTime: true highPowerConsumption: false perPodPowerManagement: false
15.1.7.3. 通信事業者向けコアリファレンス設計パフォーマンスプロファイル
次のパフォーマンスプロファイルは、通信事業者のコアワークロードをホストするコモディティーハードウェア上の OpenShift Container Platform クラスターのパフォーマンス設定をノードレベルで指定します。
通信事業者向けコアリファレンス設計パフォーマンスプロファイル
apiVersion: performance.openshift.io/v2 kind: PerformanceProfile metadata: # if you change this name make sure the 'include' line in TunedPerformancePatch.yaml # matches this name: include=openshift-node-performance-${PerformanceProfile.metadata.name} # Also in file 'validatorCRs/informDuValidator.yaml': # name: 50-performance-${PerformanceProfile.metadata.name} name: openshift-node-performance-profile annotations: ran.openshift.io/reference-configuration: "ran-du.redhat.com" spec: additionalKernelArgs: - "rcupdate.rcu_normal_after_boot=0" - "efi=runtime" - "vfio_pci.enable_sriov=1" - "vfio_pci.disable_idle_d3=1" - "module_blacklist=irdma" cpu: isolated: $isolated reserved: $reserved hugepages: defaultHugepagesSize: $defaultHugepagesSize pages: - size: $size count: $count node: $node machineConfigPoolSelector: pools.operator.machineconfiguration.openshift.io/$mcp: "" nodeSelector: node-role.kubernetes.io/$mcp: '' numa: topologyPolicy: "restricted" # To use the standard (non-realtime) kernel, set enabled to false realTimeKernel: enabled: true workloadHints: # WorkloadHints defines the set of upper level flags for different type of workloads. # See https://github.com/openshift/cluster-node-tuning-operator/blob/master/docs/performanceprofile/performance_profile.md#workloadhints # for detailed descriptions of each item. # The configuration below is set for a low latency, performance mode. realTime: true highPowerConsumption: false perPodPowerManagement: false