I'm using Spark in a YARN cluster (HDP 2.4) with the following settings:
When I run my spark application with the command spark-submit --num-executors 30 --executor-cores 3 --executor-memory 7g --driver-cores 1 --driver-memory 1800m ...
YARN creates 31 containers (one for each executor process + one driver process) with the following settings:
My question here: Why does the spark-submit
parameter --executor-cores 3
have no effect?
There are two deploy modes that can be used to launch Spark applications on YARN. In cluster mode, the Spark driver runs inside an application master process which is managed by YARN on the cluster, and the client can go away after initiating the application.
Spark supports two modes for running on YARN, “yarn-cluster” mode and “yarn-client” mode.
A vcore is a share of host CPU that the YARN Node Manager allocates to available resources. yarn. scheduler. maximum-allocation-vcores is the maximum allocation for each container request at the Resource Manager, in terms of virtual CPU cores.
Ok, seems to be the same issue as discussed here: yarn is not honouring yarn.nodemanager.resource.cpu-vcores The solution also worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With