Repository navigation
[fix] Adapt default FE JVM heaps to container memory limits - #552
Merged
Merged
Conversation
Open
7 of 10 tasks
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.
What problem does this PR solve?
Issue Number: DORIS-30261
The default FE image can start with an 8 GiB heap even when the container memory limit is 8 GiB or less. For new DCR and DDC clusters with a memory limit, adapt the image defaults before startup. For both JDK 8 and JDK 17, set the initial and maximum heaps to 80% of the limit. JDK 8 uses fixed heap sizes rounded down to whole MiB. JDK 17 uses JVM container-aware percentages.
Keep explicit user JVM entries and the rest of the image's JVM options. A CR annotation preserves legacy behavior on Operator upgrades and lets users opt in during a planned rollout. The same-image init container stages the config before runtime config persistence.
Release note
New FE workloads with a memory limit default to 80% of that limit for both initial and maximum JVM heap sizes. Existing clusters can opt in with the
doris.apache.org/fe-heap-policy=autoannotation.Check List (For Author)
doc/operation/fe_heap.md.Validation of the 80% policy:
-Xms6553m -Xmx6553mfor an 8 GiB limit. They also check that JDK 17 replaces the fixed image heap flags with the two 80% flags.The preceding OrbStack K3s integration run covered official JDK 8 and 17 FE startup across DCR and DDC, ConfigMap precedence, request-only behavior, and upgrade compatibility. The FE Pod UID and StatefulSet template stayed the same on upgrade and the FE rolled after explicit opt-in. That run used the earlier heap ratios.
Check List (For Reviewer who merge this PR)