-
Notifications
You must be signed in to change notification settings - Fork 315
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
[AMORO-3451] Fix kubernetes optimizer pod is frequently being killed #3458
base: master
Are you sure you want to change the base?
[AMORO-3451] Fix kubernetes optimizer pod is frequently being killed #3458
Conversation
I didn't format the code😂, I'll pay attention next time. |
|
||
if (resource.getMemoryMb() > 0) { | ||
memory = resource.getMemoryMb(); | ||
} else { | ||
memoryPerThread = Long.parseLong(checkAndGetProperty(groupProperties, MEMORY_PROPERTY)); | ||
memory = memoryPerThread * resource.getThreadCount(); | ||
} | ||
|
||
// reserving 20% of total pod memory for JVM non-heap memory | ||
jvmHeapMemory = (long) (memory * 0.8); |
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.
If we do not use off-heap memory in the code, I think it can be set to 0.9, which will not cause the container to be killed. If it is still frequently killed by OOM, we may need to check whether there is a memory leak in the code or the instantaneous Heap usage exceeds the container limit. We may be able to provide an external parameter for users to set, WDYT?
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.
Sounds great, I'll work on it.
7bfe3c3
to
c5c3e8e
Compare
The default 80% configuration looks good to me. Maybe we can merge this PR now or do we have some other thing to validate before that? @Marvel-Gu @czy006 |
Why are the changes needed?
Close #3451.
Brief change log
In ams KubernetesOptimizerContainer, limit the size of the JVM heap memory to 80% of the pod's memory limit.
How was this patch tested?
Add some test cases that check the changes thoroughly including negative and positive cases if possible
Add screenshots for manual tests if appropriate
Run test locally before making a pull request
Documentation