I\'m looking over the documentation here: http://doc.akka.io/docs/akka/2.3.3/java/dispatchers.html
We\'re using Akka in such a way where we have two separate dispatchers
This configuration depends on your hardware of course.
Say you have 2 available processors on your machine, then you can configure the number of threads that a given dispatcher will have via the parallelism-factor.
current number of thread = available processor * parallelism-factor
Then you can fix boundaries to control the result of this multiplication and avoid extreme values.
parallelism-min < current number of thread < parallelism-max
Now if you want to pick the right parallelism-factor + boundaries, you have to ask yourself how many actors at a given time your dispatcher will be responsible for.
It seems logical to assume that more actors means more threads but I strongly encourage you to monitor your system to find the root cause of your performance issues and not just randomly tweaking the configuration.
As a side note you should check the "throughput" parameter of your dispatcher as it allows you to configure the fairness of the actor's thread allocation. This can really make a big difference in case of batching-like process.
# Throughput defines the maximum number of messages to be
# processed per actor before the thread jumps to the next actor.
# Set to 1 for as fair as possible.
throughput = 100