Skip to content

Conversation

md5nake
Copy link
Contributor

@md5nake md5nake commented May 10, 2022

This commit ensures expected behaviour when trying out the example below, detailed in the README.

To let the JVM calculate the heap size from the container declared memory limit, unset MEMORY with an empty value, such as -e MEMORY="". By default, the JVM will use 25% of the container memory limit as the heap limit; however, as an example the following would tell the JVM to use 75% of the container limit of 2GB of memory:
-e MEMORY="" -e JVM_XX_OPTS="-XX:MaxRAMPercentage=75" -m 2000M

Copy link
Owner

@itzg itzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirmed that I broke the behavior in 97fe6b1 and this PR fixes it the right way.

Admittedly it is awkward to "unset" the variable to indicate a different behavior, so I am going to introduce something like MEMORY_PCT to explicitly drive the host/container based derivation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants