[ https://issues.apache.org/jira/browse/SOLR-11901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Erick Erickson resolved SOLR-11901. ----------------------------------- Fix Version/s: 7.4 Resolution: Done The problem statement is not accurate. %c (lowercase) does _not_ create a Throwable %C (uppercase) _does_ generate a Throwable and is the expensive one, and we don't have any of those any more in the Pattern Layouts. > Improve how logging collects class name information > --------------------------------------------------- > > Key: SOLR-11901 > URL: https://issues.apache.org/jira/browse/SOLR-11901 > Project: Solr > Issue Type: Improvement > Reporter: Varun Thacker > Assignee: Varun Thacker > Priority: Minor > Fix For: 7.4 > > > The log4j.properties that we ship with Solr has this Pattern > {code} > %d{yyyy-MM-dd HH:mm:ss.SSS} %-5p (%t) [%X{collection} %X{shard} %X{replica} > %X{core}] %c{1.} %m%n > {code} > The {{%c}} collects class name information ( more on this > http://logging.apache.org/log4j/2.x/manual/async.html#Location ) which > creates a throwable ( > https://github.com/apache/log4j/blob/trunk/src/main/java/org/apache/log4j/spi/LoggingEvent.java#L253 > ) and it can be expensive > Here is the stack trace excerpt from the JFR capture which lead to this issue > {code} > org.apache.log4j.spi.LoggingEvent.getLocationInformation() > org.apache.log4j.helpers.PatternParser$ClassNamePatternConverter.getFullyQualifiedName(LoggingEvent) > org.apache.log4j.helpers.PatternParser$NamedPatternConverter.convert(LoggingEvent) > org.apache.log4j.helpers.PatternConverter.format(StringBuffer, LoggingEvent) > org.apache.log4j.PatternLayout.format(LoggingEvent) > org.apache.log4j.WriterAppender.subAppend(LoggingEvent) > org.apache.log4j.RollingFileAppender.subAppend(LoggingEvent) > ... > org.apache.solr.update.processor.LogUpdateProcessorFactory$LogUpdateProcessor.finish() > 214,658 32.42 0 > {code} > We could remove capturing the class name information from the default config > but ideally capturing the classname is useful. So if we can find a way that > doesn't need to create a throwable then it's ideal. > Here is an interesting read : > https://shipilev.net/blog/2014/exceptional-performance/ -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org