[logback-user] Looking for details about AsyncAppender properties
David Roussel
nabble at diroussel.xsmail.com
Sat May 22 09:06:42 CEST 2021
Hi David,
As documented in http://logback.qos.ch/manual/appenders.html
The queue in async appender is a blocking queue. So if it fills up, then the application code will block until there is space in the queue.
Burg that blocking will only occur for error messages as mentioned in the above linked page;
> Note that by default,AsyncAppender will drop events of level TRACE, DEBUG and INFO if its queue is 80% full. This strategy has an amazingly favorable effect on performance at the cost of event loss.
So this is a reason to use a large queue size, if you want to avoid loosing info messages under high load.
As for ‘ includeCallerData’, this including information about the caller of the logger, like line number and file. This takes us more memory, and not all for matters use it.
David
> On 22 May 2021, at 04:21, KARR, DAVID <dk068x at att.com> wrote:
> I'm investigating what the consequences will be of changing some of our high volume logging calls to use an AsyncAppender instead of a synchronous appender. Our services run in a k8s container, so they are ultimately writing to stdout, although other processes are aggregating that log output to Splunk or ELK.
>
> I understand the basic idea of what the AsyncAppender will do, but I have some questions about the impact of some property settings which I cannot find details about in the documentation.
>
> I'm mostly interested in the "queueSize" and "includeCallerData" properties.
>
> Concerning "queueSize", I know it is the limit to the size of the input queue, but how exactly is that parameter utilized? Is any memory allocated based on that queue size at startup, or is it simply the limit of a dynamically expanding list? The default queue size is apparently 256. A team in our organization is planning to set this to a very large number, like 100000. Obviously, there would be considerable impact if the queue really reached that size, and I understand that.
>
> Concerning "includeCallerData", I understand this even less. How is this "caller data" used? What does it really represent? What is the impact of this being included or not included? I tried running tests with one service with the main high volume appender being set to use the sync appender, and then the async appender. I didn't really notice any changes in the output.
> _______________________________________________
> logback-user mailing list
> logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20210522/cca0f483/attachment.html>
More information about the logback-user
mailing list