Repository navigation
Document how to set vm.max_map_count on OpenShift with the Node Tuning Operator - #9625
Conversation
…g Operator Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…example Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Elastic Docs AI PR menuCheck the box to run an AI review for this pull request.
Powered by GitHub Agentic Workflows and docs-actions. For more information, reach out to the docs team. |
✅ Elastic Docs Style Checker (Vale)No issues found on modified lines! The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
|
|
||
| OpenShift sets `vm.max_map_count` to `262144` on its nodes by default. This is enough for {{es}} to start, because the [bootstrap check](/deploy-manage/deploy/self-managed/bootstrap-checks.md) requires at least `262144`. To set the recommended value `1048576`, use the OpenShift [Node Tuning Operator](https://github.com/openshift/cluster-node-tuning-operator). Pods created by ECK usually run with the `restricted-v2` security context constraint, which doesn't allow a Pod to change kernel settings, so an init container or a DaemonSet doesn't work. | ||
|
|
||
| Create a `Tuned` resource that applies the setting to the nodes that run {{es}} Pods: |
There was a problem hiding this comment.
Should this be a numbered step? Like is this step 1 and adding the label to the Elasticsearch Pods through the podTemplate is step 2? Otherwise the steps read as unrelated instead of sequential
There was a problem hiding this comment.
Good point, thanks. The setup is now two numbered steps: create the Tuned resource, then add the label to the Elasticsearch Pods. The two callouts for the Tuned example stay in step 1.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Content change after the approval: I checked the claim that OpenShift sets |
…ault" All OpenShift versions that ECK supports (4.16 and later) set the value by default. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Sorry for the back and forth. I reverted the version qualifier: ECK supports OpenShift 4.16 and later, which all set |
Summary
The documentation doesn't explain how to set
vm.max_map_counton OpenShift. This adds the explanation and the OpenShift-specific method (the Node Tuning Operator), and links it from the OpenShift pages.virtual-memory.md: new section "Using the Node Tuning Operator on OpenShift" with aTunedresource example, and how to label the Elasticsearch Pods so that only the nodes that run them are tuned.deploy-eck-on-openshift.md: states the OpenShift default and links the new section.k8s-openshift-deploy-elasticsearch.md: explains thenode.store.allow_mmap: falsesetting in the example with a callout, and links the new section.Tested on OpenShift 5.0.2 (RHCOS 10.2) with ECK 3.5.0 and Elasticsearch 9.2.0:
vm.max_map_count = 262144, and Elasticsearch starts green with mmap enabled and no tuning. The bootstrap check only requires 262144 (the recommended value is 1048576).Tunedprofile with a plainvm.max_map_count=1048576is applied by the operator, but the node keeps 262144 and the profile is reported as degraded, because the host sysctl file is applied again after the profile. The same happens with the=>form. Withoperand.tunedConfig.reapply_sysctl: falsethe node reads 1048576, the profile is healthy, and the Elasticsearch Pod sees 1048576. Nodes without labelled Pods keep the default. The upstream example in the Node Tuning Operator repository does not setreapply_sysctl, and uses262144.Not tested: OpenShift 4.x. The default value comes from a machine-config template in
openshift/machine-config-operator. The rendering of the new callout and theTunedexample callouts was checked with a local docs-builder build of the changed pages.Fixes elastic/cloud-on-k8s#5862
Generative AI disclosure
Tool(s) and model(s) used: Claude Code (Claude Sonnet 5.5)
🤖 Generated with Claude Code