Index: core/src/site/xdoc/index.xml =================================================================== --- core/src/site/xdoc/index.xml (revision 1469288) +++ core/src/site/xdoc/index.xml (working copy) @@ -46,6 +46,7 @@
  • Async Loggers require the LMAX Disruptor.
  • SMTPAppender requires Javax Mail.
  • JMSQueueAppender and JMSTopicAppender require a JMS implementation like geronimo-jms.
  • +
  • Windows color support requires Jansi.
  • Index: src/site/resources/images/async-average-latency.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: src/site/resources/images/async-latency-histogram-64-threads.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: src/site/resources/images/async-latency-histogram-64-threads.png =================================================================== --- src/site/resources/images/async-latency-histogram-64-threads.png (revision 0) +++ src/site/resources/images/async-latency-histogram-64-threads.png (working copy) Property changes on: src/site/resources/images/async-latency-histogram-64-threads.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: src/site/resources/images/async-max-latency-99.99pct.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: src/site/xdoc/index.xml =================================================================== --- src/site/xdoc/index.xml (revision 1469288) +++ src/site/xdoc/index.xml (working copy) @@ -97,7 +97,7 @@

    - Log4j 2 requires Java 5 but takes advantage of enhancements in Java 6 to improve performance. + Log4j 2 requires Java 6. Some features require optional dependencies; the documentation for these features specifies the dependencies.

    Index: src/site/xdoc/manual/async.xml =================================================================== --- src/site/xdoc/manual/async.xml (revision 1469288) +++ src/site/xdoc/manual/async.xml (working copy) @@ -761,25 +761,101 @@

    Latency

    -

    The latency comparison below is done by logging at +

    Latency tests are done by logging at less than saturation, measuring how long a call to Logger.log takes to return. After each call to Logger.log, the test waits for 10 microseconds * threadCount before continuing. Each thread logs 5 million messages.

    +

    All the latency measurements below are results of tests run + on Solaris 10 (64bit) with JDK1.7.0_06, 4-core Xeon X5570 dual CPU + @2.93Ghz with hyperthreading switched on (16 virtual cores).

    +

    +

    Note that this is log-scale, not linear. + The above graph compares the latency distributions of + an asynchronous logger and a Log4j 1.2.17 Async Appender. + This shows the latency of one thread + during a test where 64 threads are logging in parallel. + The test was run once for the async logger and once for the + async appender.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Average latency99% observations + less than99.99% + observations less than
    1 thread64 threads1 thread64 threads1 thread64 threads
    Log4j2: Loggers all async6774,1351,6384,0968,19216,128
    Log4j2: Loggers mixed + sync/async6484,8731,2284,0968,19216,384
    Log4j2: Async Appender2,4232,117,7224,09667,108,86416,384268,435,456
    Log4j1: Async Appender1,5621,781,4044,096109,051,90416,384268,435,456
    Logback: Async Appender2,1232,079,0203,27667,108,86414,745268,435,456
    Latency of a call to Logger.log() in nanoseconds

    - -

    -

    - Note that the scale of the latency comparison graphs is - logarithmic, not linear. - That makes it a bit difficult to see, but the average latency of - asynchronous loggers is half to one third of the latency of - ArrayBlockingQueue-based asynchronous appenders in scenarios - up to 8 threads. With more threads, the average latency of + The latency comparison graph below is also log-scale, + and shows the average latency of asynchronous loggers and + ArrayBlockingQueue-based asynchronous appenders + in scenarios with more and more threads running in parallel. + Up to 8 threads asynchronous appenders have comparable + average latency, two or three times that of asynchronous loggers. + With more threads, the average latency of asynchronous appenders is orders of magnitude larger than asynchronous loggers.

    +

    Applications interested in low latency often care not only about average latency, but also about worst-case latency. @@ -787,9 +863,9 @@ better when comparing the maximum latency of 99.99% of observations with other logging methods. When increasing the number of threads - the worst case latency of asynchronous loggers remains more or - less the same (around 10-20 microseconds) - where Asynchronous Appenders start experiencing worst-case + the vast majority of latency measurements for asynchronous + loggers stay in the 10-20 microseconds range + where Asynchronous Appenders start experiencing many latency spikes in the 100 millisecond range, a difference of four orders of magnitude.