当前位置:网站首页>Flink SQL任务TaskManager内存设置
Flink SQL任务TaskManager内存设置
2022-06-29 15:02:00 【游戏编程】
在提交flink任务时,通过 taskmanager.memory.process.size 配置 taskmanager的总运行内存,其内的细节内存根据默认比例划分有时候也会存在不合理。如下所示:

配置了10G的taskmanager运行总内存,默认给Managed Memory分配了3.5G的内存,实际任务运行这部分根本不需要这么多内存。如何对内存进行最大化管理和配置就十分重要了。
本文主要介绍FlinkSQL的任务 TaskManager内存调优,其他flink任务也可以作为参考。
1、启动flink sql客户端
sql-client.sh embedded shell
可以先在flink客户端执行以下命令进行flinksql任务配置。
#设置flink任务本身任务名SET pipeline.name = 'flink-sql-test';#设置flink on yarn的任务名SET yarn.application.name= 'flink-sql-test';#设置flink checkpoint的文件保存地址SET state.checkpoints.dir = 'hdfs:///flink/checkpoints/flink-sql-test';#设置taskmanager的运行总内存为5GSET taskmanager.memory.process.size = '5120m';#设置flink框架内存SET taskmanager.memory.framework.heap.size = '128m';#设置用户代码运行内存SET taskmanager.memory.task.heap.size = '4096m';#设置managed memory内存SET taskmanager.memory.managed.size = '128m';#设置堆外内存SET taskmanager.memory.framework.off-heap.size = '128m';#设置网络缓存SET taskmanager.memory.network.max = '128m';#设置JVM内存SET taskmanager.memory.jvm-metaspace.size = '256m';SET taskmanager.memory.jvm-overhead.max = '256m';#设置jobmanager总内存SET jobmanager.memory.process.size= '1024m';#设置flink on yarn的yarn队列SET yarn.application.queue= 'other';经过调试后提交的flink taskmanager运行时内存如下:

可以看到原来配置的10G taskmanager内存,现在只需要5G就能跑起来了,内存优化了一半,有效的利用了集群的资源。
有关flink的内存调优配置,需要的同学也可以参考这篇文章进行更加细节的内存配置flink任务内存调优,TaskManager、JobManager内存配置_大数据摸鱼的博客-CSDN博客
作者:大数据摸鱼
游戏编程,一个游戏开发收藏夹~
如果图片长时间未显示,请使用Chrome内核浏览器。
边栏推荐
- Lumiprobe click chemistry - non fluorescent azide: azide-peg3-oh
- ModStartBlog 现代化个人博客系统 v5.2.0 主题开发增强,新增联系方式
- 华为软件测试笔试真题之变态逻辑推理题【二】华为爆火面试题
- Differential equations of satellite motion
- 微信公众号—菜单
- What should phpcms do when it sends an upgrade request to the official website when it opens the background home page?
- 极化SAR几种成像模式
- Northwestern Polytechnic University attacked by overseas e-mail
- Lumiprobe 脱氧核糖核酸丨炔烃dT亚磷酰胺
- 信息学奥赛一本通1194:移动路线
猜你喜欢

Const usage

微信公众号—菜单

在shop工程中,实现一个菜单(增删改查)

使用自定义注解实现Redis分布式锁

curl: (56) Recv failure: Connection reset by peer

Uncover the practice of Baidu intelligent test in the field of automatic test execution

ROS notes (10) - Launch file startup

Review of digital image processing

PostgreSQL learning (based on rookie course)

Yi Ming ang Ke rushed to Hong Kong shares: loss of 730million in the year Lilly and sunshine life insurance were shareholders
随机推荐
Unity C basic review 28 - delegation with return (p449)
PostgreSQL learning (based on rookie course)
复数卷积神经网络:CV-CNN
Is Guangzhou futures regular? If someone asks you to log in with your own mobile phone and help open an account, is it safe?
目前股票开户安全吗?可以直接网上开户吗
墨滴排版
kubernetes Unable to connect to the server: x509: certificate has expired or is not yet valid
Informatics Olympiad all in one 1000: introductory test questions
Intelligent diagnosis of Alzheimer's disease
MCS: discrete random variable Poisson distribution
const用法精讲
Bash summary online log
Lumiprobe deoxyribonucleic acid alkyne DT phosphimide
MySQL的json 数组操作 json_array_append、json_array_insert
信息学奥赛一本通1001:Hello,World!
BioVendor遊離輕鏈(κ和λ)Elisa 試劑盒的化學性質
Take another picture of cloud redis' improvement path
You need to know about project procurement management
message from server: “Host ‘xxxxxx‘ is blocked because of many connection errors; unblock with ‘m
ROS 笔记(10)— launch 文件启动