Spark2.x(五十六):Queue's AM resource limit exceeded.
背景:
按照业务需求将数据拆分为60份,启动60个application分别运行对每一份数据,application的提交脚本如下:
#/bin/sh
#LANG=zh_CN.utf8
#export LANG
export SPARK_KAFKA_VERSION=0.10
export LANG=zh_CN.UTF-
jarspath=''
for file in `ls /home/dx/pro2./app01/sparkjars/*.jar`
do
jarspath=${file},$jarspath
done
jarspath=${jarspath%?}
echo $jarspath ./bin/spark-submit.sh \
--jars $jarspath \
--properties-file ../conf/spark-properties.conf \
--verbose \
--master yarn \
--deploy-mode cluster \
--name Streaming-$2-$3-$4-$5-$1-Agg-Parser \
--driver-memory 9g \
--driver-cores 1 \
--num-executors 1 \
--executor-cores 12 \
--executor-memory 22g \
--driver-java-options "-XX:+TraceClassPaths" \
--class com.dx.app01.streaming.Main \
/home/dx/pro2.0/app01/lib/app01-streaming-driver.jar $1 $2 $3 $4 $5
运行集群包含的运行节点43个节点,每个节点配置信息如下:24VCores 64G
yarn配置情况:
yarn.scheduler.minimum-allocation-mb | 单个容器可申请的最小内存 1G |
yarn.scheduler.maximum-allocation-mb | 单个容器可申请的最大内存 51G |
yarn.nodemanager.resource.cpu-vcores | NodeManager总的可用虚拟CPU个数 21vcores |
yarn.nodemanager.resource.memory-mb | 每个节点可用的最大内存,RM中的两个值不应该超过此值 51G |
问题:
执行上边脚本启动了60个任务,但是经过测试发现最多只能提交24个任务,然后剩余还有一个部分任务都是处于 Accepted 状态,按照目前情况至少要执行43个任务。
通过yarn node -list命令查看当前节点上运行containers情况如下:
Node-Id | Node-State | Node-Http-Address | Number-of-Running-Containers |
node-53:45454 | RUNNING | node-53:8042 | 1 |
node-62:45454 | RUNNING | node-62:8042 | 4 |
node-44:45454 | RUNNING | node-44:8042 | 3 |
node-37:45454 | RUNNING | node-37:8042 | 0 |
node-35:45454 | RUNNING | node-35:8042 | 1 |
node-07:45454 | RUNNING | node-07:8042 | 0 |
node-30:45454 | RUNNING | node-30:8042 | 0 |
node-56:45454 | RUNNING | node-56:8042 | 2 |
node-47:45454 | RUNNING | node-47:8042 | 0 |
node-42:45454 | RUNNING | node-42:8042 | 2 |
node-03:45454 | RUNNING | node-03:8042 | 6 |
node-51:45454 | RUNNING | node-51:8042 | 2 |
node-33:45454 | RUNNING | node-33:8042 | 1 |
node-04:45454 | RUNNING | node-04:8042 | 1 |
node-48:45454 | RUNNING | node-48:8042 | 6 |
node-39:45454 | RUNNING | node-39:8042 | 0 |
node-60:45454 | RUNNING | node-60:8042 | 1 |
node-54:45454 | RUNNING | node-54:8042 | 0 |
node-45:45454 | RUNNING | node-45:8042 | 0 |
node-63:45454 | RUNNING | node-63:8042 | 1 |
node-09:45454 | RUNNING | node-09:8042 | 1 |
node-01:45454 | RUNNING | node-01:8042 | 1 |
node-36:45454 | RUNNING | node-36:8042 | 3 |
node-06:45454 | RUNNING | node-06:8042 | 0 |
node-61:45454 | RUNNING | node-61:8042 | 1 |
node-31:45454 | RUNNING | node-31:8042 | 0 |
node-40:45454 | RUNNING | node-40:8042 | 0 |
node-57:45454 | RUNNING | node-57:8042 | 1 |
node-59:45454 | RUNNING | node-59:8042 | 1 |
node-43:45454 | RUNNING | node-43:8042 | 1 |
node-52:45454 | RUNNING | node-52:8042 | 1 |
node-34:45454 | RUNNING | node-34:8042 | 1 |
node-38:45454 | RUNNING | node-38:8042 | 0 |
node-50:45454 | RUNNING | node-50:8042 | 4 |
node-46:45454 | RUNNING | node-46:8042 | 1 |
node-08:45454 | RUNNING | node-08:8042 | 1 |
node-55:45454 | RUNNING | node-55:8042 | 1 |
node-32:45454 | RUNNING | node-32:8042 | 0 |
node-41:45454 | RUNNING | node-41:8042 | 2 |
node-05:45454 | RUNNING | node-05:8042 | 1 |
node-02:45454 | RUNNING | node-02:8042 | 1 |
node-58:45454 | RUNNING | node-58:8042 | 0 |
node-49:45454 | RUNNING | node-49:8042 | 0 |
很明显,目前集群还有一部分节点未被使用,说明资源时充足的。
那么,至少应该能提交43个任务才对,但是目前只提交了24个任务,而且在Yarn上还提示错误信息:
[Tue Jul :: + ] Application is added to the scheduler and is not yet activated.
Queue's AM resource limit exceeded. Details : AM Partition = <DEFAULT_PARTITION>;
AM Resource Request = <memory:9216MB(9G), vCores:>;
Queue Resource Limit for AM = <memory:454656MB(444G), vCores:>;
User AM Resource Limit of the queue = <memory:229376MB(224G), vCores:>;
Queue AM Resource Usage = <memory:221184MB(216G), vCores:>;
解决方案:
其中错误日志:“Queue AM Resource Usage = <memory:221184MB(216G), vCores:24>;”中正是指目前已经运行了24个app(yarn-cluster模式下,每个app包含一个driver,driver也就是等同于AM):每个app的driver包含1个vcores,一共占用24vcores;每个app的driver内存为9G,9G*24=216G。
其中错误日志:“User AM Resource Limit of the queue = <memory:229376MB(224G), vCores:1>; ”中集群中用于运行应用程序ApplicationMaster的资源最大允许224G,这个值由参数”yarn.scheduler.capacity.maximum-am-resource-percent“决定。
yarn.scheduler.capacity.maximum-am-resource-percent / yarn.scheduler.capacity.<queue-path>.maximum-am-resource-percent |
集群中用于运行应用程序ApplicationMaster的资源比例上限,该参数通常用于限制处于活动状态的应用程序数目。该参数类型为浮点型,默认是0.1,表示10%。 所有队列的ApplicationMaster资源比例上限可通过参数yarn.scheduler.capacity. maximum-am-resource-percent设置(可看做默认值), 而单个队列可通过参数yarn.scheduler.capacity.<queue-path>.maximum-am-resource-percent设置适合自己的值。 |
1)yarn.scheduler.capacity.maximum-am-resource-percent(调大)
<property>
<!-- Maximum resources to allocate to application masters
If this is too high application masters can crowd out actual work -->
<name>yarn.scheduler.capacity.maximum-am-resource-percent</name>
<value>0.5</value>
</property>
2)降低 driver 内存。
关于Yarn Capacity更多,更官方问题请参考官网文档:《Hadoop: Capacity Scheduler》
Spark2.x(五十六):Queue's AM resource limit exceeded.的更多相关文章
- 【Visual C++】游戏开发五十六 浅墨DirectX教程二十三 打造游戏GUI界面(一)
本系列文章由zhmxy555(毛星云)编写,转载请注明出处. 文章链接:http://blog.csdn.net/poem_qianmo/article/details/16384009 作者:毛星云 ...
- 第三百五十六节,Python分布式爬虫打造搜索引擎Scrapy精讲—scrapy分布式爬虫要点
第三百五十六节,Python分布式爬虫打造搜索引擎Scrapy精讲—scrapy分布式爬虫要点 1.分布式爬虫原理 2.分布式爬虫优点 3.分布式爬虫需要解决的问题
- “全栈2019”Java第五十六章:多态与字段详解
难度 初级 学习时间 10分钟 适合人群 零基础 开发语言 Java 开发环境 JDK v11 IntelliJ IDEA v2018.3 文章原文链接 "全栈2019"Java第 ...
- 《手把手教你》系列技巧篇(五十六)-java+ selenium自动化测试-下载文件-上篇(详细教程)
1.简介 前边几篇文章讲解完如何上传文件,既然有上传,那么就可能会有下载文件.因此宏哥就接着讲解和分享一下:自动化测试下载文件.可能有的小伙伴或者童鞋们会觉得这不是很简单吗,还用你介绍和讲解啊,不说就 ...
- Abp(net core)+easyui+efcore实现仓储管理系统——出库管理之七(五十六)
abp(net core)+easyui+efcore实现仓储管理系统目录 abp(net core)+easyui+efcore实现仓储管理系统--ABP总体介绍(一) abp(net core)+ ...
- OpenCV开发笔记(五十六):红胖子8分钟带你深入了解多种图形拟合逼近轮廓(图文并茂+浅显易懂+程序源码)
若该文为原创文章,未经允许不得转载原博主博客地址:https://blog.csdn.net/qq21497936原博主博客导航:https://blog.csdn.net/qq21497936/ar ...
- FastAPI 学习之路(五十六)将token存放在redis
在之前的文章中,FastAPI 学习之路(二十九)使用(哈希)密码和 JWT Bearer 令牌的 OAuth2,FastAPI 学习之路(二十八)使用密码和 Bearer 的简单 OAuth2,Fa ...
- Linux性能优化实战学习笔记:第五十六讲
一.上节回顾 上一节,我带你一起梳理了,性能问题分析的一般步骤.先带你简单回顾一下. 我们可以从系统资源瓶颈和应用程序瓶颈,这两个角度来分析性能问题的根源. 从系统资源瓶颈的角度来说,USE 法是最为 ...
- 论文阅读笔记五十六:(ExtremeNet)Bottom-up Object Detection by Grouping Extreme and Center Points(CVPR2019)
论文原址:https://arxiv.org/abs/1901.08043 github: https://github.com/xingyizhou/ExtremeNet 摘要 本文利用一个关键点检 ...
随机推荐
- SpringBoot集成MyBatis的分页插件PageHelper--详细步骤
1.pom中添加依赖包 <!--pageHelper基本依赖 --> <dependency> <groupId>com.github.pagehelper< ...
- Linux命令——chgrp、chown、chmod
简介 这三个命令都用于更改文件permission(权限).即下图红框位置 除此之外还有个“连结”,那个指的是硬链接,不是软连接.FS使用inode区分不同文件,而目录树使用文件名区分不同文件,因此可 ...
- 【HCIA Gauss】学习汇总-数据库管理(事务 权限 审计 OBDC JDBC)-6
事务控制事务提交 commit事务回滚 rollback savepoint 用于事务设置保存点 ----> savepoint s1 / savepoint s2 rollback to sa ...
- Linux-负载均衡HAproxy
负载均衡之HAProxy 现在常用的三大开源软件负载均衡器分别是Nginx.LVS.HAProxy.三大软件特点如下: LVS负载均衡的特点: ()抗负载能力强,抗负载能力强.性能高.能达到F5硬件的 ...
- 数据库系统load飙高问题解决思路(转)
工作过程中有时候会接收到数据库服务器器load 飙高的报警,比如: load1 15.25 base: 8.52,collect time:2014-08-30 如何处理load 异常飙高的报警呢? ...
- node基础学习——http基础知识-01-客户单请求
<一> HTTP基础createServer()相关事件介绍 1. 创建HTTP服务器 server = http.createServer([requestListener]) // 下 ...
- 关闭firefox火狐浏览器下载完成时自动扫描(49.0.2以后版本)
本人自己找到的方法,亲测有效,如下:1.在火狐浏览器地址里输入about:config回车,可能会提示“这可能使质量保证失效”,点击[我了解此风险!]2.在搜索框里输入browser.safebrow ...
- C++——STL(算法)
以下对所有算法进行细致分类并标明功能:<一>查找算法(13个):判断容器中是否包含某个值adjacent_find: 在iterator对标识元素范围内,查找一对相邻重复元素,找到则返 ...
- 玩转Fiddler抓包工具
一.Fiddler简述 Fiddler是最强大最好用的Web调试工具之一, 它能记录所有客户端和服务器的http和https请求.允许你监视.设置断点.甚至修改输入输出数据.Fiddler包含了一个强 ...
- springboot无法识别配置文件级解决办法
eclipse中右键项目bulid path 之后找到 后点击完成后点击运用 修改完成