logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remko Popma <rem...@yahoo.com>
Subject Re: async logger on slow single core env performs 50% worse than log4j v1
Date Mon, 29 Jul 2013 14:15:27 GMT
Hang on! By fish tagging do you mean you use logger#entry, #exit, #catching?

These methods walk the stack trace to determine the location (class, method) which will give
you a *huge* performance penalty! If you&#x27;re using async logging this is 20x slower,
for sync logging (slower to begin with) it&#x27;ll be 5x slower. At least these are the
numbers I got on enterprise server hardware, but I can&#x27;t imagine this improving on
embedded HW...

MDC has been improved in 2.0-beta7 with a copy-on-write impl and should not be much overhead

The quickest way to test the performance impact of fish tagging is by specifying a pattern
that does not have location symbols. (http://logging.apache.org/log4j/2.x/manual/layouts.html#LocationInformation)

I suspect you&#x27;ll see a large improvement. 
You may need to replace logger.entry/exit with logger.trace(&quot;entered methodX&quot;)...

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message