About core allocation for flink task manager and task slot

怎甘沉沦 提交于 2021-01-28 05:44:54

问题


I use following command to kick off a flink yarn session.

yarn-session.sh -jm 4096 -tm 4096 -n 4 -s 2

With above command, it means that 4 task managers will be started(also means that 4 yarn containers are started since every task manager is a yarn container), and 2 slots for each task manager.

Since one task manager is a yarn container, that means, only one core is allocated for each task manager , but I have specified 2 slots for each task manager, which means the two slots will share only one core?

I have thought that each slot should occupy at least one core?

Not sure I have understood correctly or I have missed something.


回答1:


"One core per slot" has been suggested as a default starting point, but it shouldn't be considered a rule. You are free to do whatever you want. If each slot contains several computationally intensive tasks, it makes sense to give each slot multiple cores. On the other hand, if each slot has little work to do, and will spend most of its time blocked on i/o, a fractional core will be enough.



来源:https://stackoverflow.com/questions/63543558/about-core-allocation-for-flink-task-manager-and-task-slot

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!