I've written an akka application where I instantiate 15,000+ actors and have them do some processing and then send messages to each other. Everything runs fine on my laptop and takes 120 seconds to complete and by checking "top" I can see that it's maxing out all cores on my machine. Awesome. Now, I also have access to a 64 core BSD box. When I take the same code and run it on that box, it runs faster (about 44 seconds average) but then when I check "top" during running, CPU usage is only up at 1800% instead of the theoretical 6400%.I'm pretty sure that the application has enough work to do to saturate the CPU so I don't understand why it isn't. I've tried forcing all of my values for threads in the default dispatcher to 64 but this has changed absolutely nothing.my application.conf:akka {//log-config-on-start = onactor {default-dispatcher {mailbox-type = "akka.dispatch.UnboundedDequeBasedMailbox"executor = "thread-pool-executor"fork-join-executor{parallelism-factor = 1.0parallelism-min = 64parallelism-max = 64}thread-pool-executor {core-pool-size-min = 64core-pool-size-max = 64max-pool-size-min = 64max-pool-size-max = 64task-queue-size = -1core-pool-size-factor = 1.0max-pool-size-factor = 1.0}throughput=100}}}The reason both executors are in this application.conf is because I have tried using both to see if that makes any difference, it didn't.Any ideas? Is my mental model of how akka deals with threads wrong or do I have a different problem?--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://akka.io/faq/
>>>>>>>>>> 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+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
I used the fork-join-executor originally and then moved to thread-pool for a "just in case" scenario. I have the same issue with both executors.
I have added the concurrent mailbox and have seen some improvement where the system sits stable at around 2400% total cpu usage. I don't have any locks in my code and I did need the dequeue for the stash. I was looking at using the typesafe console earlier for profiling the system but please correct me if I'm wrong, but is it not a commercial product? I don't currently have a research budget for such things.
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://akka.io/faq/
>>>>>>>>>> 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+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
I only have one actor that uses the stash and even then it only stashes and unstashes during initialisation and then it never stashes again.
Could my problem be that I only have one actor using stash yet I'm forcing everything to use this dequeue based mailbox?
As for the Hierarchy, I have a simple MVC where view is a single actor, controller is a single actor and model is a single actor that spawns hundreds of thousands to several million worker actors. To ease the bottleneck of all the worker actors talking to a single model actor, the model actor also spawns some actors which aggregate messages from a specific group of workers and then pass the aggregation to the model actor. I can attempt a crude MsPaint diagram if you wish.
The "model" actor really doesnt do anything "meaningful". It receives a "Tick" command from the controller to indicate it's time to do work, and then multiplexes it to all the workers via the intermediate nodes I mentioned to reduce the bottleneck. Once all workers have returned a "tock" message indicating completion, the aggregated tock messages are passed back up to that single model actor and it forwards the completion message back to the controller.
I'll put together a pinned dispatcher for each of my major components, change default dispatcher to something more "worker-friendly" and get back to you.
The "model" actor really doesnt do anything "meaningful". It receives a "Tick" command from the controller to indicate it's time to do work, and then multiplexes it to all the workers via the intermediate nodes I mentioned to reduce the bottleneck. Once all workers have returned a "tock" message indicating completion, the aggregated tock messages are passed back up to that single model actor and it forwards the completion message back to the controller.
I'll put together a pinned dispatcher for each of my major components, change default dispatcher to something more "worker-friendly" and get back to you.
On Wednesday, 27 March 2013 18:02:23 UTC, √ wrote: