当前位置:网站首页>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 活性染料丨氨基染料:花青5胺

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

Lumiprobe reactive dye carboxylic acid: sulfo cyanine7.5 carboxylic acid

Lumiprobe deoxyribonucleic acid phosphate CpG 1000 solid carrier

Construction and application of medical field Atlas of dingxiangyuan

What is the relationship between synchronized and multithreading

微信公众号—菜单

Huali biology rushes to the scientific innovation board: the annual revenue is RMB 226million and it is planned to raise RMB 800million

Basic use of text preprocessing library Spacy (quick start)

MCS: multivariate random variable - discrete random variable
随机推荐
深度学习网络的训练方式
I am 35 years old. Can I change my career to be a programmer?
文本预处理库spaCy的基本使用(快速入门)
LeetCode笔记:Weekly Contest 299
.NET程序配置文件操作(ini,cfg,config)
广州期货正规吗?如果有人喊你用自己的手机登,帮忙开户,安全吗?
Lumiprobe deoxyribonucleic acid phosphate CpG 1000 solid carrier
Lumiprobe click chemistry - non fluorescent alkyne: hexanoic acid STP ester
Yi Ming ang Ke rushed to Hong Kong shares: loss of 730million in the year Lilly and sunshine life insurance were shareholders
Hi,你有一份Code Review攻略待查收
Secondary pointer
konva系列教程4:图形属性
西北工业大学遭境外电邮攻击
PostgreSQL learning (based on rookie course)
Ink drop typesetting
Huali biology rushes to the scientific innovation board: the annual revenue is RMB 226million and it is planned to raise RMB 800million
Unity C# 基础复习26——初识委托(P447)
打造一个 API 快速开发平台,牛逼!
Lumiprobe deoxyribonucleic acid alkyne DT phosphimide
获取Text组件内容的宽度