1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00

Fix hugepages node config

This commit is contained in:
Alex Dellapenta
2019-07-29 12:12:41 -04:00
committed by openshift-cherrypick-robot
parent 455bc7e08c
commit 3225e01c9e

View File

@@ -1,3 +1,7 @@
// Module included in the following assemblies:
//
// * scalability_and_performance/what-huge-pages-do-and-how-they-are-consumed-by-apps.adoc
[id="configuring-huge-pages_{context}"]
= Configuring huge pages
@@ -10,46 +14,53 @@ Node Tuning Operator to allocate huge pages on a specific node.
tuned profile, which describes how many huge pages should be allocated:
+
----
$ oc label node <node-using-hugepages> hugepages=true
$ oc label node <node_using_hugepages> hugepages=true
----
. Create a tuned profile for this specific node and allocate some huge pages. To
associate the profile to the correct node, edit the tuned resource and add a
`profile` and `match` section:
. Create a file with the following content and name it `hugepages_tuning.yaml`:
+
----
$ oc edit tuned
----
apiVersion: tuned.openshift.io/v1
kind: Tuned
metadata:
name: hugepages <1>
namespace: openshift-cluster-node-tuning-operator
spec:
profile: <2>
- data: |
[main]
summary=Configuration for hugepages
include=openshift-node
.. In the `profile` section, add the following tuned profile for allocating huge
pages:
[vm]
transparent_hugepages=never
[sysctl]
vm.nr_hugepages=1024
name: node-hugepages
recommend:
- match: <3>
- label: hugepages
priority: 30
profile: node-hugepages
----
<1> Set the `name` parameter value to `hugepages`.
<2> Set the `profile` section to allocate huge pages.
<3> Set the `match` section to associate the profile to nodes with the `hugepages` label.
. Create the custom `hugepages` tuned profile by using the `hugepages_tuning.yaml` file:
+
----
- data: |
[main]
summary=Configuration for hugepages
include=openshift-node
[vm]
transparent_hugepages=never
[sysctl]
vm.nr_hugepages=1024
$ oc create -f hugepages_tuning.yaml
----
.. To apply the profile to the correct node, add the following to the `match`
section:
. After creating the profile, the Operator applies the new profile to the correct
node and allocates huge pages. Check the logs of a tuned pod on a node using
huge pages to verify:
+
----
- match:
- label: hugepages
priority: 30
profile: hugepages
----
The Operator applies the new profile to the correct node and allocates huge
pages:
$ oc logs <tuned_pod_on_node_using_hugepages> \
-n openshift-cluster-node-tuning-operator | grep 'applied$' | tail -n1
----
2019-04-30 13:38:26,831 INFO tuned.plugins.plugin_sysctl: reapplying system sysctl
2019-04-30 13:38:26,837 INFO tuned.daemon.daemon: static tuning from profile 'hugepages' applied
2019-04-30 13:38:26,845 INFO tuned.daemon.daemon: terminating Tuned
2019-08-08 07:20:41,286 INFO tuned.daemon.daemon: static tuning from profile 'node-hugepages' applied
----