[ https://issues.apache.org/jira/browse/FLINK-7400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16216586#comment-16216586 ]
ASF GitHub Bot commented on FLINK-7400: --------------------------------------- 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? > off-heap limits set to conservatively in cluster environments > ------------------------------------------------------------- > > Key: FLINK-7400 > URL: https://issues.apache.org/jira/browse/FLINK-7400 > Project: Flink > Issue Type: Bug > Components: Cluster Management, Mesos, YARN > Affects Versions: 1.3.0, 1.3.1, 1.3.2 > Reporter: Nico Kruber > Assignee: Nico Kruber > > Inside {{ContaineredTaskManagerParameters}}, since FLINK-6217, the > {{offHeapSize}} is set to the amount of memory Flink will use off-heap which > will be set as the value for {{-XX:MaxDirectMemorySize}} in various cases. > This does not account for any off-heap use by other components than Flink, > e.g. RocksDB, other libraries, or the JVM itself. > We should add the {{cutoff}} from the {{CONTAINERIZED_HEAP_CUTOFF_RATIO}} > configuration parameter to {{offHeapSize}} as implied by the description on > what this parameter is there for. -- This message was sent by Atlassian JIRA (v6.4.14#64029)