Remko Popma created LOG4J2-574:
----------------------------------

             Summary: Make Blocking the default WaitStrategy for Async Loggers
                 Key: LOG4J2-574
                 URL: https://issues.apache.org/jira/browse/LOG4J2-574
             Project: Log4j 2
          Issue Type: Improvement
          Components: Appenders
    Affects Versions: 2.0-rc1
            Reporter: Remko Popma
            Assignee: Remko Popma
             Fix For: 2.0-rc2


With Asynchronous Loggers, the wait strategy determines what the consumer 
thread does when the queue is empty and it is waiting for events. The LMAX 
Disruptor offers several options, as some specialized apps want to avoid the 
latency of waking up a blocked thread. These options have different trade-offs, 
with busy spin on one end of the spectrum and blocking on the other. 

In log4j we only expose a limited set of these options (no busy spin), and 
originally chose SleepingWait as the default as it seemed to have the best 
performance in testing.

It turned out that in some environments the current default of 
SleepingWaitStrategy may result in excessive CPU usage (LOG4J2-571). To avoid 
such problems this ticket proposes to change the default wait strategy for 
Async Loggers to BlockingWaitStrategy.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to