Print

Print


In case anyone's curious, here are the results of my quick test:

$ time java -jar HeatBugs.jar -for 10000 -repeat 12 -parallel 1 -quiet

real 0m12.452s
user 0m16.332s
sys 0m2.002s
$ time java -jar HeatBugs.jar -for 10000 -repeat 6 -parallel 2 -quiet

real 0m6.744s
user 0m17.053s
sys 0m2.008s
$ time java -jar HeatBugs.jar -for 10000 -repeat 4 -parallel 3 -quiet

real 0m6.198s
user 0m22.361s
sys 0m2.993s
$ time java -jar HeatBugs.jar -for 10000 -repeat 3 -parallel 4 -quiet

real 0m5.228s
user 0m25.628s
sys 0m3.064s
$ time java -jar HeatBugs.jar -for 10000 -repeat 2 -parallel 6 -quiet

real 0m4.618s
user 0m27.471s
sys 0m2.144s


To summarize:
Jobs, Threads, Time
12, 1, 12.452s
12, 2, 6.744s
12, 3, 6.198s
12, 4, 5.228s
12, 6, 4.618s
Inline image 1

Not too shabby. I was a bit surprised to see a continued speed-up with 6 threads since I only have 4 cores. Maybe it's a hyper-threading thing or something. 

Joey

On Wed, Oct 28, 2015 at 9:49 AM, Joey Harrison <[log in to unmask]> wrote:
Sean,

That certainly changes the situation. Amdahl, here I come!

Joey

On Wed, Oct 28, 2015 at 9:16 AM, <[log in to unmask]> wrote:
I'm pretty sure that's not it. I'm seeing the same thing when I run it on one of the cluster machines. 



On Oct 28, 2015, at 6:10 AM, Ernesto Carrella <[log in to unmask]> wrote:

Is your RAM being the bottleneck by any chance?

On Wed, Oct 28, 2015 at 5:16 AM Joey Harrison <[log in to unmask]> wrote:
I'm experimenting with the -parallel flag and finding that using 2 parallel threads is slower than a single thread, and using 3 is slower still. I have 4 cores on my machine, FYI.

$ time java -jar HeatBugs.jar -for 10000 -repeat 4 -parallel 1 -quiet

real 0m4.514s
user 0m6.098s
sys 0m0.749s

$ time java -jar HeatBugs.jar -for 10000 -repeat 4 -parallel 2 -quiet

real 0m4.799s
user 0m12.019s
sys 0m1.437s

$ time java -jar HeatBugs.jar -for 10000 -repeat 4 -parallel 3 -quiet

real 0m5.972s
user 0m21.190s
sys 0m2.933s

What's the deal here?

Joey