Update the java8 template to honor cgroups memory limits #130
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.
This commit upgrades the openjdk version to the earliest that supports
cgroup memory limits. It also applies the JVM arguments required to
enable the support.
This change is needed for the JVM to recognize the actual memory
made available to it via the container instead of believing it has
access to the amount of memory possessed by the node running the
container.
Signed-off-by: Chad Taylor [email protected]
Description
This PR updates the java8 template to use a newer version of the OpenJDK that supports cgroup memory limits. It also updates the JVM to use the flags necessary to enable the cgroup memory limits support in production.
Motivation and Context
Which issue(s) this PR fixes
Fixes #129
How Has This Been Tested?
Using this template and the function defined in #129, I was able to successfully invoke the function without crashing the container and receiving a 200 OK response with
Allocated more than 80% (75.5 MiB) of the max allowed JVM memory size (89.0 MiB)%
in the body.Types of changes
Checklist:
git commit -s