How long did they run for? The JVM takes a few seconds to start up and compile code, not to mention that Spark takes some time to initialize too, so you won’t see a major difference unless the application is taking longer. One other problem in this job is that it might use Math.random(), which is actually synchronized and doesn’t scale well to multiple threads.
Matei On Dec 12, 2013, at 1:59 AM, Jaonary Rabarisoa <[email protected]> wrote: > Hi all, > > I'm new to spark and I'm trying to play with it in order to understand how it > works. > So I began with running the LocalPi and SparkPi examples on my laptop in > local mode. > I notice that LocalPi is 3 times faster than SparkPi which is supposed to be > multi threaded. > Furthermore I have the following warning when running SparkPi example : > > SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". > SLF4J: Defaulting to no-operation (NOP) logger implementation > SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further > details. > > > Any suggestion ? > > > Best regards, > > > Jaonary
