flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] wg1026688210 commented on a change in pull request #7185: [FLINK-10884] [yarn/mesos] adjust container memory param to set a safe margin from offheap memory
Date Tue, 04 Dec 2018 13:35:10 GMT
wg1026688210 commented on a change in pull request #7185: [FLINK-10884] [yarn/mesos]  adjust
 container memory param  to set a safe margin from offheap memory
URL: https://github.com/apache/flink/pull/7185#discussion_r238663287
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/ContaineredTaskManagerParameters.java
 ##########
 @@ -158,8 +158,10 @@ public static ContaineredTaskManagerParameters create(
 
 		// (2) split the remaining Java memory between heap and off-heap
 		final long heapSizeMB = TaskManagerServices.calculateHeapSizeMB(containerMemoryMB - cutoffMB,
config);
-		// use the cut-off memory for off-heap (that was its intention)
-		final long offHeapSizeMB = containerMemoryMB - heapSizeMB;
+		// (3) try to compute the offHeapMemory from a safe margin
+		final long restMemoryMB = containerMemoryMB - heapSizeMB;
+		final long offHeapCutoffMemory = calculateOffHeapCutoffMB(config, restMemoryMB);
 
 Review comment:
   Thanks for your suggestion.  It maybe  bring  more refactor  to the project  if  we name
the current "containerized.heap-cutoff-ratio" to "containerized.memory-cutoff-ratio".Because
we need to adapt  a small memory container due to 600 mega byte of the current "containerized.heap-cutoff-min".
How about we set a  common default value of "containerized.offheap-cutoff-ratio" and "containerized.offheap-cutoff-min"
so that user do not need to care the two parameters at most condition. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message