<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:27:50 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[ODLPARENT-176] Reduce GC pressure and lock contention by ditching the PaxOsgi log appender</title>
                <link>https://jira.opendaylight.org/browse/ODLPARENT-176</link>
                <project id="10149" key="ODLPARENT">odlparent</project>
                    <description>&lt;p&gt;I&apos;m looking at a Java Flight Recording obtained from (internal) scale lab testing, based on Oxygen SR3 code, and thought it was curious / interesting that the following code paths appears very frequently as a big &quot;TLAB allocation&quot;.&lt;/p&gt;

&lt;p&gt;What&apos;s interesting is that in a real world scale test this is the only log that shows up as a big &quot;TLAB allocation&quot; - so it seems to me that a closer look at this code is worth it. Perhaps it&apos;s even a simple case of reducing an over INFO to a DEBUG log.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;StackTraceElement java.lang.Throwable.getStackTraceElement(&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;)	3875
StackTraceElement[] java.lang.Throwable.getOurStackTrace()	3875
StackTraceElement[] java.lang.Throwable.getStackTrace()	3875
StackTraceElement org.apache.logging.log4j.core.impl.Log4jLogEvent.calcLocation(&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;)	3771
StackTraceElement org.apache.logging.log4j.core.impl.MutableLogEvent.getSource()	3771
PaxLocationInfo org.ops4j.pax.logging.log4j2.internal.PaxLoggingEventImpl.getLocationInformation()	3771
void org.ops4j.pax.logging.log4j2.internal.PaxAppenderProxy.doAppend(PaxLoggingEvent)	3771
void org.ops4j.pax.logging.log4j2.appender.PaxOsgiAppender.append(LogEvent)	3771
void org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(LogEvent)	3771
void org.apache.logging.log4j.core.config.AppenderControl.callAppender0(LogEvent)	3771
void org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(LogEvent)	3771
void org.apache.logging.log4j.core.config.AppenderControl.callAppender(LogEvent)	3771
void org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LogEvent)	3771
void org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LogEvent)	3771
void org.apache.logging.log4j.core.config.LoggerConfig.log(LogEvent)	3771
void org.apache.logging.log4j.core.config.LoggerConfig.log(&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;, &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;, Marker, Level, Message, Throwable)	3771
void org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(Supplier, &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;, &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;, Marker, Level, Message, Throwable)	3771
void org.apache.logging.log4j.core.Logger.logMessage(&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;, Level, Marker, Message, Throwable)	3771
void org.ops4j.pax.logging.log4j2.internal.PaxLoggerImpl.doLog0(Level, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;, &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;, &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;, Throwable)	3771
void org.ops4j.pax.logging.log4j2.internal.PaxLoggerImpl.doLog(Level, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;, &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;, &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;, Throwable)	3771
void org.ops4j.pax.logging.log4j2.internal.PaxLoggerImpl.inform(&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;, Throwable)	3646
void org.ops4j.pax.logging.internal.TrackingLogger.inform(&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;, Throwable)	3646
void org.ops4j.pax.logging.slf4j.Slf4jLogger.info(&lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;, &lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;)	3542
List org.opendaylight.netvirt.vpnmanager.VpnUtil.getRts(VpnInstanceOpDataEntry, VpnTarget$VrfRTType)	3466
&lt;span class=&quot;code-object&quot;&gt;boolean&lt;/span&gt; org.opendaylight.netvirt.vpnmanager.VpnUtil.lambda$getVpnsImportingMyRoute$10(VpnInstanceOpDataEntry, VpnInstanceOpDataEntry)	3466
&lt;span class=&quot;code-object&quot;&gt;boolean&lt;/span&gt; org.opendaylight.netvirt.vpnmanager.VpnUtil$$Lambda$1872.1909057161.test(&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;)	3466
void java.util.stream.ReferencePipeline$2$1.accept(&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;)	3466
void java.util.stream.ReferencePipeline$2$1.accept(&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;)	3466
void java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Consumer)	3466
void java.util.stream.AbstractPipeline.copyInto(Sink, Spliterator)	3466
Sink java.util.stream.AbstractPipeline.wrapAndCopyInto(Sink, Spliterator)	3466
&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt; java.util.stream.ReduceOps$ReduceOp.evaluateSequential(PipelineHelper, Spliterator)	3466
&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt; java.util.stream.AbstractPipeline.evaluate(TerminalOp)	3466
&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt; java.util.stream.ReferencePipeline.collect(Collector)	3466
List org.opendaylight.netvirt.vpnmanager.VpnUtil.getVpnsImportingMyRoute(DataBroker, &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;)	3466
void org.opendaylight.netvirt.vpnmanager.populator.impl.L3vpnOverMplsGrePopulator.populateFib(L3vpnInput, WriteTransaction)	3466
void org.opendaylight.netvirt.vpnmanager.VpnInterfaceManager.processVpnInterfaceAdjacencies(BigInteger, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;, &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;, &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;, &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;, &lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt;, WriteTransaction, WriteTransaction, WriteTransaction, Interface)	3466
void org.opendaylight.netvirt.vpnmanager.VpnInterfaceManager.processVpnInterfaceUp(BigInteger, VpnInterface, &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;, &lt;span class=&quot;code-object&quot;&gt;boolean&lt;/span&gt;, WriteTransaction, WriteTransaction, WriteTransaction, Interface, &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt;)	3466
void org.opendaylight.netvirt.vpnmanager.InterfaceStateChangeListener.lambda$&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;$0(Interface, WriteTransaction, WriteTransaction, WriteTransaction)	3461
void org.opendaylight.netvirt.vpnmanager.InterfaceStateChangeListener$$Lambda$1690.1216649502.accept(&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;)	3461
ListenableFuture org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl.callWithNewWriteOnlyTransactionAndSubmit(CheckedConsumer)	3461
void org.opendaylight.netvirt.vpnmanager.InterfaceStateChangeListener.lambda$&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;$1(Interface, WriteTransaction, List, WriteTransaction)	3461
void org.opendaylight.netvirt.vpnmanager.InterfaceStateChangeListener$$Lambda$1673.843807247.accept(&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;)	3461
ListenableFuture org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl.callWithNewWriteOnlyTransactionAndSubmit(CheckedConsumer)	3461
void org.opendaylight.netvirt.vpnmanager.InterfaceStateChangeListener.lambda$&lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;$2(Interface, List, WriteTransaction)	3461
void org.opendaylight.netvirt.vpnmanager.InterfaceStateChangeListener$$Lambda$1660.1073420380.accept(&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;)	3461
ListenableFuture org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl.callWithNewWriteOnlyTransactionAndSubmit(CheckedConsumer)	3461
List org.opendaylight.netvirt.vpnmanager.InterfaceStateChangeListener.lambda$add$3(Interface)	3461
&lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt; org.opendaylight.netvirt.vpnmanager.InterfaceStateChangeListener$$Lambda$1654.1406813511.call()	3461
void org.opendaylight.infrautils.jobcoordinator.internal.JobCoordinatorImpl$MainTask.runWithUncheckedExceptionLogging()	3461
void org.opendaylight.infrautils.utils.concurrent.LoggingUncaughtThreadDeathContextRunnable.run()	3461
&lt;span class=&quot;code-object&quot;&gt;boolean&lt;/span&gt; java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec()	3461
&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; java.util.concurrent.ForkJoinTask.doExec()	3461
void java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinTask)	3461
void java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool$WorkQueue)	3461
void java.util.concurrent.ForkJoinWorkerThread.run()	3461&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="31021">ODLPARENT-176</key>
            <summary>Reduce GC pressure and lock contention by ditching the PaxOsgi log appender</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</priority>
                        <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10001">Won&apos;t Do</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="vorburger">Michael Vorburger</reporter>
                        <labels>
                    </labels>
                <created>Tue, 13 Nov 2018 13:29:54 +0000</created>
                <updated>Fri, 15 Mar 2019 17:44:36 +0000</updated>
                            <resolved>Fri, 15 Mar 2019 17:44:36 +0000</resolved>
                                    <version>3.1.4</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="65590" author="vorburger" created="Tue, 13 Nov 2018 17:02:41 +0000"  >&lt;p&gt;Hm, I&apos;ve just had a quick &lt;a href=&quot;https://github.com/opendaylight/netvirt/blob/stable/oxygen/vpnmanager/impl/src/main/java/org/opendaylight/netvirt/vpnmanager/VpnUtil.java&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;closer look at VpnUtil&lt;/a&gt; (not exactly the code used in this test; but doubtful something signifant related to this changed) and it looks perfectly harmless, nothing obvious jumps out:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
getRts(...) {
    &lt;span class=&quot;code-object&quot;&gt;String&lt;/span&gt; name = vpnInstance.getVpnInstanceName();
    ...
    LOG.info(&lt;span class=&quot;code-quote&quot;&gt;&quot;getRts: vpn targets not available &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; {}&quot;&lt;/span&gt;, name);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So this is ... &quot;normal&quot;, as in not an application specific issue? It&apos;s just a bit curious it only shows up here. &lt;/p&gt;

&lt;p&gt;I guess the real question here actually is why Pax Logging is doing a &lt;tt&gt;Throwable.getStackTraceElement()&lt;/tt&gt; for an INFO when we (hopefully!) don&apos;t have have that (expensive) option, the thing which provides stack trace locations logging switched on - that&apos;a a bit surprising, do you agree &lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=skitt&quot; class=&quot;user-hover&quot; rel=&quot;skitt&quot;&gt;skitt&lt;/a&gt; and &lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=tpantelis&quot; class=&quot;user-hover&quot; rel=&quot;tpantelis&quot;&gt;tpantelis&lt;/a&gt; ?&lt;/p&gt;

&lt;p&gt;We wouldn&apos;t, shouldn&apos;t (that&apos;s another story) run with INFO logging enabled in production scale tests, so I&apos;m tempted to just close this issue - it&apos;s probably not the biggest issue in object allocation and GC -we&apos;ve got bigger fish to fry.&lt;/p&gt;</comment>
                            <comment id="65593" author="rovarga" created="Tue, 13 Nov 2018 17:35:25 +0000"  >&lt;p&gt;pax-logging is using it to determine which bundle the call comes from. Change logging formatter to not include it and it&apos;s gonna disappear.&lt;/p&gt;</comment>
                            <comment id="65595" author="tpantelis" created="Tue, 13 Nov 2018 17:46:44 +0000"  >&lt;p&gt;It&apos;s getting location info - for line # maybe? I assume it does that for any log operation independent of level. It doesn&apos;t seem like that log message should be info - seems more like a warn - but if it occurs a lot and/or is expected to occur then it really should be debug.&lt;/p&gt;</comment>
                            <comment id="65639" author="vorburger" created="Wed, 14 Nov 2018 13:34:45 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=rovarga&quot; class=&quot;user-hover&quot; rel=&quot;rovarga&quot;&gt;rovarga&lt;/a&gt;, &lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=tpantelis&quot; class=&quot;user-hover&quot; rel=&quot;tpantelis&quot;&gt;tpantelis&lt;/a&gt; and &lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=skitt&quot; class=&quot;user-hover&quot; rel=&quot;skitt&quot;&gt;skitt&lt;/a&gt; Right, now I see... &lt;tt&gt;PaxOsgiAppender&lt;/tt&gt; it is. Let me move this issue from netvirt to odlparent, to make it more general. &amp;#8211; So, if there is even the slightest chance that ditching that OSGi specific appender helps with any runtime performance and garbagge collection overhead, then I&apos;d say why don&apos;t we do that. The loss of the Bundle in each log message won&apos;t be missed by anyone, I think; in particular because in ODL we have clean package names - so the Bundle &amp;amp; package information really is redundant with the package information. Therefore just so proposed in &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/77790/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;c/77790&lt;/a&gt; ...&lt;/p&gt;</comment>
                            <comment id="65672" author="skitt@redhat.com" created="Thu, 15 Nov 2018 14:52:23 +0000"  >&lt;blockquote&gt;&lt;p&gt;big &quot;TLAB allocation&quot;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;If it&#8217;s a TLAB allocation, it isn&#8217;t big.&lt;/p&gt;</comment>
                            <comment id="65673" author="rovarga" created="Thu, 15 Nov 2018 15:39:14 +0000"  >&lt;p&gt;I tend to agree: if it&apos;s worth emitting into logs (and thereby doing IO) it&apos;s probably not a huge deal. If this is showing up, it&apos;s probably because VpnUtil is being noisy &#8211; dial its logging down (in code or in config) instead...&lt;/p&gt;</comment>
                            <comment id="65692" author="vorburger" created="Fri, 16 Nov 2018 14:22:44 +0000"  >&lt;p&gt;I beg to differ..  it did show up, and it&apos;s simple enough to change, and we don&apos;t loose any (useful) functionality, so even there is even a chance that this helps reduce objection allocation and GC pressure, I really don&apos;t see a reason why we would not do this.&lt;/p&gt;

&lt;p&gt;Due to &lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=rovarga&quot; class=&quot;user-hover&quot; rel=&quot;rovarga&quot;&gt;rovarga&lt;/a&gt; -1 on &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/77790/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/77790/&lt;/a&gt; (quote: &quot;I am not against this, just against it being done without a major version bump. Downstream deployments can (and really are) expected to tweak logging anyway.&quot;) I&apos;m abandoning the proposed change for the short term and moving this issue to Fix Version odlparent 5.&lt;/p&gt;</comment>
                            <comment id="65698" author="vorburger" created="Fri, 16 Nov 2018 18:25:29 +0000"  >&lt;p&gt;Interesting update: Upon looking at a JFR again, I&apos;ve now noticed (missed this before) that our friend &lt;tt&gt;PaxOsgiAppender&lt;/tt&gt; also shows up as a problem in a completely different place, totally unrelated to Memory &amp;amp; GC: In JDK Mission Control&apos;s &quot;Lock Instances&quot; I have a big red exclamation mark and this text:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;The program context switches a lot and many threads wait on the same monitor. Consider using fewer threads, or try to decrease lock contention by other means.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The top #1 entry is something unrelated (Jetty; that may be normal), but the #2 &amp;amp; #4 spots are both ... &lt;tt&gt;PaxOsgiAppender&lt;/tt&gt;. Another good reason to get rid of this IMHO. (The #3 spot is &lt;tt&gt;log4j.core.appender.rolling.RollingFileManager.checkRollover&lt;/tt&gt;.)&lt;/p&gt;</comment>
                            <comment id="65699" author="tpantelis" created="Fri, 16 Nov 2018 18:43:50 +0000"  >&lt;p&gt;Maybe but, as Robert alluded to, if the PaxOsgiAppender is causing issues wrt load then we&apos;re probably logging too much unnecessarily which can lead to other issues. Let&apos;s first dial down VpnUtil logging.  I&apos;ll push a patch for that. &lt;/p&gt;</comment>
                            <comment id="65700" author="tpantelis" created="Fri, 16 Nov 2018 18:57:31 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/77906/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/77906/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="66557" author="rovarga" created="Fri, 15 Mar 2019 17:44:36 +0000"  >&lt;p&gt;As noted, downstreams are in control of how much they log, which should be reasonable amounts. Packagers are free to reconfigure logging (and will probably use something different than plain files just to allow automatic analysis).&lt;/p&gt;

&lt;p&gt;Let&apos;s leave things as they are.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03kfr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>