[ https://issues.apache.org/jira/browse/FLINK-2641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14745117#comment-14745117 ]
ASF GitHub Bot commented on FLINK-2641: --------------------------------------- Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/1129#discussion_r39489755 --- Diff: flink-runtime/src/main/scala/org/apache/flink/runtime/taskmanager/TaskManager.scala --- @@ -1586,32 +1586,29 @@ object TaskManager { ConfigConstants.TASK_MANAGER_MEMORY_FRACTION_KEY, "MemoryManager fraction of the free memory must be between 0.0 and 1.0") - val relativeMemSize = (EnvironmentInformation.getSizeOfFreeHeapMemoryWithDefrag() * - fraction).toLong + if (memType == MemoryType.HEAP) { - LOG.info(s"Using $fraction of the currently free heap space for Flink managed " + - s" heap memory (${relativeMemSize >> 20} MB).") + val relativeMemSize = (EnvironmentInformation.getSizeOfFreeHeapMemoryWithDefrag() * + fraction).toLong - relativeMemSize - } - else { - val ratio = configuration.getFloat( - ConfigConstants.TASK_MANAGER_MEMORY_OFF_HEAP_RATIO_KEY, - ConfigConstants.DEFAULT_MEMORY_MANAGER_MEMORY_OFF_HEAP_RATIO) - - checkConfigParameter(ratio > 0.0f, - ConfigConstants.TASK_MANAGER_MEMORY_OFF_HEAP_RATIO_KEY, - "MemoryManager ratio (off-heap memory / heap size) must be larger than zero") - - val maxHeapSize = EnvironmentInformation.getMaxJvmHeapMemory() - val relativeMemSize = (maxHeapSize * ratio).toLong + LOG.info(s"Using $fraction of the currently free heap space for Flink managed " + + s" heap memory (${relativeMemSize >> 20} MB).") + + relativeMemSize + } else if (memType == MemoryType.OFF_HEAP) { --- End diff -- inconsistent code style, linebreak after closing `'}'` > Integrate the off-heap memory configuration with the TaskManager start script > ----------------------------------------------------------------------------- > > Key: FLINK-2641 > URL: https://issues.apache.org/jira/browse/FLINK-2641 > Project: Flink > Issue Type: New Feature > Components: Start-Stop Scripts > Affects Versions: 0.10 > Reporter: Stephan Ewen > Assignee: Maximilian Michels > Fix For: 0.10 > > > The TaskManager start script needs to adjust the {{-Xmx}}, {{-Xms}}, and > {{-XX:MaxDirectMemorySize}} parameters according to the off-heap memory > settings. -- This message was sent by Atlassian JIRA (v6.3.4#6332)