sls-packaging no longer sets -XX:+UseContainerCpuShares
#1543
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.
Before this PR
all jdk-11 through jdk-19 services set
-XX:+UseContainerCpuShares
unnecessarily. See the container support section of the go-java-launcher readme:After this PR
This is part of a deprecation campaign to allow jvms in containers to use ergonomics profiles based on the host system as opposed to requests-based overrides.
==COMMIT_MSG==
sls-packaging no longer sets
-XX:+UseContainerCpuShares
==COMMIT_MSG==
Possible downsides?
Removing
UseContainerCpuShares
will have no impact in the short term because go-java-launcher overrides theActiveProcessorCount
property based on requests by default, unless container support isdisabled. An audit of uses of that flag shows primarily tests will be impacted, relatively low risk that this will impact services. In the off-chance it does make a change for services, the result will be the behavior that we ultimately want, without the slow rollout we intend for most products.
Alternatives
Originally I put together an implementation using a feature flag, but decided the additional complexity around configuration would do more harm than good. You can find the diff here.