What are the default Akka dispatcher configuration values?

南楼画角 提交于 2019-12-03 03:38:08

问题


In the Akka documentation it states that if a dispatcher is not configured a default dispatcher will be used. What are the properties of the default dispatcher i.e parallelism-min, parallelism-factor, parallelism-max etc. ?


回答1:


By default the dispatcher provided by Akka is one with a fork-join-executor, and the default parallelism values are these:

  • parallelism-min: 8
  • parallelism-factor: 3.0
  • parallelism-max: 64

You can see all of this in the documentation.

There is a section named: Listing of the Reference Configuration

Here is the relevant part of the configuration file (I only removed the comments):

default-dispatcher {
    type = "Dispatcher"
    executor = "fork-join-executor"

    fork-join-executor {
        parallelism-min = 8
        parallelism-factor = 3.0
        parallelism-max = 64
    }

    thread-pool-executor {
        keep-alive-time = 60s
        core-pool-size-min = 8
        core-pool-size-factor = 3.0
        core-pool-size-max = 64
        max-pool-size-min = 8
        max-pool-size-factor  = 3.0
        max-pool-size-max = 64
        task-queue-size = -1
        task-queue-type = "linked"

        allow-core-timeout = on
    }
}


来源:https://stackoverflow.com/questions/16175725/what-are-the-default-akka-dispatcher-configuration-values

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!