Re: Async logging using lmax disruptor is consuming more heap memory

2024-02-22 Thread Ganesh S
Hello, As suggested, I'm trying to reduce the ringbuffer size to 1024 or other experimental values(even numbers). But log4j2 is taking the default value 262144, even though I have added the system properties. I have tried 3 ways, 1. Added VM argument as -Dlog4j2.asyncLoggerRingBufferSize=102

Re: Async logging using lmax disruptor is consuming more heap memory

2024-02-20 Thread Remko Popma
197 KB for each log message! That’s about 100-1000x larger than the average message size. I would suggest having a much smaller ringbuffer, meaning fewer slots. The system property that controls this is log4j2.asyncLoggerRingBufferSize The default is (256 * 1024), which is a lot. The minimum

Re: Async logging using lmax disruptor is consuming more heap memory

2024-02-20 Thread Anthony Maire
There are JVM properties to reduce both the number of slot of the ring buffer, and the maximum size of the StringBuilder used inside each slot. Tuning these should help to lower the extra memory footprint. I don't remember them (and cannot do the search right now) but they are documented on log4j