Akka.NET v1.4.19: ChannelExecutor performance data #4983
Replies: 9 comments 46 replies
-
I made now some test with a new ChannelExecutor and looks a bit better. see my commit: Zetanova@cc7e3b1 It will run without the ThreadPool.SetMinThreads manipulation with 1-2 Threads and idling it should have very low CPU. |
Beta Was this translation helpful? Give feedback.
-
Unrelated, but just found this delightful gem in the .NET Core repos: dotnet/runtime#51935 (comment) Looks like hill-climbing is affected by a signed integer overflow bug... |
Beta Was this translation helpful? Give feedback.
-
I tried now the channelexecutor of v1.4.20 But now i am getting "heartbeat interval is growing too large ... >2700ms" warnings |
Beta Was this translation helpful? Give feedback.
-
I think this is too risky. I'm running a very large-scale service and have messed the service up with ThreadPool a lot, this kind of undocumented, unexpected "hidden" changes will cost a lot to discover the problem in a production environment. Also, for other use cases, like, If someone combines their ASP.net service and actor system that would be a disaster. this is a typical pattern of rapidly growing small to medium scale service. I've been there. :'( The min thread count benefits from reducing scheduling overhead (also there a lock inside this scheduler..) by aggressively reducing thread count but also this means thread pool will create a thread on demand, which will cause allocation overhead and lock contention. If this is a such problem, how about creating your own dedicated thread pool for this? |
Beta Was this translation helpful? Give feedback.
-
Reverting the |
Beta Was this translation helpful? Give feedback.
-
I have finally gotten around to trying @Zetanova's Dev
@Zetanova /
|
Beta Was this translation helpful? Give feedback.
-
Running into some issues trying this with Akka.Persistence.Linq2db Perf tests.
If I set my
What's really throwing me off on this, is that For whatever it is worth, we are using a wide variety of async within Akka Streams pipelines, as well as |
Beta Was this translation helpful? Give feedback.
-
@Aaronontheweb I am using it with akka 1.4.21 prodction without issues. Maybe or maybe not the throughput is higher On my manuel tests, most of the time a single worker will execute everything. |
Beta Was this translation helpful? Give feedback.
-
@Aaronontheweb what's the status of the |
Beta Was this translation helpful? Give feedback.
-
In Akka.NET v1.4.19 we will be introducing an opt-in feature, the
ChannelExecutor
- a new dispatcher type that re-uses the same configuration as aForkJoinDispatcher
but runs entirely on top of the .NETThreadPool
and is able to take advantage of dynamic thread pool scaling to size / resize workloads on the fly.You can read the initial development pull request, commentary, and benchmark results here: #4882
During its initial development and benchmarks, we observed the following:
ChannelExecutor
tremendously reduced idle CPU and max busy CPU even during peak message throughput, primarily as a result of dynamically shrinking the totalThreadPool
to only the necessary size. This resolves one of the largest complaints large users of Akka.NET have today. However, in order for this setting to be effectiveThreadPool.SetMin(0,0)
must also be set. We are considering doing this inside theActorSystem.Create
method (edit: this is now done insideActorSystem.Create
automatically), but if you those settings don't work for you you can easily override them by simply callingThreadPool.SetMin(yourValue, yourValue)
again afterActorSystem.Create
has exited.ChannelExecutor
actually beat theForkJoinDispatcher
and others on performance even in environments like Docker and bare metal on Windows.We are looking to gather more feedback from real-world use from users who require high performance from their Akka.NET applications.
If you could please comment on this discussion thread with the following data:
ChannelExecutor
everywhereThis information would be very helpful for us in determining how best to performance-tune Akka.NET and its dispatching system in the future. Thank you for your support!
Beta Was this translation helpful? Give feedback.
All reactions