Check the docs here: https://docs.redhat.com/en/documentation/openshift_container_platform/4.16/html/scalability_and_performance/what-huge-pages-do-and-how-they-are-consumed#configuring-huge-pages_huge-pages
You have created the tuned object but you are still missing the mcp, something like
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
metadata:
name: worker-hp
labels:
worker-hp: ""
spec:
machineConfigSelector:
matchExpressions:
- {key: machineconfiguration.openshift.io/role, operator: In, values: [worker,node-hugepages-1g]}
nodeSelector:
matchLabels:
node-role.kubernetes.io/worker-hp: ""
you can list the mcp with:
oc get mcp
and see if the changes are applied to the selected nodes
On a side note, this only works for worker nodes, control nodes won't allow custom roles, as you can check if you get the logs for the machine config controler pod
oc logs deployment.apps/machine-config-controller -n openshift-machine-config-operator
[...]
I0321 09:52:19.949950 1 helpers.go:77] Found master node that matches selector for custom pool worker-hp, defaulting to master. This node will not have any custom role configuration as a result. Please review the node to make sure this is intended
I0321 09:52:21.871993 1 helpers.go:77] Found master node that matches selector for custom pool worker-hp, defaulting to master. This node will not have any custom role configuration as a result. Please review the node to make sure this is intended
[...]