Spark驱动程序内存和应用程序主内存 [英] Spark Driver memory and Application Master memory
问题描述
我是否正确理解了客户端模式的文档?
Am I understanding the documentation for client mode correctly?
- 客户端模式与驱动程序在应用程序主服务器中运行的群集模式相对吗?
- 在客户端模式下,驱动程序和应用程序主控是独立的进程,因此
spark.driver.memory
+spark.yarn.am.memory
必须小于计算机的内存? - 在客户端模式下,驱动程序内存是否不包括在应用程序主内存设置中?
- client mode is opposed to cluster mode where the driver runs within the application master?
- In client mode the driver and application master are separate processes and therefore
spark.driver.memory
+spark.yarn.am.memory
must be less than the machine's memory? - In client mode is the driver memory is not included in the application master memory setting?
推荐答案
客户端模式与驱动程序在应用程序主服务器中运行的群集模式相反?
是,当Spark应用程序通过
Yes, When Spark application deployed over YARN in
- 客户端模式,驱动程序将在提交申请的计算机中运行,并且该计算机必须在网络中可用,直到应用程序完成.
- 集群模式,驱动程序将在应用程序主节点(每个spark应用程序一个)上运行,并且提交应用程序的计算机提交后无需进入网络
- Client mode, driver will be running in the machine where application got submitted and the machine has to be available in the network till the application completes.
- Cluster mode, driver will be running in application master(one per spark application) node and machine submitting the application need not to be in network after submission
如果Spark应用程序在其自身的资源管理器(独立)上以集群模式提交,则驱动程序进程将在工作节点之一中.
If Spark application is submitted with cluster mode on its own resource manager(standalone) then the driver process will be in one of the worker nodes.
图像和内容参考
在客户端模式下,驱动程序和应用程序主程序是独立的进程,因此
spark.driver.memory
+spark.yarn.am.memory
必须小于机器的内存?
In client mode the driver and application master are separate processes and therefore
spark.driver.memory
+spark.yarn.am.memory
must be less than the machine's memory?
否,在客户端模式中,驱动程序和AM是单独的进程,并且存在于不同的计算机中,因此内存不需要合并,但是 spark.yarn.am.memory
+ 一些开销
应该小于YARN容器内存( yarn.nodemanager.resource.memory-mb
).如果超过该值,YARN的资源管理器将杀死该容器.
No, In client mode, driver and AM are separate processes and exists in different machines, so memory need not to be combined but spark.yarn.am.memory
+ some overhead
should be less then YARN container memory(yarn.nodemanager.resource.memory-mb
). If it exceeds YARN's Resource Manager will kill the container.
在客户端模式下,驱动程序内存是否不包括在应用程序主内存设置中?
此处 spark.driver.memory
必须小于将要启动spark应用程序的计算机中的可用内存.
Here spark.driver.memory
must be less then the available memory in the machine from where the spark application is going to launch.
但是,在群集模式下,请使用
spark.driver.memory
而不是spark.yarn.am.memory
.
But, In cluster mode use
spark.driver.memory
instead ofspark.yarn.am.memory
.
spark.yarn.am.memory
:512m(默认值)在客户端模式下用于YARN Application Master的内存量,与JVM内存的格式相同字符串(例如
512m,2g
).在群集模式下,使用spark.driver.memory
反而.使用小写的后缀,例如k,m,g,t
和p
,用于kibi-,mebi-,gibi-,tebi-和pebibytes.
spark.yarn.am.memory
: 512m (default)Amount of memory to use for the YARN Application Master in client mode, in the same format as JVM memory strings (e.g.
512m, 2g
). In cluster mode, usespark.driver.memory
instead. Use lower-case suffixes, e.g.k, m, g, t
, andp
, for kibi-, mebi-, gibi-, tebi-, and pebibytes, respectively.
在此处查看更多有关这些属性的信息
这篇关于Spark驱动程序内存和应用程序主内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!