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

Set default heap size to half container memory limit #296

Open
Miles-Garnsey opened this issue Mar 14, 2022 · 1 comment
Open

Set default heap size to half container memory limit #296

Miles-Garnsey opened this issue Mar 14, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@Miles-Garnsey
Copy link
Member

Miles-Garnsey commented Mar 14, 2022

What is missing?

The heap size in the Cassandra container does not currently scale in response to changes to the memory limits set by the container runtime.

This means that users who set a memory limit may end up with a heap which is greater than 50% of their total memory available, which will cause OOM killer to kill processes in the management API container.

We can use the settings XX:MaxRAMFraction, -XX:MinRAMFraction for Java 8 131 - 190. More recent versions of Java require the use of -XX:MaxRAMPercentage, -XX: MinRAMPercentage.

When implementing, we should ensure that users who are setting regular max_heap_size/max_heap_size can still set these in a fixed fashion. This ticket is just to implement a default which is sensible for users who are defining resource limits via CRI mechanisms.

┆Issue is synchronized with this Jira Story by Unito
┆Issue Number: CASS-45

@Miles-Garnsey Miles-Garnsey added the enhancement New feature or request label Mar 14, 2022
@sync-by-unito sync-by-unito bot changed the title Set default heap size to half container memory limit K8SSAND-1326 ⁃ Set default heap size to half container memory limit Mar 14, 2022
@jsanda
Copy link
Contributor

jsanda commented Mar 15, 2022

This might be easier/less messy to do in k8ssandra-operator since we have introduced a structured config approach.

@adejanovski adejanovski moved this to To Groom in K8ssandra Nov 8, 2022
@sync-by-unito sync-by-unito bot changed the title K8SSAND-1326 ⁃ Set default heap size to half container memory limit Set default heap size to half container memory limit Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: No status
Development

No branches or pull requests

2 participants