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/17 14:59:21 UTC
[1/3] logging-log4j2 git commit: LOG4J2-1297 small fixes in
garbage-free manual page
Repository: logging-log4j2
Updated Branches:
refs/heads/master a70ea2571 -> 94b5a8062
LOG4J2-1297 small fixes in garbage-free manual 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/4e2b7374
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/4e2b7374
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/4e2b7374
Branch: refs/heads/master
Commit: 4e2b7374b427a87893dd94ff4d337797488f28eb
Parents: a70ea25
Author: rpopma <rp...@apache.org>
Authored: Tue May 17 23:58:21 2016 +0900
Committer: rpopma <rp...@apache.org>
Committed: Tue May 17 23:58:21 2016 +0900
----------------------------------------------------------------------
src/site/xdoc/manual/garbagefree.xml | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4e2b7374/src/site/xdoc/manual/garbagefree.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/garbagefree.xml b/src/site/xdoc/manual/garbagefree.xml
index 080142b..ed9c9b3 100644
--- a/src/site/xdoc/manual/garbagefree.xml
+++ b/src/site/xdoc/manual/garbagefree.xml
@@ -438,19 +438,21 @@ public void garbageFree() {
milliseconds where the garbage-free response times were less than 3 milliseconds.
It may be possible to improve on this, we did not investigate further yet.</p>
<p><img src="../images/ResponseTimeSyncClassicVsGcFree.png" /></p>
+ <p>The above results are obtained with the ResponseTimeTest class which can be found in the Log4j 2
+ unit test source directory, running on JDK 1.8.0_45 on RHEL 6.5 (Linux 2.6.32-573.1.1.el6.x86_64)
+ with 10-core Xeon CPU E5-2660 v3 @2.60GHz with hyperthreading switched on (20 virtual cores).</p>
<a name="Throughput" />
<h4>Classic Logging has Slightly Higher Throughput</h4>
- <p>Throughput is slightly higher for classic logging than for garbage-free logging.
+ <p>Throughput is slightly worse for garbage-free logging, compared to classic logging.
This is true for both synchronous and asynchronous logging.
- Garbage-free logging throughput is roughly similar to the throughput of Log4j 2.5.
The graph below compares the sustained throughput of synchronous logging to a file with Log4j 2.6 in
garbage-free mode, classic mode and Log4j 2.5.</p>
- <p>The results below are obtained with the
- <a href="http://openjdk.java.net/projects/code-tools/jmh/">JMH</a> Java benchmark harness.
- See the <tt>org.apache.logging.log4j.perf.jmh.FileAppenderBenchmark</tt> source code in the log4j-perf module.</p>
<p><img src="../images/garbage-free2.6-SyncThroughputLinux.png"
alt="Throughput of Log4j 2.6 in garbage-free mode is slightly worse than in classic mode, but on par with 2.5 and much better than alternatives logging libraries" /></p>
+ <p>The results above are obtained with the
+ <a href="http://openjdk.java.net/projects/code-tools/jmh/">JMH</a> Java benchmark harness.
+ See the FileAppenderBenchmark source code in the log4j-perf module.</p>
</subsection>
<a name="UnderTheHood" />
<subsection name="Under the Hood">
[2/3] logging-log4j2 git commit: LOG4J2-1179 added arrow with "lock
free" label to MarkerFilterCostComparison graph
Posted by rp...@apache.org.
LOG4J2-1179 added arrow with "lock free" label to MarkerFilterCostComparison graph
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/84ed058f
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/84ed058f
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/84ed058f
Branch: refs/heads/master
Commit: 84ed058f8c79bf8be29aead7e60ec3a4e8403850
Parents: 4e2b737
Author: rpopma <rp...@apache.org>
Authored: Tue May 17 23:59:06 2016 +0900
Committer: rpopma <rp...@apache.org>
Committed: Tue May 17 23:59:06 2016 +0900
----------------------------------------------------------------------
.../images/MarkerFilterCostComparison.png | Bin 21891 -> 22737 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/84ed058f/src/site/resources/images/MarkerFilterCostComparison.png
----------------------------------------------------------------------
diff --git a/src/site/resources/images/MarkerFilterCostComparison.png b/src/site/resources/images/MarkerFilterCostComparison.png
index 3a0f8c0..ae48521 100644
Binary files a/src/site/resources/images/MarkerFilterCostComparison.png and b/src/site/resources/images/MarkerFilterCostComparison.png differ
[3/3] logging-log4j2 git commit: LOG4J2-1179 various small
improvements to the Advanced Filtering section of the performance page
Posted by rp...@apache.org.
LOG4J2-1179 various small improvements to the Advanced Filtering section of the 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/94b5a806
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/94b5a806
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/94b5a806
Branch: refs/heads/master
Commit: 94b5a8062b24e875a70a4736422c361fea51491f
Parents: 84ed058
Author: rpopma <rp...@apache.org>
Authored: Tue May 17 23:59:53 2016 +0900
Committer: rpopma <rp...@apache.org>
Committed: Tue May 17 23:59:53 2016 +0900
----------------------------------------------------------------------
src/site/xdoc/performance.xml | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/94b5a806/src/site/xdoc/performance.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/performance.xml b/src/site/xdoc/performance.xml
index 0735543..f1cc273 100644
--- a/src/site/xdoc/performance.xml
+++ b/src/site/xdoc/performance.xml
@@ -285,17 +285,26 @@ TODO
Both Logback and Log4j 2 support advanced filtering. Logback calls them TurboFilters while
Log4j 2 has a single Filter object. Advanced filtering provides the capability to filter
LogEvents using more than just the Level before the events are passed to Appenders.
- However, this flexibility does come with some cost. Since multi-threading can also have an impact on the
+ However, this flexibility does come with some cost.
+ Since multi-threading can also have an impact on the
performance of advanced filtering, the chart below shows the difference in performance of filtering based
+ on a Marker or a Marker's parent.</p>
+ <p>
+ The "Simple Marker" comparison checks to see if a Marker that has no references
+ to other markers matches the requested Marker. The "Parent Marker" comparison checks to see
+ if a Marker that does have references to other markers matches the requested Marker. </p>
+ <p>It appears that coarse-grained synchronization in SLF4J can impact performance in
+ multi-threaded scenarios. See
+ <a href="http://jira.qos.ch/browse/SLF4J-240">SLF4J-240</a>.</p>
+ <p><img src="images/MarkerFilterCostComparison.png" /></p>
+ <p>Log4j and Logback also support filtering
on a value in the Log4j ThreadContext vs filtering in Logback on a value in the MDC.
+ The graph below shows that the performance difference between Log4j 2 and Logback
+ is small for the ThreadContext filter.
</p><p><img src="images/ThreadContextFilterCostComparison.png" /></p>
- <p>Log4j and Logback also support filtering on a Marker or a Marker's parent. It should be pointed out that
- the poor performance of Logback's Marker filter is not due to a problem in Logback but in SLF4J. See
- <a href="http://jira.qos.ch/browse/SLF4J-240">SLF4J-240</a>. The "simple" comparison checks to see if a Marker
- that has no references to other markers matches the requested Marker. The "parent" comparison checks to see
- if a Marker that does have references to other markers matches. </p>
- <p><img src="images/MarkerFilterCostComparison.png" /></p>
- <p>See the MarkerFilterBenchmark and MDCFilterBenchmark in the log4j-perf module for details on these
+ <p>The Filter comparison results above are obtained with the
+ <a href="http://openjdk.java.net/projects/code-tools/jmh/">JMH</a> Java benchmark harness.
+ See the MarkerFilterBenchmark and MDCFilterBenchmark in the log4j-perf module for details on these
benchmarks.</p>
<a name="tradeoffs" />
<h3>Trade-offs</h3>