Hi everyone!
I working on some scala computing some game theory problem using Akka.
Basically I've got three types involved :
1. ComputingActor - does the job, running 1 actor for 1 experiment
2. ResultsActor - collects results from computing actors and sends to 
JobScheduler when job's done
3. JobScheduler - not actor type - it takes all results from ResultsActor 
using '?' tell and Await.result()

In ComputingActor I've got  some for loop which runs 50 times, core 
computations are done there.

for(i <- 1 to basicParams.getNoOfSeas) {                  
          strgEval.evaluate //my computation
....

I've done some performance tests and turns out that one thread program is 
faster ~13% (40k ms to 46k ms)
What I've noticed is that when I increase number of experiments (means more 
actors running) time spent in this for loop is longer.
So I commented out my computation in for loop and set loop like this one to 
check if my computation code is responsible for that.

//        for(j <- 0 to 10000000) {
//          var z = j*2
//        }

It does nothing, just keep busy CPU, but tendency is same.
I don't  have a good idea what might be the problem, bad design?Is it 
something that I missed?
I've checked execution with profiler, it seams threads're working good(no 
bloking).
Is fork-join-dispatcher working like that?
I mean, it seams that work is scheduled from other ComputingActor instances 
on different threads.
First actor ends computations in 38k ms and others soon after him, but in 
single threaded version it takes only 8000k ms using my computation code.
In that case multithreaded program doesn't give any additional performance 
value. :/

Will appreciate any hints.

PS. I also cheked it on coomon java thread version of program. If  I spawn 
more threads I've got longer in that loop.

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to