Skip to content

Commit cca2ac3

Browse files
committed
TELCODOCS-2127: Adding kernalpagesize API to PP
1 parent 8830df0 commit cca2ac3

File tree

3 files changed

+88
-1
lines changed

3 files changed

+88
-1
lines changed

modules/cnf-memory-optimization.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * scalability_and_performance/low_latency_tuning/cnf-tuning-low-latency-nodes-with-perf-profile.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="cnf-configuring-kernal-page-size_{context}"]
7+
= Configuring memory page sizes
8+
9+
By configuring memory page sizes, system administrators can implement more efficient memory management on a specific node to suit workload requirements. The Node Tuning Operator provides a method for configuring huge pages and kernel page sizes by using a performance profile.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * scalability_and_performance/low_latency_tuning/cnf-tuning-low-latency-nodes-with-perf-profile.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="cnf-page-size-optimization_{context}"]
7+
= Configuring kernel page sizes
8+
9+
Use the `kernelPageSize` specification in a performance profile to configure the kernel page size on a specific node. Specify larger kernel page sizes for memory-intensive, high-performance workloads.
10+
11+
[NOTE]
12+
====
13+
For nodes with an x86_64 or AMD64 architecture, you can only specify `4k` for the `kernelPageSize` specification. For nodes with an AArch64 architecture, you can specify `4k` or `64k` for the `kernelPageSize` specification. The default value is `4k`.
14+
====
15+
16+
.Prerequisites
17+
18+
* Access to the cluster as a user with the `cluster-admin` role.
19+
20+
* Install the {oc-first}.
21+
22+
.Procedure
23+
24+
. Create a performance profile to target nodes where you want to configure the kernel page size by creating a YAML file that defines the `PerformanceProfile` resource:
25+
+
26+
.Example `pp-kernel-pages.yaml` file
27+
[source,yaml]
28+
----
29+
apiVersion: performance.openshift.io/v1
30+
kind: PerformanceProfile
31+
metadata:
32+
name: example-performance-profile
33+
#...
34+
spec:
35+
kernelPageSize: "64k" <1>
36+
nodeSelector:
37+
node-role.kubernetes.io/worker: "" <2>
38+
----
39+
<1> This example specifies a kernel page size of `64k`. You can only specify `64k` for nodes with an AArch64 architecture. The default value is `4k`.
40+
<2> This example targets nodes with the `worker` role.
41+
42+
. Apply the performance profile to the cluster:
43+
+
44+
[source,bash]
45+
----
46+
$ oc create -f pp-kernel-pages.yaml
47+
----
48+
+
49+
.Example output
50+
----
51+
performanceprofile.performance.openshift.io/example-performance-profile created
52+
----
53+
54+
.Verification
55+
56+
. Start a debug session on the node where you applied the performance profile by running the following command:
57+
+
58+
[source,bash]
59+
----
60+
$ oc debug node/<node_name> <1>
61+
----
62+
<1> Replace `<node_name>` with the name of the node with the performance profile applied.
63+
64+
. Verify that the kernel page size is set to the value you specified in the performance profile by running the following command:
65+
+
66+
[source,bash]
67+
----
68+
$ getconf PAGESIZE
69+
----
70+
+
71+
.Example output
72+
----
73+
65536
74+
----

scalability_and_performance/cnf-tuning-low-latency-nodes-with-perf-profile.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ include::modules/cnf-about-irq-affinity-setting.adoc[leveloffset=+2]
8989

9090
include::modules/cnf-configure_for_irq_dynamic_load_balancing.adoc[leveloffset=+2]
9191

92-
include::modules/cnf-configuring-huge-pages.adoc[leveloffset=+1]
92+
include::modules/cnf-memory-optimization.adoc[leveloffset=+1]
93+
94+
include::modules/configuring-kernal-page-size.adoc[leveloffset=+2]
95+
96+
include::modules/cnf-configuring-huge-pages.adoc[leveloffset=+2]
9397

9498
include::modules/cnf-allocating-multiple-huge-page-sizes.adoc[leveloffset=+2]
9599

0 commit comments

Comments
 (0)