These are chat archives for akkadotnet/akka.net

4th
Jun 2017
Bartosz Sypytkowski
@Horusiath
Jun 04 2017 07:13
@mithril52 it would be easier to build a custom logger actor itself that would batch-write the logs. Logger actors are very simple in nature
Marc Piechura
@marcpiechura
Jun 04 2017 08:34
Hey @Arkatufus, are you interested in doing more contributions ? Have some scala code to port for Akka streams that would probably be a good starting point
Arjen Smits
@Danthar
Jun 04 2017 11:27
@mithril52 I have run into it when debugging an issue surrounding the logging infrastructure in Akka. In my case, it was simply a matter of the logging sink the logging actor was writing too, was unable to keep up. This problem varies across logging implementations, as each logging framework has their sinks implemented differently. And some cope better then others.
If the logging sink being written too uses batching, that helps alot.
However the logging infrastructure in akka.net adds some overhead. In very high frequency scenario's this overhead is to much. And it can help to use the logging framework directly, instead of the logging abstraction akka.net provides.
In those scenario's the fact that the logger implementation is an actor itself, is an issue. Because it prevents concurrent access to the underlying logger
which ultimately slows things down.
We dont have support for running multiple logger instances whose work is distributed accross them.
But you could write your own logging actor that uses multiple child actors to do the actual logging. And see if that helps. Although i think you would get more performance by bypassing the logging abstraction altogether.
Arjen Smits
@Danthar
Jun 04 2017 11:34
So those are some thoughts regarding the things you can do. I'd start with implementing an actor that batch-writes. Like @Horusiath says. Since thats the simplest thing you can do, without having to change alot of code ;)
Gregorius Soedharmo
@Arkatufus
Jun 04 2017 12:20
@Silv3rcircl3 sure, I'll give it a go, what do you need?
Marc Piechura
@marcpiechura
Jun 04 2017 12:36
@Arkatufus I'm working on updating streams t0 2.4.18 and those three PRs are a good point to start IMO
akka/akka#22647
akka/akka#22657
You can create one for all three of them
Gregorius Soedharmo
@Arkatufus
Jun 04 2017 12:37
alright, I'll look into it
Marc Piechura
@marcpiechura
Jun 04 2017 12:37
Cool thx
Gregorius Soedharmo
@Arkatufus
Jun 04 2017 12:37
np (y)
David Rivera
@mithril52
Jun 04 2017 13:10
@Danthar and @Horusiath Thank you for the replies! Yeah, the batching idea is what I had thought about as well, and is what I am trying, I'm jut not sure how to get it to use a custom mailbox yet. I have a mailbox that does it, just trying to figure out how to get the logger actor to use it. I guess I will need to bypass the logging abstraction to do that?
Bartosz Sypytkowski
@Horusiath
Jun 04 2017 13:53
@mithril52 this is why I've told you to do it on actor level instead of building custom mailbox
fanoI
@fanoI
Jun 04 2017 14:27
There is someone that can help me with this: akkadotnet/akka.net#2624 Or I'm totally dumb or I think to have found a bug...
fanoI
@fanoI
Jun 04 2017 15:22
My impression is that check for the "syncronized-dispatcher" is done in the client not in the remote "host" and so all fails! The remote host is the only one to have a Winform Application...
David Rivera
@mithril52
Jun 04 2017 17:14
@Horusiath Hmm. Perhaps I am missing something, I'm not sure how doing it at the actor level would work. Is there a way to pull additional messages out of the mailbox inside the actor? The only thing I can think of that you might be talking about is caching the messages as they get processed, then writing a bunch of them into the logs at once. However, from what I see, its the messages themselves getting processed out of the actors mailbox that is the slowdown, not the underlying logging system so I not sure how that would help the situation. Can you clarify a bit more what you mean? Maybe I'm just not understanding.