dat*_*ict 11 executor hadoop-yarn apache-spark pyspark memory-overhead
Spark内存开销相关问题在SO中多次被问到,我经历了其中的大部分。然而,在浏览了多个博客后,我感到困惑。
以下是我的疑问
https://docs.qubole.com/en/latest/user-guide/engines/spark/defaults-executors.html https://spoddutur.github.io/spark-notes/distribution_of_executors_cores_and_memory_for_spark_application.html
下面是我想了解的案例。我有5个节点,每个节点16个vcore和128GB内存(其中120个可用),现在我想提交spark应用程序,下面是conf,我在想
Total Cores 16 * 5 = 80
Total Memory 120 * 5 = 600GB
Run Code Online (Sandbox Code Playgroud)
情况1:执行器内存的内存开销部分
spark.executor.memory=32G
spark.executor.cores=5
spark.executor.instances=14 (1 for AM)
spark.executor.memoryOverhead=8G ( giving more than 18.75% which is default)
spark.driver.memoryOverhead=8G
spark.driver.cores=5
Run Code Online (Sandbox Code Playgroud)
情况 2:内存开销不是执行程序内存的一部分
spark.executor.memory=28G
spark.executor.cores=5
spark.executor.instances=14 (1 for AM)
spark.executor.memoryOverhead=6G ( giving more than 18.75% which is default)
spark.driver.memoryOverhead=6G
spark.driver.cores=5
Run Code Online (Sandbox Code Playgroud)
根据下面的视频,我尝试使用 85% 的节点,即 120GB 中的 100GB 左右,不确定我们是否可以使用更多。
https://www.youtube.com/watch?v=ph_2xwVjCGs&list=PLdqfPU6gm4b9bJEb7crUwdkpprPLseCOB&index=8&t=1281s (4:12)
kav*_*eja 12
要回答您的问题,内存开销是执行程序内存的一部分还是单独的? 内存开销不是执行器内存的一部分。
资源管理器启动容器以执行其中的执行程序。所以基本上执行程序内存+内存开销=容器内存..... Spark已将执行程序内存分解为应用程序内存和缓存内存。
执行器内存开销主要包括堆外内存和nio缓冲区以及用于运行容器特定线程(线程堆栈)的内存。当您不指定内存开销时,资源管理器将使用默认值计算内存开销值并相应地启动容器。
始终建议为操作系统保留核心和内存(1 个核心用于 Nodemanager,1 个核心用于其他守护进程,2 个核心用于操作系统最佳工作)
您可以像下面提到的那样更改您的计算 12 * 5 = 60 个核心,总内存 116 * 5 = 580GB 是可用的总资源..然后您相应地调整其他参数。
| 归档时间: |
|
| 查看次数: |
26467 次 |
| 最近记录: |