【问题标题】:Spark streaming on yarn - Container running beyond physical memory limits纱线上的火花流 - 容器运行超出物理内存限制
【发布时间】:2016-03-19 11:18:58
【问题描述】:

我在 Yarn 上运行了一个 spark 流应用程序,它运行了好几天,之后我遇到了一个问题,来自下面的 yarn 列表的错误消息:

Application application_1449727361299_0049 failed 2 times due to AM Container for appattempt_1449727361299_0049_000002 exited with exitCode: -104
For more detailed output, check application tracking page:https://sccsparkdev03:26001/cluster/app/application_1449727361299_0049Then, click on links to logs of each attempt.
Diagnostics: Container [pid=25317,containerID=container_1449727361299_0049_02_000001] is running beyond physical memory limits. Current usage: 3.5 GB of 3.5 GB physical memory used; 5.3 GB of 8.8 GB virtual memory used. Killing container.

这是我的内存配置:

spark.driver.memory = 3g
spark.executor.memory = 3g
mapred.child.java.opts  -Xms1024M -Xmx3584M
mapreduce.map.java.opts -Xmx2048M
mapreduce.map.memory.mb  4096
mapreduce.reduce.java.opts  -Xmx3276M
mapreduce.reduce.memory.mb  4096

这个OOM错误很奇怪,因为我没有在内存中维护任何数据,因为它是一个流媒体程序,有人遇到过类似的问题吗?或者谁知道是什么原因造成的?

【问题讨论】:

  • 您对此有什么解决办法吗?

标签: apache-spark hadoop-yarn spark-streaming


【解决方案1】:

检查您正在运行它的 box/vm 实例上的内存。我的猜测是主机是红色的。

...由于过度分配内存。

您认为流式传输在哪里执行?不管你是否在那里存储任何东西?对。记忆。不是猫,也不是跳舞的维京人(加“e”)。

你猜怎么着?您正在分配 7 GB 的内存,该内存主要用于物理内存而不是虚拟内存。

  1. 检查您的日志记录,因为这将有类似的建立时间。

  2. 什么是 spark.yarn.am.memory 值?

  3. 平衡分配 VM 和容器内存 :)

另一个想法是调整 memoryOverhead 以便物理和虚拟可以更成比例

【讨论】:

    猜你喜欢
    • 2018-11-01
    • 2018-03-30
    • 1970-01-01
    • 1970-01-01
    • 2022-12-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-12-06
    相关资源
    最近更新 更多