flink1.10 taskmanager内存分配

 

taskmanager.memory.process.size: 4096m

-Xmx1748185876(1667M,flink web界面显示的java heap size) -Xms1748185876 -XX:MaxDirectMemorySize=510698460(487M) -XX:MaxMetaspaceSize=100663296(96M)

4096-JVM specific memory = total flink memory (M)(当配置taskmanager.memory.flink.size时,这里不需要减,配置的内存除JVM Metaspace和JVM Overhead之外全部作为flink  memory)

4096m * 0.88 = 3590M(flink memory,可以拿taskmanager.memory.network.min/0.1算出来)
taskmanager.memory.framework.off-heap.size=134217728b 128M
taskmanager.memory.framework.heap.size=134217728b 128M
taskmanager.memory.network.max=376480732b 359M
taskmanager.memory.network.min=376480732b 359M 3590*0.1
taskmanager.memory.managed.size=1505922928b 1436M 3590*0.4
taskmanager.memory.task.heap.size=1613968148b 1539M (3590-taskmanager.memory.framework.off-heap.size-taskmanager.memory.framework.heap.size
-taskmanager.memory.network.max-taskmanager.memory.managed.size)=1539
taskmanager.memory.task.off-heap.size=0b

Flink taskmanager JVM heap(T)=taskmanager.memory.task.heap.size+taskmanager.memory.framework.heap.size=1539M +128M=1667M

通过以上可快速得出 total flink memory (M):M=(T+128)*2   #####(1667+128)*2=3590

T-taskmanager.memory.framework.heap.size=taskmanager.memory.task.heap.size=M-taskmanager.memory.framework.off-heap.size-taskmanager.memory.framework.heap.size
-taskmanager.memory.network.max-taskmanager.memory.managed.size

T-128=M-128-128-M*0.1-M*0.4

M=(T+128)*2

另外,当配成taskmanager.memory.flink.size时,内存除了JVM Metaspace和JVM Overhead全作为 total flink memory (M),因此通过配置时的taskmanager.memory.flink.size值可以迅速计算出T=M/2-128    #4096/2-128=1920M

 

posted @ 2020-03-12 16:55  一直爬行的蜗牛牛  阅读(4677)  评论(0编辑  收藏  举报