You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rp...@apache.org on 2016/05/07 14:47:43 UTC

[1/2] logging-log4j2 git commit: LOG4J2-1179 added anchors to sections

Repository: logging-log4j2
Updated Branches:
  refs/heads/master 053765adf -> d4866b0c2


LOG4J2-1179 added anchors to sections


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/d2c74848
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/d2c74848
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/d2c74848

Branch: refs/heads/master
Commit: d2c7484857502f7ce1bcfa6851ddee788e57d1ba
Parents: 053765a
Author: rpopma <rp...@apache.org>
Authored: Sat May 7 23:43:07 2016 +0900
Committer: rpopma <rp...@apache.org>
Committed: Sat May 7 23:43:07 2016 +0900

----------------------------------------------------------------------
 src/site/xdoc/performance.xml | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d2c74848/src/site/xdoc/performance.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/performance.xml b/src/site/xdoc/performance.xml
index 889f70b..309e946 100644
--- a/src/site/xdoc/performance.xml
+++ b/src/site/xdoc/performance.xml
@@ -75,6 +75,7 @@
           </p>
           </li>
       </ul>
+      <a name="responseTimeVsServiceTime" />
       <table>
         <tr><td>
           <h5>Sidebar: Why Care About Response Time Latency?</h5>
@@ -107,8 +108,10 @@
           </table>
         </td></tr>
       </table>
+      <a name="loglibComparison" />
       <h3>Logging Library Performance Comparison</h3>
 
+      <a name="asyncLogging" />
       <h4>Asynchronous Logging - Peak Throughput Comparison</h4>
       <p>Asynchronous logging is useful to deal with bursts of events. How this works is that
         a minimum amount of work is done by the application thread to capture all required information in a log event,
@@ -140,6 +143,8 @@
         log4j-1.2.17 and logback-1.0.10. The PerfTest, MTPerfTest and PerfTestDriver
         classes that generated these results can be found in the Log4j 2 unit test source directory.
       </p>
+
+      <a name="asyncLoggingWithParams" />
       <h4>Asynchronous Logging Parameterized Messages</h4>
       <p>Many logging libraries offer an API for logging parameterized messages.
         This enables application code to look something like this:<pre>
@@ -164,7 +169,10 @@ if (logger.isDebugEnabled()) {
       <p>In absolute numbers, <em>Log4j 2's Async Loggers perform well compared to the other logging
         frameworks, but notice that the message formatting cost increases with the number of parameters.
         In this area, Log4j 2 still has work to do to improve.</em></p>
-      <p>Note that the java.util.logging MemoryHandler does <em>not</em> do the safe thing of taking a snapshot
+      <p>JUL (java.util.logging) does not have a built-in asynchronous Handler.
+        <a href="https://docs.oracle.com/javase/8/docs/api/java/util/logging/MemoryHandler.html">MemoryHandler</a>
+        is the nearest thing available so we included it here.
+        MemoryHandler does <em>not</em> do the safe thing of taking a snapshot
         of the current parameter state (it just keeps a reference to the original parameter objects),
         and as a result it is very fast when single-threaded.
         However, when more application threads are logging concurrently, the cost of lock contention outweighs this gain.</p>
@@ -176,6 +184,7 @@ if (logger.isDebugEnabled()) {
         AsyncLoggersBenchmark and the MemoryHandlerJULBenchmark source code in the log4j-perf module.
       </p>
 
+      <a name="asyncLoggingWithLocation" />
       <h4>Performance Impact of Capturing Location Information on Asynchronous Logging Throughput</h4>
       <p>
         Some layouts can show the class, method and line number in the application where the logging call was made.
@@ -204,6 +213,7 @@ if (logger.isDebugEnabled()) {
         MemoryHandlerJULLocationBenchmark source code in the log4j-perf module.
       </p>
 
+      <a name="fileLoggingComparison" />
       <h4>Synchronous File Logging - Sustained Throughput Comparison</h4>
       <p>This section discusses the maximum sustained throughput of logging to a file.
         In any system, the maximum sustained throughput is determined by its slowest component.


[2/2] logging-log4j2 git commit: LOG4J2-1179 update Async Loggers page: removed table with Location performance results, link to performance page

Posted by rp...@apache.org.
LOG4J2-1179 update Async Loggers page: removed table with Location performance results, link to performance page


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/d4866b0c
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/d4866b0c
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/d4866b0c

Branch: refs/heads/master
Commit: d4866b0c2b9737ee1792372a4d83ee1ac02a0a69
Parents: d2c7484
Author: rpopma <rp...@apache.org>
Authored: Sat May 7 23:48:04 2016 +0900
Committer: rpopma <rp...@apache.org>
Committed: Sat May 7 23:48:04 2016 +0900

----------------------------------------------------------------------
 src/site/xdoc/manual/async.xml | 52 ++-----------------------------------
 1 file changed, 2 insertions(+), 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d4866b0c/src/site/xdoc/manual/async.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/async.xml b/src/site/xdoc/manual/async.xml
index c43fa26..9ab054a 100644
--- a/src/site/xdoc/manual/async.xml
+++ b/src/site/xdoc/manual/async.xml
@@ -439,8 +439,8 @@
         <p>
           However, asynchronous loggers need to make this decision before passing the
           log message to another thread; the location information will be lost after that point.
-          The performance impact of taking a stack trace snapshot is even higher for asynchronous loggers:
-          logging with location is 4 - 20 times slower than without location.
+          The <a href="../performance.html#asyncLoggingWithLocation">performance impact</a> of taking a stack trace snapshot is even higher for asynchronous loggers:
+          logging with location is 30-100 times slower than without location.
           For this reason, asynchronous loggers and asynchronous appenders do not include location information by default.
         </p>
         <p>
@@ -690,54 +690,6 @@
           </tr>
         </table>
 
-        <h4>Throughput of Logging With Location (includeLocation="true")
-        </h4>
-        <p>On Solaris 10 (64bit) with JDK1.7.0_06, 4-core Xeon X5570 dual CPU
-          @2.93Ghz with hyperthreading switched off (8 virtual cores):
-        </p>
-        <table>
-          <caption align="top">Throughput in log messages/second per thread</caption>
-          <tr>
-            <th>Logger (Log4j 2)</th>
-            <th>1 thread</th>
-            <th>2 threads</th>
-            <th>4 threads</th>
-            <th>8 threads</th>
-          </tr>
-          <tr>
-            <td>Loggers all asynchronous</td>
-            <td align="right">75,862</td>
-            <td align="right">88,775</td>
-            <td align="right">80,240</td>
-            <td align="right">68,077</td>
-          </tr>
-          <tr>
-            <td>Loggers mixed sync/async</td>
-            <td align="right">61,993</td>
-            <td align="right">66,164</td>
-            <td align="right">55,735</td>
-            <td align="right">52,843</td>
-          </tr>
-          <tr>
-            <td>Async Appender</td>
-            <td align="right">47,033</td>
-            <td align="right">52,426</td>
-            <td align="right">50,882</td>
-            <td align="right">36,905</td>
-          </tr>
-          <tr>
-            <td>Synchronous</td>
-            <td align="right">31,054</td>
-            <td align="right">33,175</td>
-            <td align="right">29,791</td>
-            <td align="right">23,628</td>
-          </tr>
-        </table>
-        <p>As expected, logging location information has a large performance impact. Asynchronous loggers are 4 - 20
-          times slower, while synchronous loggers are 1.3 - 5 times slower. However, if you do need
-          location information, asynchronous logging will still be faster than synchronous logging.
-        </p>
-
         <a name="Latency" />
         <h4>Latency</h4>
         <p>Latency tests are done by logging at less than saturation, measuring how long a call to Logger.log