czy006 commented on code in PR #3458:
URL: https://github.com/apache/amoro/pull/3458#discussion_r1982611322
##########
amoro-ams/src/main/java/org/apache/amoro/server/manager/KubernetesOptimizerContainer.java:
##########
@@ -148,18 +148,23 @@ public Map<String, Object> generatePodStartArgs(
Resource resource, Map<String, String> groupProperties) {
long memoryPerThread;
long memory;
+ long jvmHeapMemory;
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);
Review Comment:
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?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]