[ https://issues.apache.org/jira/browse/FLINK-5973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17321672#comment-17321672 ]
Flink Jira Bot commented on FLINK-5973: --------------------------------------- This issue and all of its Sub-Tasks have not been updated for 180 days. So, it has been labeled "stale-minor". If you are still affected by this bug or are still interested in this issue, please give an update and remove the label. In 7 days the issue will be closed automatically. > check whether the direct memory size is always correctly calculated > ------------------------------------------------------------------- > > Key: FLINK-5973 > URL: https://issues.apache.org/jira/browse/FLINK-5973 > Project: Flink > Issue Type: Bug > Components: Runtime / Task > Reporter: Nico Kruber > Priority: Minor > Labels: stale-minor > > A user on the mailing list ran into the problem that the {{directMemorySize}} > was incorrectly set too high which may happen if the following code path gets > {{maxMemory}} from 1/4*<physical mem size>> instead of the calculation, > {{taskmanager.sh}} is doing (in his case via the discouraged > {{start-local.sh}} script). > Other code paths may also exhibit this issue, which should be checked. > {code:title=TaskManagerServices#createMemoryManager()} > } else if (memType == MemoryType.OFF_HEAP) { > // The maximum heap memory has been adjusted according to the fraction > long maxMemory = EnvironmentInformation.getMaxJvmHeapMemory(); > long directMemorySize = (long) (maxMemory / (1.0 - memoryFraction) * > memoryFraction); > if (preAllocateMemory) { > LOG.info("Using {} of the maximum memory size for managed > off-heap memory ({} MB)." , > memoryFraction, directMemorySize >> 20); > } else { > LOG.info("Limiting managed memory to {} of the maximum memory > size ({} MB)," + > " memory will be allocated lazily.", memoryFraction, > directMemorySize >> 20); > } > memorySize = directMemorySize; > } else { > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)