Skip to content

Commit 5eb718b

Browse files
committed
TELCODOCS-1514 - CNF-9112 Reserved Core Frequency Tuning
1 parent ad1d72b commit 5eb718b

File tree

3 files changed

+79
-3
lines changed

3 files changed

+79
-3
lines changed

modules/cnf-performance-profile-creator-arguments.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ Default: `false`.
2323
If this argument is set to `true` you should not disable hyperthreading in the BIOS. Disabling hyperthreading is accomplished with a kernel command line argument.
2424
====
2525

26+
| --enable-hardware-tuning
27+
a|Enable the setting of maximum CPU frequencies.
28+
This parameter is optional.
29+
30+
To enable this feature, set the maximum frequency for applications running on isolated and reserved CPUs for both of the following:
31+
32+
* `spec.hardwareTuning.isolatedCpuFreq`
33+
* `spec.hardwareTuning.reservedCpuFreq`
34+
2635
| `info`
2736
a| This captures cluster information and is used in discovery mode only. Discovery mode also requires the `must-gather-dir-path` argument. If any other arguments are set they are ignored.
2837

modules/cnf-running-the-performance-creator-profile-offline.adoc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ Flags:
154154
--split-reserved-cpus-across-numa Split the Reserved CPUs across NUMA nodes
155155
--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")
156156
--user-level-networking Run with User level Networking(DPDK) enabled
157+
--enable-hardware-tuning Enable setting maximum CPU frequencies
157158
----
158159
+
159160
[NOTE]
@@ -248,6 +249,29 @@ spec:
248249
realTimeKernel:
249250
enabled: false
250251
----
252+
+
253+
[NOTE]
254+
--
255+
When you pass the argument `--enable-hardware-tuning` as a flag to the Performance Profile Creator, the generated `PerformanceProfile` includes guidance on how to set frequency settings as follows:
256+
257+
[source,yaml]
258+
----
259+
apiVersion: performance.openshift.io/v2
260+
kind: PerformanceProfile
261+
metadata:
262+
name: performance
263+
spec:
264+
……………………
265+
……………………
266+
#HardwareTuning is an advanced feature, and only intended to be used if
267+
#user is aware of the vendor recommendation on maximum cpu frequency.
268+
#The structure must follow
269+
#
270+
# hardwareTuning:
271+
# isolatedCpuFreq: <Maximum frequency for applications running on isolated CPUs>
272+
# reservedCpuFreq: <Maximum frequency for platform software running on reserved CPUs>
273+
----
274+
--
251275
252276
. Apply the generated profile:
253277
+

modules/ztp-recommended-cluster-kernel-config.adoc

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,60 @@ Always use the latest supported real-time kernel version in your cluster. Ensure
1212
+
1313
[source,yaml]
1414
----
15+
apiVersion: performance.openshift.io/v2
16+
kind: PerformanceProfile
17+
# ...
1518
spec:
1619
additionalKernelArgs:
1720
- "rcupdate.rcu_normal_after_boot=0"
1821
- "efi=runtime"
19-
- "module_blacklist=irdma"
22+
- "vfio_pci.enable_sriov=1"
23+
- "vfio_pci.disable_idle_d3=1"
24+
- "module_blacklist=irdma"
25+
26+
# ...
27+
----
28+
29+
. Optional: Set the CPU frequency under the `hardwareTuning` field:
30+
+
31+
You can use hardware tuning to tune CPU frequencies for reserved and isolated core CPUs.
32+
For FlexRAN like applications, hardware vendors recommend that you run CPU frequencies below the default provided frequencies.
33+
It is highly recommended that, before setting any frequencies, you refer to the hardware vendor’s guidelines for maximum frequency settings for your processor generation.
34+
This example shows the frequencies for reserved and isolated CPUs for Sapphire Rapid hardware:
35+
+
36+
[source,yaml]
37+
----
38+
apiVersion: performance.openshift.io/v2
39+
kind: PerformanceProfile
40+
metadata:
41+
name: openshift-node-performance-profile
42+
spec:
43+
cpu:
44+
isolated: "2-19,22-39"
45+
reserved: "0-1,20-21"
46+
hugepages:
47+
defaultHugepagesSize: 1G
48+
pages:
49+
- size: 1G
50+
count: 32
51+
realTimeKernel:
52+
enabled: true
53+
hardwareTuning:
54+
isolatedCpuFreq: 2500000
55+
reservedCpuFreq: 2800000
2056
----
2157
2258
. Ensure that the `performance-patch` profile in the `Tuned` CR configures the correct CPU isolation set that matches the `isolated` CPU set in the related `PerformanceProfile` CR, for example:
2359
+
2460
[source,yaml]
2561
----
62+
apiVersion: tuned.openshift.io/v1
63+
kind: Tuned
64+
metadata:
65+
name: performance-patch
66+
namespace: openshift-cluster-node-tuning-operator
67+
annotations:
68+
ran.openshift.io/ztp-deploy-wave: "10"
2669
spec:
2770
profile:
2871
- name: performance-patch
@@ -33,12 +76,12 @@ spec:
3376
[main]
3477
summary=Configuration changes profile inherited from performance created tuned
3578
include=openshift-node-performance-openshift-node-performance-profile
36-
[sysctl]
37-
kernel.timer_migration=1
3879
[scheduler]
3980
group.ice-ptp=0:f:10:*:ice-ptp.*
4081
group.ice-gnss=0:f:10:*:ice-gnss.*
82+
group.ice-dplls=0:f:10:*:ice-dplls.*
4183
[service]
4284
service.stalld=start,enable
4385
service.chronyd=stop,disable
86+
# ...
4487
----

0 commit comments

Comments
 (0)