[ 
https://issues.apache.org/jira/browse/LOG4J2-1395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15306842#comment-15306842
 ] 

Gary Gregory edited comment on LOG4J2-1395 at 5/30/16 6:13 PM:
---------------------------------------------------------------

I still can't say if the code make sense, I try to look tomorrow. For now, here 
are some test results.
- Checked out the branch
- mvn clean install -DskipTests
- {{"%JAVA_7_HOME%\bin\java" -jar log4j-perf/target/benchmarks.jar 
".*Log4j2AppenderComparisonBenchmark.*" -f 1 -wi 10 -i 20}}

{noformat}
# Run complete. Total time: 00:09:15

Benchmark                                                               Mode  
Samples           Score           Error  Units
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderConsole          thrpt    
   20        5133.033 ▒        20.566  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderDirectConsole    thrpt    
   20        4942.596 ▒        23.209  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderFile             thrpt    
   20      909577.926 ▒     88906.601  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderMMap             thrpt    
   20      833703.975 ▒     89572.912  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderNoop             thrpt    
   20    61547491.272 ▒   2524642.607  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderRAF              thrpt    
   20      965524.181 ▒     72718.931  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderRewrite          thrpt    
   20     9253526.898 ▒    517494.853  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.baseline                 thrpt    
   20  2293541662.591 ▒ 150113683.307  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endConsole           thrpt    
   20        2304.321 ▒         2.614  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endDirectConsole     thrpt    
   20        1935.716 ▒       119.582  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endFile              thrpt    
   20      563155.556 ▒     43817.329  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endMMap              thrpt    
   20      508094.240 ▒     52209.469  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endNoop              thrpt    
   20     4721361.995 ▒    288775.276  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endRAF               thrpt    
   20      626471.836 ▒     33498.964  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endRewrite           thrpt    
   20     1811625.092 ▒    145719.109  ops/s
{noformat}

- {{"%JAVA_7_HOME%\bin\java" -jar log4j-perf/target/benchmarks.jar 
".*Log4j2AppenderComparisonBenchmark.*" -f 1 -wi 10 -i 20 -t 4}}

{noformat}
# Run complete. Total time: 00:09:33

Benchmark                                                               Mode  
Samples           Score           Error  Units
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderConsole          thrpt    
   20        5151.859 ▒        71.575  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderDirectConsole    thrpt    
   20        4919.327 ▒       103.566  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderFile             thrpt    
   20      874676.625 ▒    612002.570  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderMMap             thrpt    
   20     2101308.459 ▒    400654.184  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderNoop             thrpt    
   20     9216882.402 ▒   1357756.139  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderRAF              thrpt    
   20      862763.396 ▒    449968.360  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderRewrite          thrpt    
   20    11624629.409 ▒    107105.665  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.baseline                 thrpt    
   20  7654471239.430 ▒ 159987325.216  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endConsole           thrpt    
   20        2264.706 ▒        44.913  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endDirectConsole     thrpt    
   20        1976.890 ▒        37.811  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endFile              thrpt    
   20      331150.089 ▒    272806.235  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endMMap              thrpt    
   20     1076868.914 ▒    350037.687  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endNoop              thrpt    
   20     5547536.175 ▒     42000.690  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endRAF               thrpt    
   20      308153.668 ▒     90226.623  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endRewrite           thrpt    
   20     4239278.510 ▒    264367.247  ops/s
{noformat}

My HW profile is attached FYI.


was (Author: garydgregory):
I still can't say if the code make sense, I try to look tomorrow. For now, here 
are some test results.
- Checked out the branch
- mvn clean install -DskipTests
- {{"%JAVA_7_HOME%\bin\java" -jar log4j-perf/target/benchmarks.jar 
".*Log4j2AppenderComparisonBenchmark.*" -f 1 -wi 10 -i 20}}

{noformat}
# Run complete. Total time: 00:09:15

Benchmark                                                               Mode  
Samples           Score           Error  Units
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderConsole          thrpt    
   20        5133.033 ▒        20.566  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderDirectConsole    thrpt    
   20        4942.596 ▒        23.209  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderFile             thrpt    
   20      909577.926 ▒     88906.601  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderMMap             thrpt    
   20      833703.975 ▒     89572.912  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderNoop             thrpt    
   20    61547491.272 ▒   2524642.607  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderRAF              thrpt    
   20      965524.181 ▒     72718.931  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderRewrite          thrpt    
   20     9253526.898 ▒    517494.853  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.baseline                 thrpt    
   20  2293541662.591 ▒ 150113683.307  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endConsole           thrpt    
   20        2304.321 ▒         2.614  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endDirectConsole     thrpt    
   20        1935.716 ▒       119.582  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endFile              thrpt    
   20      563155.556 ▒     43817.329  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endMMap              thrpt    
   20      508094.240 ▒     52209.469  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endNoop              thrpt    
   20     4721361.995 ▒    288775.276  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endRAF               thrpt    
   20      626471.836 ▒     33498.964  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endRewrite           thrpt    
   20     1811625.092 ▒    145719.109  ops/s
{noformat}

- {{"%JAVA_7_HOME%\bin\java" -jar log4j-perf/target/benchmarks.jar 
".*Log4j2AppenderComparisonBenchmark.*" -f 1 -wi 10 -i 20 -t 4}}

{noformat}
# Run complete. Total time: 00:09:33

Benchmark                                                               Mode  
Samples           Score           Error  Units
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderConsole          thrpt    
   20        5151.859 ▒        71.575  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderDirectConsole    thrpt    
   20        4919.327 ▒       103.566  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderFile             thrpt    
   20      874676.625 ▒    612002.570  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderMMap             thrpt    
   20     2101308.459 ▒    400654.184  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderNoop             thrpt    
   20     9216882.402 ▒   1357756.139  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderRAF              thrpt    
   20      862763.396 ▒    449968.360  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.appenderRewrite          thrpt    
   20    11624629.409 ▒    107105.665  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.baseline                 thrpt    
   20  7654471239.430 ▒ 159987325.216  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endConsole           thrpt    
   20        2264.706 ▒        44.913  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endDirectConsole     thrpt    
   20        1976.890 ▒        37.811  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endFile              thrpt    
   20      331150.089 ▒    272806.235  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endMMap              thrpt    
   20     1076868.914 ▒    350037.687  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endNoop              thrpt    
   20     5547536.175 ▒     42000.690  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endRAF               thrpt    
   20      308153.668 ▒     90226.623  ops/s
o.a.l.l.p.j.Log4j2AppenderComparisonBenchmark.end2endRewrite           thrpt    
   20     4239278.510 ▒    264367.247  ops/s
{noformat}

> Faster Console appender
> -----------------------
>
>                 Key: LOG4J2-1395
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1395
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Appenders
>    Affects Versions: 2.5, 2.6
>            Reporter: Mikael Ståldal
>
> The ConsoleAppender is much slower than the FileAppender.
> It would be nice to improve the performance of the ConsoleAppender.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to