> -----Original Message----- > From: logback-user <logback-user-boun...@qos.ch> On Behalf Of David > Roussel > Sent: Saturday, May 22, 2021 12:33 PM > To: logback users list <logback-user@qos.ch> > Subject: Re: [logback-user] Looking for details about AsyncAppender > properties > > It’s been many years since I read the code. But I seem to remember it’s quite > straight forward and just uses a java ArrayList, which will size itself > dynamically. But you’d best just read it yourself.
Ok, well, good idea. What I found could potentially be a problem, but it depends on the situation. It is creating an ArrayBlockingQueue, and passing the queue size to the constructor, which allocates an Object array of that size, so I guess that will likely be 800k for each AsyncAppender (queueSize of 100000). That could be significant, or not. > IMHO the lock usage in the blocking queue isn’t great and could be more > efficient. But it does the job, and by not blocking on network IO it’s always > given me a good speed up. > > In the last project where is used logback I turned it on by default at the > begging of the project because it was such a clear win based on my past > experience. > > The default settings are fine. Setting a very high limit would only be > justified > if you have a lot of memory and are expecting to have occasional very slow > periods of IO. > > But given you are writing to stdout, this will depend on the behaviour of the > log stream consumer abs how much buffering it does. > > I would expect any decent logging adapter to be built to cope with network > interruptions and buffer accordingly. > > Dave > _______________________________________________ > logback-user mailing list > logback-user@qos.ch > https://urldefense.com/v3/__http://mailman.qos.ch/mailman/listinfo/logba > ck- > user__;!!BhdT!xxdh0wF7WsxDh76ZH4dqOpy5OVu2GeuW2uHh1qcirY_VVsw > Ma_N2YdhXJwcl6g$ _______________________________________________ logback-user mailing list logback-user@qos.ch http://mailman.qos.ch/mailman/listinfo/logback-user