Remko Popma created LOG4J2-423:
----------------------------------

             Summary: Provide a means to inspect queue usage for Async Loggers 
and Async Appender
                 Key: LOG4J2-423
                 URL: https://issues.apache.org/jira/browse/LOG4J2-423
             Project: Log4j 2
          Issue Type: Bug
          Components: Appenders, Core
    Affects Versions: 2.0-beta9
            Reporter: Remko Popma
            Assignee: Remko Popma
             Fix For: 2.0-rc1


There are scenarios where logging (even asynchronous logging) can become a 
performance bottleneck for the application; specifically, during a burst of 
activity the application may produce log events faster than the appender can 
consume them. If such a burst continues long enough, the queue that is used to 
pass log events from the producing (application) thread to the consuming 
(appender) thread may fill up.

Note that the queues used by AsyncLoggers and by AsyncAppenders are both 
bounded queues. Once this queue is full, the producer can only add log events 
at the same speed that the appender can consume them. So from that point the 
application becomes IO-bound.

The correct size of the queue is both application and environment dependent. At 
what rate do events arrive during a burst? How long does a burst continue? How 
fast can the consumer take events off the queue?

In order to be able to tune the queue size, users need a way to sample the 
queue usage: at the time of the snapshot, how many events are in the queue 
waiting to be processed? (In concurrent scenarios the answer to this question 
is pretty much always out of date, but it is still useful to help determine a 
good queue size.)




--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to