Daniel R created LOG4J2-1892:
--------------------------------

             Summary: High constant CPU usage with Async appender 
DisruptorBlockingQueue spinPolicy 'WAITING`
                 Key: LOG4J2-1892
                 URL: https://issues.apache.org/jira/browse/LOG4J2-1892
             Project: Log4j 2
          Issue Type: Bug
          Components: Appenders
    Affects Versions: 2.8.2
         Environment: JDK 7, Jetty 9.2 but also observed in JDK 8/Tomcat 8
            Reporter: Daniel R


With {{monospaced}}spinPolicy="WAITING"{{monospaced}} CPU usage shoots up to 
11% and stays right there with no app activity.
With {{monospaced}}spinPolicy="BLOCKING"{{monospaced}} CPU usage goes down to 
near 0% with no app usage.

In my local dev environment the Async appender is configured but not used 
(commented out in the <Root> section.
Config excerpt:
{{monospaced}}
<Appenders>
        ...
<!-- Wrap the email error appender into an asynchronous appender -->
<Async name="ASYNC_EMAIL_ERROR" bufferSize="128" >
        <DisruptorBlockingQueue spinPolicy="WAITING"/>
        <AppenderRef ref="EMAIL_ERROR" />
</Async>
</Appenders>

<Root level="INFO">
        <AppenderRef ref="CONSOLE"/>
<!--                    
        <AppenderRef ref="FILE"/>
        <AppenderRef ref="FILE_ERROR"/>
        <AppenderRef ref="ASYNC_EMAIL_ERROR"/>
-->
</Root>
{{monospaced}}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to