Spark.yarn.executor.memoryOverhead設置不生效如何處理?
更新時間 2023-12-05 17:43:26
最近更新時間: 2023-12-05 17:43:26
分享文章
本章節主要介紹翼MapReduce組件Spark的設置問題。
參數作用
Spark是運行在executor container進程的 JVM上的,spark.yarn.executor.memoryOverHead 指的是executor jvm的堆外內存。

Executor container 消耗的總內存 = spark.yarn.executor.memoryOverhead + spark.executor.memory + spark.memory.offHeap.size+spark.executor.pyspark.memory
其中spark.executor.memory ,spark.memory.offHeap.size 是spark運行時消耗的對象的存儲內存。
spark.executor.pyspark.memory 是pyspark運行時,在spark.executor.memory + spark.memory.offHeap.size之外的開銷。
spark.yarn.executor.memoryOverhead 指的是executor container進程,運行時數據區非堆部分的開銷,即執行開銷。
它包括JVM執行時自身所需要的內容,包括線程堆棧、IO、編譯緩存等所使用的內存。
失效原因
在spark源碼中,該參數出現在如下位置:


AlternateConfig的key會被desprecated。

所以,自spark 2.3之后,將使用spark.executor.memoryOverhead,廢棄spark.yarn.executor.memoryOverhead。
