<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:36:12 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>[OVSDB-364] A tons of unnecessary read operations in the switch update processing control flow</title>
                <link>https://jira.opendaylight.org/browse/OVSDB-364</link>
                <project id="10158" key="OVSDB">ovsdb</project>
                    <description>&lt;p&gt;The performance of the OVSDB Southbound Plugin to process Update Notification from Open vSwitch is really slow. One of reasons of the bad performance is that the plugin does a lot of unnecessary read operations on MD-SAL. The run() method of the TransactionInvokerImpl class calls a lot of the unnecessary read operations. This has a lot of bad impact, especially when we run several OpenDaylight nodes as a cluster in which an OpenDaylight node sometimes needs to communicate with another node (shard leader) to get data during the read operation.&lt;/p&gt;


&lt;p&gt;We are thinking this bad performance probably causes the &lt;a href=&quot;https://jira.opendaylight.org/browse/NETVIRT-5&quot; title=&quot;Instances in Compute node not able to reach dhcp&quot; class=&quot;issue-link&quot; data-issue-key=&quot;NETVIRT-5&quot;&gt;&lt;del&gt;NETVIRT-5&lt;/del&gt;&lt;/a&gt; which is a critical bug for NetVirt.&lt;br/&gt;
Therefore, we need to fix this problem. Especially, in this bug report, I would like to focus on removing the unnecessary read operations during processing Update Notification.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="22056">OVSDB-364</key>
            <summary>A tons of unnecessary read operations in the switch update processing control flow</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                                <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="10000">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="Hideyuki1985">Hideyuki Tai</reporter>
                        <labels>
                    </labels>
                <created>Fri, 19 Aug 2016 03:14:52 +0000</created>
                <updated>Thu, 19 Oct 2017 21:26:58 +0000</updated>
                            <resolved>Tue, 23 Aug 2016 15:06:41 +0000</resolved>
                                    <version>unspecified</version>
                                                    <component>Southbound.Open_vSwitch</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="41505" author="hideyuki.tai@necam.com" created="Fri, 19 Aug 2016 03:16:30 +0000"  >&lt;p&gt;I think the master, stable/boron, and stable/beryllium branches have this issue.&lt;/p&gt;</comment>
                            <comment id="41506" author="hideyuki.tai@necam.com" created="Fri, 19 Aug 2016 03:41:53 +0000"  >&lt;p&gt;I&apos;ve noticed the OVSDB Southbound Plugin ALWAYS calls SouthboundUtil.readNode() SEVERAL TIMES on processing ONE Update Notification regardless on the contents of the Update Notification.&lt;br/&gt;
That&apos;s because some classes which extends AbstractTransactionCommand always call SouthboundUtil.readNode() in any conditions.&lt;/p&gt;

&lt;p&gt;For example, please check the OvsdbQueueRemovedCommand.java.&lt;/p&gt;

&lt;p&gt;    &lt;span class=&quot;error&quot;&gt;&amp;#91;OvsdbQueueRemovedCommand.java&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;        49     @Override&lt;br/&gt;
        50     public void execute(ReadWriteTransaction transaction) {&lt;br/&gt;
        51         final InstanceIdentifier&amp;lt;Node&amp;gt; nodeIId = getOvsdbConnectionInstance().getInstanceIdentifier();&lt;br/&gt;
        52         final Optional&amp;lt;Node&amp;gt; ovsdbNode = SouthboundUtil.readNode(transaction, nodeIId);&lt;br/&gt;
        53         if (ovsdbNode.isPresent()) {&lt;/p&gt;

&lt;p&gt;Here, this execute() method calls the SouthboundUtil.readNode() method without any condition check.&lt;/p&gt;


&lt;p&gt;However, I think this method doesn&apos;t need the node information when it doesn&apos;t have any data to process, so this method should check condition first as follows.&lt;/p&gt;

&lt;p&gt;    &lt;span class=&quot;error&quot;&gt;&amp;#91;OvsdbQueueRemovedCommand.java (Modification proposed)&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;        47     @Override&lt;br/&gt;
        48     public void execute(ReadWriteTransaction transaction) {&lt;br/&gt;
        49         if (removedQueueRows == null || removedQueueRows.isEmpty() ) &lt;/p&gt;
{
        50             return
        51         }
&lt;p&gt;        52&lt;br/&gt;
        53         final InstanceIdentifier&amp;lt;Node&amp;gt; nodeIId = getOvsdbConnectionInstance().getInstanceIdentifier();&lt;br/&gt;
        54         final Optional&amp;lt;Node&amp;gt; ovsdbNode = SouthboundUtil.readNode(transaction, nodeIId);&lt;/p&gt;


&lt;p&gt;Please note that every time run() method of the TransactionInvokerImpl class calls execute() method of OvsdbOperationalCommandAggregator class, execute() method of OvsdbQueueRemovedCommand class is always called by OvsdbOperationalCommandAggregator class.&lt;br/&gt;
I mean the OVSDB Southbound Plugin ALWAYS calls the exeucte() of the OvsdbQueueRemovedCommand class and calls the SouthboundUtil.readNode() every time the plugin receives Update Notification from Open vSwitch regardless on the contents of the Update Notification, even if Update Notification doesn&apos;t have any updates regarding to Queue table.&lt;/p&gt;

&lt;p&gt;I&apos;m writing a patch for this.&lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/44374/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/44374/&lt;/a&gt;&lt;br/&gt;
I plan to modify other classes which extends AbstractTransactionCommand in the above patch.&lt;/p&gt;</comment>
                            <comment id="41507" author="hideyuki.tai@necam.com" created="Mon, 22 Aug 2016 22:04:15 +0000"  >&lt;p&gt;To make it easy for users to know the performance issue happens due to Update Notification from OVS, I&apos;ve pushed a patch to log events regarding to the performance issue.&lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/44520/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/44520/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And, the log messages which the above patch introduces also helps developers to improve the scalability, and identify the root cause of issues such as &lt;a href=&quot;https://jira.opendaylight.org/browse/NETVIRT-5&quot; title=&quot;Instances in Compute node not able to reach dhcp&quot; class=&quot;issue-link&quot; data-issue-key=&quot;NETVIRT-5&quot;&gt;&lt;del&gt;NETVIRT-5&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="41508" author="hideyuki.tai@necam.com" created="Tue, 23 Aug 2016 00:04:10 +0000"  >&lt;p&gt;There are patches which removed unnecessary read operations:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/44526/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/44526/&lt;/a&gt; (master)&lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/44374/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/44374/&lt;/a&gt; (stable/boron)&lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/44525/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/44525/&lt;/a&gt; (stable/beryllium)&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_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6475</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=6475]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i0229z:</customfieldvalue>

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