logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Grobmeier <grobme...@gmail.com>
Subject Re: Performance tests log4j 1, logback, log4j 2
Date Mon, 05 Nov 2012 13:32:09 GMT
On Mon, Nov 5, 2012 at 2:25 PM, Gary Gregory <garydgregory@gmail.com> wrote:
> Avg is one measure, but at the Olympics, it's the fastest time that matters
> ;)

haha :)

> The other aspect is how much garbage is generated. If a test is long enough,
> then GC will affect the numbers more.

I did run it from IntelliJ and expect to run in a new VM. For the
beta-1 and beta-2 I commented the logback/log4j1 tests, this might
have an impact. It would only look more worse for beta-2 :-)

>
> Gary
>
>
> On Mon, Nov 5, 2012 at 8:21 AM, Christian Grobmeier <grobmeier@gmail.com>
> wrote:
>>
>> I disagree... if there are enough runs the avg matters. Its some rule
>> from statistic for which i miss the translation. While I agree that
>> minimum runs are interesting they are pretty much an exception as long
>> as the avg is not near to the min/max run.
>>
>> On Mon, Nov 5, 2012 at 2:14 PM, Gary Gregory <garydgregory@gmail.com>
>> wrote:
>> > Just to make it clear, the avg does not matter IMO, because one "bad"
>> > run
>> > with some weird GC or OS GC or OS disk swap will mess up the entire
>> > result
>> > set for a product. What should matter is the best time.
>> >
>> > Gary
>> >
>> >
>> > On Mon, Nov 5, 2012 at 8:06 AM, Gary Gregory <garydgregory@gmail.com>
>> > wrote:
>> >>
>> >> Actually, by one measure, things are not so good.
>> >>
>> >> Look at the best time for each product:
>> >>
>> >> log4j 1.x    logback    log4j 2.x rv1405687 (trunk)
>> >> Min    1,608    1587    2026
>> >>
>> >> See:
>> >>
>> >> https://docs.google.com/spreadsheet/ccc?key=0Am0PFB1HWT2mdG80N0NHVl9UNmR0elAyTXJoTm1KWVE#gid=0
>> >>
>> >> Gary
>> >>
>> >>
>> >> On Mon, Nov 5, 2012 at 7:06 AM, Christian Grobmeier
>> >> <grobmeier@gmail.com>
>> >> wrote:
>> >>>
>> >>> Hi all,
>> >>>
>> >>> I just run the PerformanceComparison test and it showed me that log4j
>> >>> 2 is the clear winner of the game. Then I runned it again... and
>> >>> again... and again. The results were so different that I suddenly
>> >>> realized that there is no comparison possible.
>> >>>
>> >>> In total I made it 10 times and wrote all the results in this doc:
>> >>>
>> >>>
>> >>> https://docs.google.com/spreadsheet/ccc?key=0Aqmq9ym36L2DdHpsek1vN2xzVjdfS29idjcyTkFjVUE
>> >>>
>> >>> I then summed up all the results, divided with 15 and get an average.
>> >>> The average is like:
>> >>>
>> >>> Log4j 1.x : 2314 ns
>> >>> logback: 2116 ns
>> >>> log4j 2.x: 2386 ns
>> >>>
>> >>> The difference is pretty small. In the first runs logback performed
>> >>> not so good, but in the latter runs logback was always better than the
>> >>> rest.
>> >>>
>> >>> That said, I think it is safe to say that all logging frameworks have
>> >>> an excellent performance. logback performs slightly better with 200ns
>> >>> in avg. But given the fact we are speaking of 10.000.000 debug calls
I
>> >>> would say this does not matter so much. With log4j 2 still in beta I
>> >>> would think that we might improve performance a little more in time.
>> >>>
>> >>> Any comments to this observation?
>> >>>
>> >>> Cheers
>> >>> Christian
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>> >>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>> >>>
>> >>
>> >>
>> >>
>> >> --
>> >> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> >> JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
>> >> Spring Batch in Action: http://bit.ly/bqpbCK
>> >> Blog: http://garygregory.wordpress.com
>> >> Home: http://garygregory.com/
>> >> Tweet! http://twitter.com/GaryGregory
>> >
>> >
>> >
>> >
>> > --
>> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> > JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
>> > Spring Batch in Action: http://bit.ly/bqpbCK
>> > Blog: http://garygregory.wordpress.com
>> > Home: http://garygregory.com/
>> > Tweet! http://twitter.com/GaryGregory
>>
>>
>>
>> --
>> http://www.grobmeier.de
>> https://www.timeandbill.de
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
> Spring Batch in Action: http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory



--
http://www.grobmeier.de
https://www.timeandbill.de

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


Mime
View raw message