Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/4506#discussion_r146498833
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/ContaineredTaskManagerParameters.java
---
@@ -143,7 +143,8 @@ public static ContaineredTaskManagerParameters create(
// (2) split the remaining Java memory between heap and off-heap
final long heapSizeMB =
TaskManagerServices.calculateHeapSizeMB(javaMemorySizeMB, config);
- final long offHeapSize = javaMemorySizeMB == heapSizeMB ? -1L :
javaMemorySizeMB - heapSizeMB;
+ // use the cut-off memory for off-heap (that was its intention)
+ final long offHeapSize = javaMemorySizeMB == heapSizeMB ? -1L :
containerMemoryMB - heapSizeMB;
--- End diff --
Do I understand it correctly that with this change, we basically add the
safety margin (cut-off) to the amount of direct memory?
---