Skip to content
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

Add method to adaptively calculate JVM heap size instead of using a constant #475

Open
4 tasks
maltesander opened this issue Sep 26, 2022 · 2 comments
Open
4 tasks

Comments

@maltesander
Copy link
Member

maltesander commented Sep 26, 2022

Recently we added the possibility to add resource requests and limits to our operators.

For the Java based products we currently use a factor of 0.8 to calculate the amount of heap for the JVM depending on the memory limit.

In most cases this will lead to unused memory when using alot of memory. E.g. a pod gets 100GB memory, this will be 80GB for the JVM and we end up with almost 20GB unused but reserved memory.

We need a method in the framework that adaptively calculates the required heap memory in order to waste less memory and leaving enough memory for the OS to run when specifying lower amounts.

Acceptance

  • A method to calculate the JVM heap depending on the amount specified is implemented in the framework
    • This includes research about a safe minimal value (e.g. 500mb for the OS that must always be respected)
  • The operator-rs is properly released
  • The resources concepts docs are updated
  • All operators managing java products use this method instead of the constant 0.8 factor
@lfrancke
Copy link
Member

Could you please check: I believe Java had some improvements in the last years where it detects if it runs within a container and can set max heap etc. automatically based on the constraints of the container?

@maltesander
Copy link
Member Author

I checked it, but im not sure thats what we want. You still set the memory via percentages (e.g. 80% of available memory). So i do not see a big difference to how we do it now?

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

No branches or pull requests

2 participants