scala Akka 调度程序的默认配置值是什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16175725/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 05:13:03  来源:igfitidea点击:

What are the default Akka dispatcher configuration values?

javascalaakkadispatcher

提问by Tsume

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. ?

在 Akka 文档中,它指出如果未配置调度程序,将使用默认调度程序。默认调度程序的属性是什么,即 parallelism-min、parallelism-factor、parallelism-max 等?

回答by Rodrigo Sasaki

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

默认情况下,提供的调度程序Akka是一个带有 a的调度程序fork-join-executor,默认并行值是这些:

  • parallelism-min:8
  • parallelism-factor:3.0
  • parallelism-max:64
  • 并行度最小:8
  • 并行因子:3.0
  • 最大并行度: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
    }
}