|
| 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 | +---- |
0 commit comments