From 6f2dd1d8e23c6d301148eeefed48c3f347eb898e Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Thu, 29 Oct 2020 12:19:29 -0500 Subject: [PATCH 1/2] changed the ForkJoinExecutor to properly account for parallelism-factor via HOCON --- src/core/Akka/Dispatch/AbstractDispatcher.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Akka/Dispatch/AbstractDispatcher.cs b/src/core/Akka/Dispatch/AbstractDispatcher.cs index fe0214fead4..9cb89086311 100644 --- a/src/core/Akka/Dispatch/AbstractDispatcher.cs +++ b/src/core/Akka/Dispatch/AbstractDispatcher.cs @@ -207,7 +207,7 @@ private static DedicatedThreadPoolSettings ConfigureSettings(Config config) var settings = new DedicatedThreadPoolSettings( ThreadPoolConfig.ScaledPoolSize( fje.GetInt("parallelism-min"), - 1.0, + fje.GetDouble("parallelism-factor", 1.0D), // the scalar-based factor to scale the threadpool size to fje.GetInt("parallelism-max")), name:config.GetString("id")); return settings; From 06511b551ed26b7579577f456ce35ba6cf6fae79 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Thu, 29 Oct 2020 12:19:55 -0500 Subject: [PATCH 2/2] close #4589 - made Akka.Remote dispatcher use proper dispatching settings --- src/core/Akka.Remote/Configuration/Remote.conf | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/core/Akka.Remote/Configuration/Remote.conf b/src/core/Akka.Remote/Configuration/Remote.conf index 8ebcd54d840..7988c45604d 100644 --- a/src/core/Akka.Remote/Configuration/Remote.conf +++ b/src/core/Akka.Remote/Configuration/Remote.conf @@ -602,18 +602,21 @@ akka { default-remote-dispatcher { type = ForkJoinDispatcher executor = fork-join-executor - dedicated-thread-pool { - # Fixed number of threads to have in this threadpool - thread-count = 4 + fork-join-executor { + parallelism-min = 2 + parallelism-factor = 0.5 + parallelism-max = 16 } + throughput = 10 } backoff-remote-dispatcher { type = ForkJoinDispatcher executor = fork-join-executor - dedicated-thread-pool { - # Fixed number of threads to have in this threadpool - thread-count = 4 + fork-join-executor { + # Min number of threads to cap factor-based parallelism number to + parallelism-min = 2 + parallelism-max = 2 } } }