Conversation
Contributor
MCK 1.10.0 Release NotesNew Features
Bug Fixes
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The OM JVM heap was hardcoded to 90% of the container memory limit — an arbitrary value with no design rationale (traced to CLOUDP-82600, Feb 2021). This left insufficient headroom for non-heap JVM memory (metaspace, thread stacks, direct buffers), causing real customer OOM kills:
-Xmx18432m(90%), leaving only 2GB headroom. Support confirmed "the 2gb headroom is definitely not sufficient" and recommended increasing to 24Gi. At 75%, the same pod would have 5GB headroom.This PR:
MDB_OM_JVM_HEAP_PERCENTAGEenv var (default changed from 90% to 75%, the MongoDB internal standard per CLOUDP-373541)MDB_OM_AUTO_HEAPenv var — when enabled, the operator skips-Xmx/-Xmsand delegates to OM's built-in logicBefore: OM pods got
-Xmx4291m -Xms4291m(90% of default 5Gi). After: OM pods get-Xmx3576m -Xms3576m(75% of 5Gi), unless overridden.Proof of Work
controllers/operator/construct/jvm_test.go—TestGetOpsManagerPodMemPercentage(5 subtests),TestIsOmAutoHeapEnabled(3 subtests)controllers/operator/construct/opsmanager_construction_test.go—TestOmAutoHeapEnvVars,TestBuildJvmParamsEnvVars_WithAutoHeap,TestBuildJvmParamsEnvVars_WithCustomPercentage, updated existing tests for new 75% defaultdocker/mongodb-kubernetes-tests/tests/opsmanager/om_jvm_params.py— e2e test updated for new 75% expectationsgo test ./controllers/operator/construct/ -run "Jvm|AutoHeap|CustomPercentage|OmAutoHeap|GetOpsManager" -v -count=1Checklist
skip-changeloglabel if not needed