Using spark-submit, what is the behavior of the --total-executor-cores option?

前端 未结 2 1889
孤城傲影
孤城傲影 2021-02-07 23:29

I am running a spark cluster over C++ code wrapped in python. I am currently testing different configurations of multi-threading options (at Python level or Spark level).

2条回答
  •  不思量自难忘°
    2021-02-07 23:37

    To make sure how many workers started on each slave, open web browser, type http://master-ip:8080, and see the workers section about how many workers has been started exactly, and also which worker on which slave. (I mention these above because I am not sure what do you mean by saying '4 slaves per node')

    By default, spark would start exact 1 worker on each slave unless you specify SPARK_WORKER_INSTANCES=n in conf/spark-env.sh, where n is the number of worker instance you would like to start on each slave.

    When you submit a spark job through spark-submit, spark would start an application driver and several executors for your job.

    • If not specified clearly, spark would start one executor for each worker, i.e. the total executor num equal to the total worker num, and all cores would be available to this job.
    • --total-executor-cores you specified would limit the total cores that is available to this application.

提交回复
热议问题