Akka调度程序的默认配置值是什么? [英] What are the default Akka dispatcher configuration values?

查看:103
本文介绍了Akka调度程序的默认配置值是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

解决方案

默认 Akka 提供的调度程序是带有 fork-join-executor 的调度程序,默认并行度值为: / p>


  • 并行度最小值: 8

  • 并行度系数: 3.0

  • parallelism-max: 64



您可以在文档中看到所有这些内容。



有一个节名为: 列出参考配置



以下是配置文件的相关部分(我只删除了注释):

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

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

线程池执行器{
keep-alive-time = 60s
core-pool -size-min = 8
核心池大小系数= 3.0
core-pool-size-max = 64
max-pool-size-min = 8
max -pool-size-factor = 3.0
max-pool-size-max = 64
任务队列大小= -1
任务队列类型=链接

allow-core-timeout = on
}
}


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

解决方案

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
    }
}

这篇关于Akka调度程序的默认配置值是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆