【Hadoop】运行MR任务,出现Container is running beyond physical memory limits错误
运行一次任务,运行了很长时间,出现了 ***Container is running beyond physical memory limits***的错误。
Container [pid=27842,containerID=container_XXXXX] is running beyond physical memory limits. Current usage: 8.3 GB of 8 GB physical memory used; 5.1 GB of 16.8 GB virtual memory used. Killing container.
这里只给比较重要的错误日志。很明显的提示内存溢出了。
这里注意这几个数字:8.3G,8G,5.1G,16.8G
分别代表着:
8.3G——>任务所占的物理内存 (内存条)
8G——>mapreduce.map.memory.mb 参数默认设置大小
5.1G——>任务占用的虚拟内存
16.8G——>mapreduce.map.memory.mb 乘以 yarn.nodemanager.vmem-pmem-ratio
yarn.nodemanager.vmem-pmem-ratio 是 虚拟内存和物理内存比例,在yarn-site.xml中设置,默认是2.1
注意:
物理内存:内存条
虚拟内存:利用磁盘空间虚拟划出的一块逻辑内存,用作虚拟内存的磁盘空间被称为交换空间(Swap Space)。(为了满足物理内存的不足而提出的策略)
linux会在物理内存不足时,使用交换分区的虚拟内存。内核会将暂时不用的内存块信息写到交换空间,这样以来,物理内存得到了释放,这块内存就可以用于其它目的,当需要用到原始的内容时,这些信息会被重新从交换空间读入物理内存。
这种错误在可能出现在物理内存也可能是因为虚拟内存不足造成的。
解决办法
- 如果集群数量多,增加map或者reduce的个数,均衡一下。
- 取消内存的检查(不建议)
在yarn-site.xml或者程序中中设置yarn.nodemanager.vmem-check-enabled为false
# 物理内存检查
<property><name>yarn.nodemanager.pmem-check-enabled </name><value>false</value><description>Whether physical memory limits will be enforced for containers.</description>
</property>
# 虚拟内存检查
<property><name>yarn.nodemanager.vmem-check-enabled</name><value>false</value><description>Whether virtual memory limits will be enforced for containers.</description>
</property>
- 增大mapreduce.map.memory.mb
- 适当增大 yarn.nodemanager.vmem-pmem-ratio的大小,为物理内存增大对应的虚拟内存, 但是这个参数也不能太离谱
除了这些之外,还需要检查一下自己的代码是否可以在优化一下,尽量少创建新对象。
参考文章:
原文链接:https://blog.csdn.net/abysscarry/article/details/80331311
【Hadoop】运行MR任务,出现Container is running beyond physical memory limits错误相关推荐
- Container is running beyond physical memory limits
1.Hive执行SQL语句,出现如下错误: Container is running beyond physical memory limits. Current usage: 4.3 GB of 4 ...
- 【Hive】报错Container is running beyond physical memory limits.4.0 GB of 4 GB physical memory used
最近碰到任务报错如下: Container [pid=105939,containerID=container_e03_1599034722009_11568264_01_000200] is run ...
- Flink:Container is running beyond virtual memory limits
1.美图 2.问题描述 以Yarn模式启动Flink时提示:The Flink Yarn cluster has failed. 详细错误信息为 Container [] is running bey ...
- is running beyond physical memory limits. Current usage: 1.0 GB of 1 GB physical memory used......
0.任务执行报错截图: 1.错误分析:显示物理内存和虚拟内存的占用情况 Container [pid=24845,containerID=container_1625047493764_0479_01 ...
- hive报错:running beyond physical memory limits. Current usage: 2.0 GB of 2 GB physica终极解决方式
1.案例描述: hive有个定时任务平时正常,没有啥问题,正常一般大概执行1个小时左右,但是今天突然报错了,报错代码::running beyond physical memory l ...
- is running beyond physical memory limits. Current usage: 2.0 GB of 2 GB physical memory used; 2.6 GB
背景 执行一个kylin任务 然后报错 TaskAttempt killed because it ran on unusable nodekylin1.dtwave.dev.local:8041 C ...
- spark实战问题(一):is running beyond physical memory limits. Current usage: xx GB of xx GB physical memory
一:背景 Spark 任务出现了container内存负载出现OOM 二:问题 Application application_xxx_xxxx failed 2 times due to AM Co ...
- HADOOP:Current usage: 399.9 MB of 1 GB physical memory used; 2.5 GB of 2.1 GB virtual memory used.
[已解决]Current usage: 399.9 MB of 1 GB physical memory used; 2.5 GB of 2.1 GB virtual memory used. Kil ...
- Hadoop 运行wordcount任务卡在job running的一种解决办法
Hadoop 运行wordcount任务卡在runnning job的一种解决办法 在使用Mac系统构建本地伪分布式hadoop系统,遇到如下问题 网上有较多的解决办法,但是均不能解决我的问题,后来经 ...
最新文章
- 用C语言解“龟兔赛跑”题
- Deep Neural Networks的Tricks
- f2812的c语言与标准c语言,关于F2812中用C语言来实现中断的说明
- HTML5_0 笔记
- 国内云存储产品应用简介
- Java内置数据类型
- 数通手稿留档——Multicast
- python 遍历矩阵_Python3算法之十:矩阵旋转
- c# 找出目录下的所有子目录_C#遍历文件夹,其实只需要一句话!
- AD中画PCB详细流程
- 清华大学迎来中国首个原创虚拟学生华智冰:智商、情商双高,颜值出众
- Linux常见Bug解决方案
- weblogic反序列化漏洞修复
- python基础 class6(基本统计值计算、文本词频统计)
- 文献检索(学术搜索)
- 网络安全入门基础须知
- 虚拟机Ubuntu18.04中文输入法设置(同时保留系统英文语言)
- linux监控ftp stp日志,一篇文章让你了解STP、SFTP、UTP、FTP、ASTP分别是什么网线?...
- MySQL环境变量的配置(三)(Windows 11)
- PTA7-2 建国的数学难题(C语言)(递归方法)
热门文章
- 无线网络中PPK-MIC和CKIP-CMIC的学习资料
- Python爬虫实战(六) 天猫(淘宝)评论爬取与分析实战
- 【LC周赛241】1865. 找出和为指定值的下标对
- 求小于或等于lim的所有素数,将其存放在aa数组中,并返回所求的素数个数
- android视频播放器报告,android视频播放器实训报告.doc
- 人类视觉的几种感知错觉现象
- html页面中漂浮物怎么实现,一种水面漂浮物清扫机及船载河道漂浮垃圾清扫设备的制作方法...
- New Era with AlphaGo
- Java实战:粒子群算法
- 蓝桥杯单片机比赛学习:8、PWM的基本原理之呼吸灯