myDispatcher {
type = Dispatcher
executor = "thread-pool-executor"
thread-pool-executor {
core-pool-size-min = 16.0
core-pool-size-factor = 2.0
core-pool-size-max = 32
}
throughput = 60
}
My explanation for this phenomenon is that each CPU can only handle a certain amount of actors at one point of time (or a small range) and a certain number of actors do not need all the power of one core/thread. Could this be the explanation?
Best Regards
Flo
Also, the default akka-remoting utilizing Java serialization is dog slow. There are other threads that discuss swapping out the serializer with much faster ones. So if you're doing a lot of cluster sharding, your throughput may be bottlenecked on the remote inter-node IO.
A: look into actor pool/routers. This will give you more receive blocks to work with, increasing concurrency.
B: look into spending less time within your receive block, maybe by delegating the real work to a dispatched Future. If you go this route you'll have the ability to use a thread-pool-dispatcher for the longer/blocking work and your fork-join-dispatcher for your very fast receive executions.
I tend to end up with option B. With my Spray services, using the dispatch directive takes the real work out of http dispatching thread. With actors that are mostly IO, since Spray IO is async, you get essentially the same thing. So when I find I have dense cpu intensive code, I offload that work into another dispatcher and let the actor drive work into this ecexutor as quickly as it can.
At the very least, option B should help you drive up cpu utilization.
--
>>>>>>>>>> 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 a topic in the Google Groups "Akka User List" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/akka-user/EW_1nk0EiOY/unsubscribe.
To unsubscribe from this group and all its topics, 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.
For more options, visit https://groups.google.com/d/optout.
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.
But! It is important for me that the work of message 1 is done before message 2 is handled. And isn't one of the benefits for the actor model and akka itself, that I have the garantee to that message 1 is done before message 2?