-
Notifications
You must be signed in to change notification settings - Fork 313
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
feat: dynamic ram assignment when over 1GB #4921
Conversation
@marcellorinaldo What do you think about this impl? |
The rest of this PR is going to be research for the questions asked above. This thoughts are all started becue of the following line in the docs. Rather than setting stack limits, the Oracle docs suggest setting goals, so that the JVM can dynamically optimize.
|
@GregoryIvo You can dome some experiments to see how much memory is allocated at runtime with JVM default options and the hard-coded values passed with
Utils:
References:
|
sed -i "s/-Xms[0-9]*m -Xmx[0-9]*m/$RAM_REPLACEMENT_STRING/g" /opt/eclipse/kura/bin/start_kura_background.sh | ||
else | ||
echo "Leaving kura ram as the default set in installer profile" |
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.
By default, on generic profiles this will default to 512MB: https://github.com/eclipse/kura/blob/c9c25c02d992be0981c2ac06befa0bc13ab45b10/kura/distrib/pom.xml#L1569C41-L1569C41
Are we ok with this even on devices with < 1GB of memory?
With original parameters: 125640 Jps |
with 1GB (1/4th) allotted: root@kevin:/opt/eclipse/kura/bin# jps |
According to procfs documentation [1] MemTotal reports "Total usable RAM (i.e., physical RAM minus a few reserved bits and the kernel binary code).". What happens if the system has 1GB of physical memory? |
in theory, it will report less than 1024, and the default set in the profile will be used. (unchanged) |
With the changes today:
|
Modifies the customize-installation script so that if there is more than 1GB of RAM available, kura will utilize 1/4th of it
Thinks to be figured out:
Brief description of the PR. [e.g. Added
null
check onobject
to avoidNullPointerException
]Related Issue: This PR fixes/closes {issue number}
Description of the solution adopted: A more detailed description of the changes made to solve/close one or more issues. If the PR is simple and easy to understand this section can be skipped
Screenshots: If applicable, add screenshots to help explain your solution
changed from the default 512 -> calculated 948
Manual Tests: Optional description of the tests performed to check correct functioning of changes, useful for an efficient review
Any side note on the changes made: Description of any other change that has been made, which is not directly linked to the issue resolution [e.g. Code clean up/Sonar issue resolution]