|
2 | 2 | // |
3 | 3 | // * scalability_and_performance/ibm-z-recommended-host-practices.adoc |
4 | 4 |
|
5 | | -:_content-type: PROCEDURE |
| 5 | +:_content-type: CONCEPT |
6 | 6 | [id="ibm-z-disable-thp_{context}"] |
7 | | -= How to disable Transparent Huge Pages |
8 | | - |
9 | | -Transparent Huge Pages (THP) attempt to automate most aspects of creating, managing, and using huge pages. Since THP automatically manages the huge pages, this is not always handled optimally for all types of workloads. THP can lead to performance regressions, since many applications handle huge pages on their own. Therefore, consider disabling THP. The following steps describe how to disable THP using a Node Tuning Operator (NTO) profile. |
10 | | - |
11 | | -[id="disable-thp-with-a-nto-profile_{context}"] |
12 | | -== Disable THP with a Node Tuning Operator (NTO) profile |
13 | | - |
14 | | -.Procedure |
15 | | - |
16 | | -. Copy the following NTO sample profile into a YAML file. For example, `thp-s390-tuned.yaml`: |
17 | | -+ |
18 | | -[source,yaml] |
19 | | ----- |
20 | | -apiVersion: tuned.openshift.io/v1 |
21 | | -kind: Tuned |
22 | | -metadata: |
23 | | - name: thp-workers-profile |
24 | | - namespace: openshift-cluster-node-tuning-operator |
25 | | -spec: |
26 | | - profile: |
27 | | - - data: | |
28 | | - [main] |
29 | | - summary=Custom tuned profile for OpenShift on IBM Z to turn off THP on worker nodes |
30 | | - include=openshift-node |
31 | | -
|
32 | | - [vm] |
33 | | - transparent_hugepages=never |
34 | | - name: openshift-thp-never-worker |
35 | | -
|
36 | | - recommend: |
37 | | - - match: |
38 | | - - label: node-role.kubernetes.io/worker |
39 | | - priority: 35 |
40 | | - profile: openshift-thp-never-worker |
41 | | ----- |
42 | | - |
43 | | -. Create the NTO profile: |
44 | | -+ |
45 | | -[source,terminal] |
46 | | ----- |
47 | | -$ oc create -f thp-s390-tuned.yaml |
48 | | ----- |
49 | | - |
50 | | -. Check the list of active profiles: |
51 | | -+ |
52 | | -[source,terminal] |
53 | | ----- |
54 | | -$ oc get tuned -n openshift-cluster-node-tuning-operator |
55 | | ----- |
56 | | - |
57 | | -. Remove the profile: |
58 | | -+ |
59 | | -[source,terminal] |
60 | | ----- |
61 | | -$ oc delete -f thp-s390-tuned.yaml |
62 | | ----- |
63 | | - |
64 | | -.Verification |
65 | | - |
66 | | -* Log in to one of the nodes and do a regular THP check to verify if the nodes applied the profile successfully: |
67 | | -+ |
68 | | -[source,terminal] |
69 | | ----- |
70 | | -$ cat /sys/kernel/mm/transparent_hugepage/enabled |
71 | | -always madvise [never] |
72 | | ----- |
73 | | - |
| 7 | += Disable Transparent Huge Pages |
74 | 8 |
|
| 9 | +Transparent Huge Pages (THP) attempt to automate most aspects of creating, managing, and using huge pages. Since THP automatically manages the huge pages, this is not always handled optimally for all types of workloads. THP can lead to performance regressions, since many applications handle huge pages on their own. Therefore, consider disabling THP. |
0 commit comments