-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calculate the MaxRAMPercentage dynamically #528
Comments
The point of us setting MaxRAMPercentage is that you get away with setting a better heap size (assuming 1 pod per app; that pod has a container memory limit) based on the detected container limit without needing to know the container limit.
I take it you set the latter two, but not the heap size? Note that you can override the default percentage to a different value or set the heap size in absolute terms. Have you considered using such an approach instead?
Glad that it works for you. I wonder how you calculate the dynamic percentage without knowing the total container memory. Note that there are other factors which need non-heap memory, not just the JIT and Metaspace (e.g. Thread stacks). So this gets complicated really fast. |
It gets complicated fast - we've mapped the However, at this stage, it might be more straightforward to use Our current formula for It's somewhat unfortunate that the JVM cannot automatically determine the "optimal" memory allocation, even when |
That's a nice trick! We might be able to add support for something like that out of the box and do something sensible, but that's probably more a longer-term goal. |
The default
MaxRAMPercentage
is set to80.0
, but it doesn't takeMaxMetaspaceSize
orReservedCodeCacheSize
into consideration.Wouldn't it be more effective to dynamically calculate the
MaxRAMPercentage
, factoring inGC_MAX_METASPACE_SIZE
and possiblyReservedCodeCacheSize
?I manually patched the
java-default-options
to support dynamic calculation ofMaxRAMPercentage
, and we haven't experienced anyOOMKilled
incidents since implementing the change.The text was updated successfully, but these errors were encountered: