Confused about FLINK task slot

廉价感情. 提交于 2019-12-12 11:07:25

问题


I know a task manager could have several task slots.

But, what is a task slot ? A JVM process or an object in memory or a thread?


回答1:


The answer might come late. But:

A Taskmanager (TM) is a JVM process, whereas a Taskslot (TS) is a Thread within the respective JVM process (TM). The managed memory of a TM is equally split up between the TS within a TM. No CPU isolation happens between the slots, just the managed memory is divided. Moreover, TS in the same TM share TCP connections (via multiplexing) and heartbeat messages. They may also share data sets and data structures, thus reducing the per-task overhead.

Source: https://ci.apache.org/projects/flink/flink-docs-release-1.5/concepts/runtime.html#task-slots-and-resources




回答2:


Each worker (TaskManager) is a JVM process, and may execute one or more subtasks in separate threads. To control how many tasks a worker accepts, a worker has so called task slots (at least one).

https://ci.apache.org/projects/flink/flink-docs-master/concepts/runtime.html#task-slots-and-resources




回答3:


@Janukowitsch's answer is good. Additionally, a TS represents a fixed subset of resources of the TM. One TS can take more than 1 thread. Actually one subtask/task is executed by one thread. Multiple subtasks/tasks can be deployed in the same slot.




回答4:


The number of slots is typically proportional to the number of available CPU cores of each TaskManager. As a general recommendation, the number of available CPU cores is a good default for taskmanager.numberOfTaskSlots.



来源:https://stackoverflow.com/questions/47197744/confused-about-flink-task-slot

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