apache / apache/logging-log4j2

Create an alternative async logger implementation using JCTools

Open
#2,220 10 comments 0 reactions 0 assignees View on GitHub
async enhancement performance
Dominant language
Java
Stars
3.6k
Forks
1.7k
Avg merge
21h 30m
Merged PRs (30d)
27

Description

The current async logger functionality all relies on the LMAX Disruptor library. This library does not support resizable queues which requires end users to configure a large enough ring buffer for their application use case. As such, the default settings in Log4j allocate between 80 and 140 MB of memory for async logging ring buffers which are likely too large for microservices and other more modern use cases in memory constrained environments.

JCTools provides a growable MPSC (multi-producer single consumer) queue which would be a great alternative to using Disruptor in use cases where memory allocation is preferred over blocking or discarding log messages when the queue is full. This would allow for a smaller default queue size that could safely grow to fit an application's typical logging throughput.

This feature is a high level description of the problem. Given the large API differences between LMAX Disruptor and JCTools, I'm not sure on what this would look like specifically.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.