![](/img/trans.png)
[英]what is best way to calculate --executor-memory --num-executors --executor-cores in spark
[英]Spark UI Executors tab incorrect memory for --executor-memory
我在 YARN 客戶端模式下使用 spark 1.6。 以下是 spark-submit 參數
spark-submit --master yarn --deploy-mode client --driver-memory 4G --executor-memory=6G --num-executors=5 --executor-cores=4
如您所見,我的驅動程序 memory 在 spark-submit 命令中是 4G,我的執行程序 memory 是 6G,但是當我查看 spark UI 中的執行程序選項卡時,它顯示如下。 我想知道為什么會這樣。 但在環境選項卡中顯示正確。 為什么存儲 memory 是 3.1 GB 而不是 6G。 實際上,由於執行程序內存開銷,我希望執行程序 memory 超過 6G
您正在查看的是存儲 memory。 Spark 將拆分分配給內存開銷、存儲和執行的執行器 memory。
memoryOverhead 的計算類似於 max(384, .07 * spark.executor.memory)
其余部分分為存儲(用於緩存/持久化)、執行和用戶 memory。 The default spark.memory.fraction is 0.6 (reserves 60% of memory assigned for storage and execution also known as spark memory; the rest is allocated to user memory)
MemoryOverhead: max(384, .07 * spark.executor.memory)
Spark Memory: (spark.executor.memory - memoryOverhead) * 0.6
User Memory: (spark.executor.memory - memoryOverhead) * 0.4
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.