[ 
https://issues.apache.org/jira/browse/FLINK-5973?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Konstantin Knauf reopened FLINK-5973:
-------------------------------------

Re-opening in accordance with https://issues.apache.org/jira/browse/FLINK-23206.

> 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: auto-closed
>
> 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)

Reply via email to