Hi Experts,
I am debugging the WordCount Flink streaming program in local mode. Flink version is 1.7.2 I saw the following calculation logic about network buffer in class TaskManagerServices. jvmHeapNoNet is equal to -xmx amount in Java. why the networkBufBytes = xmx / (1-networkBufFraction) * networkBufFraction, it is a bit strange. why it is not calculated by xmx * networkBufFraction? final long networkBufBytes = Math.min(networkBufMax, Math.max(networkBufMin, Best Henry
|
Hi tao, As a whole, `networkBufBytes` is not part of the heap. In fact, it is allocated from the direct memory. The rough relationship (ignores min/max and assumes managed memory is allocated on heap) between the variables are: Total memory of TM (configured by taskmanager.heap.mb, the name may be a little misleading) = heap memory (-XmX) + networkBufBytes. networkBufBytes = Total memory of TM * networkBufFraction. Therefore, the networkBufBytes = xmx / (1 - networkBufFraction) * networkBufFraction. Best, Yun
|
Hi Yun,
Thanks a lot for the detailed and clear explanation, that is very helpful. Best Henry
|
Free forum by Nabble | Edit this page |