This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.12.3. 配置巨页
节点必须预先分配在 OpenShift Container Platform 集群中使用的巨页。使用 Node Tuning Operator 在特定节点中分配巨页。
流程
为相关节点添加标签,以便 Node Tuning Operator 知道要应用 tuned 配置集的节点。tuned 配置集规定了要分配的巨页数量:
oc label node <node_using_hugepages> hugepages=true
$ oc label node <node_using_hugepages> hugepages=true
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 创建一个包含以下内容的名为
hugepages_tuning.yaml
的文件:Copy to Clipboard Copied! Toggle word wrap Toggle overflow 使用
hugepages_tuning.yaml
文件创建定制的hugepages
tuned 配置集:oc create -f hugepages_tuning.yaml
$ oc create -f hugepages_tuning.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 在创建配置集后,Operator 会将新配置集应用到正确的节点中,并分配巨页。在使用巨页的节点中检查 tuned pod 的日志以确认:
oc logs <tuned_pod_on_node_using_hugepages> \ -n openshift-cluster-node-tuning-operator | grep 'applied$' | tail -n1
$ oc logs <tuned_pod_on_node_using_hugepages> \ -n openshift-cluster-node-tuning-operator | grep 'applied$' | tail -n1 2019-08-08 07:20:41,286 INFO tuned.daemon.daemon: static tuning from profile 'node-hugepages' applied
Copy to Clipboard Copied! Toggle word wrap Toggle overflow