What config affects the number of threads for an ActorSystem?

113 views
Skip to first unread message

Steve Rehrauer

unread,
Apr 17, 2016, 9:29:49 AM4/17/16
to Akka User List
I have an application that doesn't specify a custom dispatcher.

We see the number of threads maxing out at 50, and would like to increase it.

This doesn't seem to line up with any of the default config I see in Akka?  I see

     akka.actor.default-dispatcher.fork-join-executor.parallelism-max = 64

and I've tried raising this particular config, but still don't see more than 50 active threads.

How can I affect this?

Johan Andrén

unread,
Apr 18, 2016, 12:08:59 PM4/18/16
to Akka User List
Hi Steve,

Did you have a look at the docs about dispatcher configuration?

--
Johan Andrén
Akka Team, Lightbend Inc.

Steve Rehrauer

unread,
Apr 19, 2016, 10:16:05 AM4/19/16
to akka...@googlegroups.com
Thanks, Johan.

I did see that page, but if I understand the dispatcher config, the actor name you can define can't be a pattern?  We define many actors without simple names like "myActor".  In order to define a dispatcher for these actors, I presume I'd need to make a code change to use that dispatcher when the actors are created?

Long term, that's what I'll want to do.  Short term, I was hoping to find a pure config way to fix this.  Would be happy to override the default dispatcher's config, if that were possible, for a short-term fix.

--
>>>>>>>>>> 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/m1USxQbXIiM/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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Johan Andrén

unread,
Apr 19, 2016, 10:26:25 AM4/19/16
to Akka User List
It was more this specific section of the docs I was hoping you'd notice:

  1. # Configuration for the fork join pool
  2. fork-join-executor {
  3. # Min number of threads to cap factor-based parallelism number to
  4. parallelism-min = 2
  5. # Parallelism (threads) ... ceil(available processors * factor)
  6. parallelism-factor = 2.0
  7. # Max number of threads to cap factor-based parallelism number to
  8. parallelism-max = 10
  9. }


Note how the parallelism-max is a cap, the actual number is calculated by multiplying the number of cores with the parallelism-factor and then capping it with the min and max to arrive at the actual number on a given computer.

The specific number of 50 is hard to say anything concrete about without more info, but note that you will have a number of threads in the JVM not being dispatcher threads and even some unrelated to Akka. The dispatcher threads are easy to recognize as they are named "[systemname]-actor.default-dispatcher-[n]".

--
Johan Andrén
Akka Team, Lightbend Inc.


Steve Rehrauer

unread,
Apr 19, 2016, 11:51:05 AM4/19/16
to akka...@googlegroups.com
Ahhh, I see.  Thanks for your patience, that helps.


Reply all
Reply to author
Forward
0 new messages