-
Notifications
You must be signed in to change notification settings - Fork 151
Add JAVA_OPTS to helm chart #995
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
29b8394
Add JAVA_OPTS to helm chart
abielawa 1c43876
Remove ActiveProcessorCount from default javaOpts
abielawa 6d55904
Bump the postgresql version
abielawa 531136d
Update Helm README.md
abielawa 3cce6aa
Syntax fix
abielawa 55f297e
Update Helm README.md
abielawa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't the processor count be determined from the allocated resources?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In kubernetes, while specifying the cpu
request: 100mand thelimit: 1000mthe JVM pod will always see only 1 core. By combining resources requests/limits with-XX:ActiveProcessorCount=2we can keep the requests/limits lower and make the pod see 2 cores to prevent cpu throttling.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this request/limit configuraton somehow centrlised? I can't see it in this file.
And why 2, not 4? Is there some formula to calculate this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default values for
resource request/limitsare not defined in Helm Chart - we overwrite them in Flux configuration in another repository where we have all the apps for the infrastructure defined.Also, the
javaOptswill be overwritten in the same way - probably won't ever be used since we always overwrite those values - but has to be defined just in case someone forgets to set them later.From now on, for each deployment the
javaOptsandresource request/limitshave to be configured according to the requirements.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we define default requests/limits here as well, then?
and why 2, not 4? ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point, in this repo you don't know where the app will be deployed - whether it will be the test, dev or prod environment and how many resources your app can use in this specific environment - so requests/limits by default are unnecessary because they are connected to the resources of the environment itself.
So the 2 was the minimal possible value that could be applied to take effect. The main reason I specified the default value was that I thought it could be overwritten by any value.
But after giving some thought and doing research I found out that the
ActiveProccessorAccounthas higher priority than request/limits, for example even if we specify thecpu limit: 4andActiveProccessorAccount=2, the cpu would be 2 because of theActiveProccessorAccount=2. So it’s not safe to specify the default value and also we don’t know the environment similarly as for requests/limits - I will remove theActiveProccessorAccountfrom the defaults.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, thanks for the explanation :)