perf(runtime): raise opcua pinned dispatcher throughput 1 -> 100
This commit is contained in:
@@ -302,12 +302,18 @@ public static class ServiceCollectionExtensions
|
||||
// bootstrap their own HOCON (e.g. ServiceCollectionExtensionsTests) wouldn't pick it up
|
||||
// — OpcUaPublishActor.Props pins itself to opcua-synchronized-dispatcher and Akka throws
|
||||
// ConfigurationException if it doesn't exist. Prepend a fallback so the runtime extension
|
||||
// is self-contained.
|
||||
// is self-contained. Keep this block identical to the akka.conf one.
|
||||
//
|
||||
// The OPC UA SDK's single-threaded session/subscription requirement is guaranteed by the
|
||||
// PinnedDispatcher alone (a dedicated thread per actor instance), not by throughput.
|
||||
// throughput only sets how many queued messages drain per scheduling run, so 100 removes a
|
||||
// mailbox re-schedule round-trip per message on the hottest actor in the process with zero
|
||||
// change to concurrency.
|
||||
builder.AddHocon(@"
|
||||
opcua-synchronized-dispatcher {
|
||||
type = ""PinnedDispatcher""
|
||||
executor = ""thread-pool-executor""
|
||||
throughput = 1
|
||||
throughput = 100
|
||||
}
|
||||
", HoconAddMode.Prepend);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user