星火mesos集群模式比本地模式慢 [英] Spark mesos cluster mode is slower than local mode
问题描述
我提交相同的瓶子用本地模式和mesos集群模式下运行。并发现一些完全相同的阶段,本地模式只需要几毫秒才能完成但是集群模式将采取秒!
I submit the same jar to run by using both local mode and mesos cluster mode. And found for some exactly same stages, local mode only takes several milliseconds to finish however cluster mode will take seconds!
是一个例子:659期
本机模式:
659
从数据流作业[输出操作1,批量时间十七点45分50秒]
地图在KafkaHelper.scala:35 +细节
2016年3月22日17时46分31秒11毫秒
local mode: 659 Streaming job from [output operation 1, batch time 17:45:50] map at KafkaHelper.scala:35 +details 2016/03/22 17:46:31 11 ms
mesos群集模式:
659
从数据流作业[输出操作1,批量时间十八时01分20秒]
地图在KafkaHelper.scala:35 +细节
2016年3月22日18时09分33秒3秒
mesos cluster mode: 659 Streaming job from [output operation 1, batch time 18:01:20] map at KafkaHelper.scala:35 +details 2016/03/22 18:09:33 3 s
和我来自火星的用户界面,mesos集群模式将持续4秒钟完成foreachRDD工作中发现,这是为什么?任何提交的命令选项可以帮助呢?
And I found from spark UI that mesos cluster mode will consistently take 4 seconds to finish the foreachRDD jobs, why is that? Any submit commands options can help with this?
在此先感谢一束!
推荐答案
这行为取决于多种因素。你不指定在集群模式下运行什么样的工作,并与设置。如果星火上没有安装奴隶,你会看到一些负担,因为分配需要下载等。
That behavior depends on multiple factors. You don't specify what kind of job you run in which cluster mode, and with which settings. If Spark is not installed on the Slaves, you'll see an overhead because the distribution needs to be downloaded etc.
此外,你需要使用的罐子被分配到执行者,这可能需要一些时间启动为好。
Furthermore, the jars you're using need to be distributed to the executors, which can take some time for the startup as well.
至于说,这一切都取决于如何你Mesos运行的火花。
As said, this all depends on how you run Spark on Mesos.
请参阅
- http://spark.apache.org/docs/latest/running-on-mesos.html
这篇关于星火mesos集群模式比本地模式慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!