当前位置:网站首页>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.
边栏推荐
猜你喜欢
八大排序之堆排序
一天学会从抓包到接口测试,通过智慧物业项目深度解析
protobuf根据有关联的.proto文件进行编译
typescript60-泛型工具类型(readonly)
更改小程序原生radio的颜色及大小
数据库多表关联插入数据
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
FPGA parsing B code----serial 4
MySQL: basic part
FPGA解析B码----连载4
随机推荐
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
腾讯实习总结
Shiny04---Application of DT and progress bar in shiny
AI + video technology helps to ensure campus security, how to build a campus intelligent security platform?
武田公司2022财年第一季度业绩强劲;正稳步实现全年的管理层指引目标
MySQL表操作练习
MySQL:order by排序查询,group by分组查询
Put Cloudflare on the website (take Tencent Cloud as an example)
RNote108---显示R程序的运行进度
GAN生成动漫头像Pytorch
Flink学习10:使用idea编写WordCount,并打包运行
FPGA parsing B code----serial 4
(4) Rotating object detection data roLabelImg to DOTA format
女生做软件测试会不会成为一个趋势?
DNSlog外带数据注入
浮点数基础知识
binary search tree problem
MySQL:JDBC编程
一天学会从抓包到接口测试,通过智慧物业项目深度解析
typescript64-映射类型