Skip to content

Akka.Remote + ForkJoinExecutor dispatcher configuration changes #4597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions src/core/Akka.Remote/Configuration/Remote.conf
Original file line number Diff line number Diff line change
Expand Up @@ -583,18 +583,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
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/Akka/Dispatch/AbstractDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down