簡體   English   中英

spark如何管理物理memory、虛擬memory和執行器memory?

[英]How spark manages physical memory, virtual memory and executor memory?

由於我在 Spark 上工作了幾天,我對 spark memory 管理感到困惑。 I see terms like physical memory, virtual memory, executor memory, memory overhead and these values don't add up properly as per my current understanding. 有人可以用簡單的方式用火花來解釋這些事情嗎?

例如,我在集群模式下運行具有以下配置的 spark 作業:


spark_conf = SparkConf() \
  .set("spark.executor.memory", "10g") \
  .set("spark.executor.cores", 4) \
  .set("spark.executor.instances", 30) \
  .set("spark.dynamicAllocation.enabled", False) 

但我收到這樣的錯誤:

Failing this attempt.Diagnostics: [2020-08-18 11:57:54.479]
Container [pid=96571,containerID=container_1588672785288_540114_02_000001] 
is running 62357504B beyond the 'PHYSICAL' memory limit. 
Current usage: 1.6 GB of 1.5 GB physical memory used; 
3.7 GB of 3.1 GB virtual memory used. Killing container.

如何通過 r.t 完成物理 memory 和虛擬 memory 分配。 執行器 memory 和 memory 開銷?

此外,當我在客戶端模式下以相同的配置運行相同的作業時,它運行成功。 為什么會這樣? 在客戶端模式下唯一改變的是驅動程序,我沒有任何將數據聚合到驅動程序的代碼。

當您看到期權價值時,

yarn.nodemanager.vmem-pmem-ratio    2.1

物理和虛擬 memory 之間的默認比率是2.1 您可以從紗線資源管理器的總 memory 除以容器數量(即沒有驅動程序的執行程序)計算物理 memory。

這是一篇文章,但會有更多好文章如何紗線分配物理memory。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM