当前位置:网站首页>Flink Learning 11: Flink Program Parallelism
Flink Learning 11: Flink Program Parallelism
2022-08-05 07:11:00 【hzp666】
1. Introduction to program parallelism

A slot is a resource group,
Generally, by default, the number of slots on each node is the number of CPU cores on the node.
flink will split a task into multiple subtasks,
and then the subtasks will be executed by multiple parallel threads.
The number of parallel threads of a task is called the parallelism of the task.
flink will assign subtasks to slot execution, so the maximum parallelism of the task is determined by the number of slots available on each TaskManager.

For example, there are 4 slots on a taskManager, then the taskManager will allocate 25% of the memory for each slot.
One or more threads can run in the same slot.

Threads in the same slot share the same Java virtual machine JVM
Tasks in the same JVM share TCP connection and heartbeat information
A slot of Task Manager represents an available thread, ps: slot only corresponds to memory isolation, not CPU isolation
By default, flink allows subtasks to share slots, even if they are subtasks of different tasks, but if they are from the same job.This sharing can achieve better resource utilization.

2. Introduction to parallelism at the execution level


After generating the environment as above, set setParallelism to 1, which means to set the parallelism to 1.
边栏推荐
猜你喜欢

After working for 3 years, I recalled the comparison between the past and the present when I first started, and joked about my testing career

golang-条件语句

Shiny04---DT和进度条在shiny中的应用

binary search tree problem

re正则表达式

技术分析模式(十)头肩图案

typescript64-映射类型

(2022杭电多校六)1012-Loop(单调栈+思维)

Flink学习12:DataStreaming API

2022熔化焊接与热切割操作证考试题及模拟考试
随机推荐
在anaconda Promat界面import torch通过,在jupyter notebook中报错的问题(仅提供思路理解!)
【instancetype类型 Objective-C】
UDP广播
Redis
re正则表达式
(2022杭电多校六)1010-Planar graph(最小生成树)
对数据类型而言运算符无效。运算符为 add,类型为 text。
PCI Pharma Services Announces Multi-Million Dollar Expansion of UK Manufacturing Facility to Meet Growing Demand for Global High Potency Drug Manufacturing Services to Support Oncology Treatment
typescript68-索引查询类型(查询多个)
Day9 of Hegong Daqiong team vision team training - camera calibration
FPGA解析B码----连载4
2022熔化焊接与热切割操作证考试题及模拟考试
Week 8 Document Clustering(文本聚类)
Promise (三) async/await
访问被拒绝:“microsoft.web.ui.webcontrols”的解决办法
技术分析模式(七)发挥差距
共享内存+inotify机制实现多进程低延迟数据共享
怎么样避免线上内存泄漏
边缘盒子+时序数据库,美的数字化平台 iBUILDING 背后的技术选型
合工大苍穹战队视觉组培训Day9——相机标定