NicoK commented on a change in pull request #8556: [FLINK-12171][Network] Do 
not limit the network buffer memory by heap size on the TM side
URL: https://github.com/apache/flink/pull/8556#discussion_r302141656
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/NettyShuffleEnvironmentConfiguration.java
 ##########
 @@ -229,12 +229,15 @@ public static long 
calculateNewNetworkBufferMemory(Configuration config, long ma
                }
 
                // finally extract the network buffer memory size again from:
-               // jvmHeapNoNet = jvmHeap - networkBufBytes
-               //              = jvmHeap - Math.min(networkBufMax, 
Math.max(networkBufMin, jvmHeap * netFraction)
-               // jvmHeap = jvmHeapNoNet / (1.0 - networkBufFraction)
+               // jvmHeapNoNet = jvmTotal - networkBufBytes
+               //              = jvmTotal - Math.min(networkBufMax, 
Math.max(networkBufMin, jvmHeap * netFraction)
+               // jvmTotal = jvmHeapNoNet / (1.0 - networkBufFraction)
 
 Review comment:
   Terminology wise, maybe, we should go with the names of 
`TaskManagerServices#calculateHeapSizeMB` which this function should be the 
inverse of (also adapt in the lines above):
   ```
   final long totalProcessMemory = megabytesToBytes(totalJavaMemorySizeMB);
   final long networkReservedMemory = getReservedNetworkMemory(config, 
totalProcessMemory);
   final long heapAndManagedMemory = totalProcessMemory - networkReservedMemory;
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to