【发布时间】:2018-12-07 09:37:22
【问题描述】:
我在纱线客户端模式下使用 Zeppelin 0.7.3 和 Spark 2.3。 我的设置是:
火花:
spark.driver.memory 4096m
spark.driver.memoryOverhead 3072m
spark.executor.memory 4096m
spark.executor.memoryOverhead 3072m
spark.executor.cores 3
spark.executor.instances 3
纱线:
Minimum allocation: memory:1024, vCores:2
Maximum allocation: memory:9216, vCores:6
The application started by Zeppelin gets the following resources:
Running Containers 4
Allocated CPU VCores 4
Allocated Memory MB 22528
我不太了解 yarn 分配的内存量。鉴于设置, 我假设纱线会保留 (4096+3072)*4m = 28672m。然而,它看起来像 spark.executor.memoryOverhead 选项被忽略(我也试过 spark.yarn.executor.memoryOverhead 没有效果)。因此,最小的 384m 被分配为开销。作为最低分配 设置为 1024m,我们最终得到 (4096+3072)*1m + (4096+1024)*3m=22528m,其中第一项是 驱动程序和第二项总结了执行程序的内存。
为什么只分配了 4 个 CPU VCore,即使我要求更多并且最小分配是 设置为 2,我要求更多的核心?在查看 Application Master 时,我发现了以下 executor:
在这里,执行器确实每个有 3 个核心。我怎么知道哪个值是正确的或什么 我失踪了吗?
- 我尝试了一些设置,在 yarn-client 模式下我应该使用诸如 spark.yarn.am.memory 或 spark.yarn.am.cores。但是,似乎这些被纱线忽略了。 为什么会这样?此外,在 yarn-client 模式下,驱动程序应该在外部运行 纱线。为什么资源仍然在 yarn 内部分配?我的 Zeppelin 在同一台机器上运行 作为一名工人。
【问题讨论】:
标签: apache-spark hadoop-yarn apache-zeppelin