我试图了解我的spark-submit和spark shell工作之间的速度差异 . 我启动shell或使用相同的资源分配提交,但我似乎得到了非常不同的性能 . 当我在shell中运行它需要~10分钟与小时火花提交 . 那么我的问题是,REPL进度条中显示的任务数量与spark提交中运行的执行程序数量相同吗?我看到每个人都有不同的数字,我很想知道我做错了什么 .

在shell中我开始使用它

--executor-cores 5 \
    --executor-memory 16g \
    --driver-memory 230g \
    --conf "spark.driver.maxResultSize=100g" \
    --conf "spark.network.timeout=360s

我看到950个并发任务

... pandas_df = intent_dict_rdd.map(lambda x: Row(**x)).toDF().toPandas()
[Stage 1:==============================>                  (19503 + 950) / 31641]

我用相同的资源分配激发提交我只看到189个执行者

18/07/19 23:44:25 INFO StandaloneAppClient$ClientEndpoint: Executor added: app-20180719234425-0001/189 on worker-20180719233757-10.0.108.198-33953 (10.0.108.198:33953) with 5 cores
18/07/19 23:44:25 INFO StandaloneSchedulerBackend: Granted executor ID app-20180719234425-0001/189 on hostPort 10.0.108.198:33953 with 5 cores, 16.0 GB RAM

我使用10x m5.24xlarge机器,因此每个机器有96个内核和384GB内存 . 这是总共960个核心,看起来更像我看到的任务数量 . 执行者的数量看起来更像每个960/5核心 . 我专注于错误的事情吗?火花提交与火花壳的性能是否有任何其他解释?