Flink notes: 028 task (task) and task slot (task slots)

Each task slot (task slot) actually represents a fixed-size subset of the TaskManager's computing resources.
These resources are used to independently execute a subtask.

insert image description here
If a TaskManager has three slots, it will divide the managed memory into three equally, and each slot
occupies a separate portion. In this way, when we execute a subtask on the slot, it is equivalent to delineating a piece of memory for "dedicated use", and there is no need to compete with tasks from other jobs for memory resources.

insert image description here
The number of slots required by the largest subtask of a program is the number of slots we will eventually apply for.
By default, flink sequential tasks share slots, and one slot can save the entire pipeline of a job. When we combine resource-intensive and non-intensive tasks at the same time Put them in a slot, and they can allocate the proportion of resources occupied by themselves, so as to ensure that the heaviest tasks are evenly distributed to all taskMansger. The parallel subtasks of each

task node are lined up and occupy different slots; and
different Subtasks of task nodes can share slots. In a slot, all tasks processed by the program can be executed here.
We call it the running pipeline (pipeline) that saves the entire job.

Guess you like

Origin blog.csdn.net/weixin_43015677/article/details/129913924