I am learning Apache Spark recently. I installed Hadoop and Apache Spark via brew on my Hackintosh (El Capitan) with a i7-4790S CPU and 16GB RAM. I ran the SparkPi example as following:
/usr/local/Cellar/apache-spark/1.6.1/bin/run-example SparkPi 1000
and it took 43 second to finish.
16/06/27 00:54:05 INFO DAGScheduler: Job 0 finished: reduce at SparkPi.scala:36, took 43.165503 s
I have another PC running Ubuntu 16.04 with a i3-4170T CPU and 16GB RAM. I setup a Docker container to run Hadoop and Spark (same version as those on OS X). Interestingly, it took only 18 seconds to finish the same request.
16/06/28 16:22:49 INFO scheduler.DAGScheduler: Job 0 finished: reduce at SparkPi.scala:36, took 18.264482 s
How come Spark on OS X with a faster CPU run much slower than Spark on Ubuntu?