<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:52:59 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>[CONTROLLER-426] Performance Issue: Inefficient implementation of readOperationalData method.</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-426</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;I have an ODL controller running with 198 nodes; each node with 104 NodeConnectors.&lt;/p&gt;

&lt;p&gt;My code queries each of the 198 nodes for the nodeConnectors using the following code:&lt;/p&gt;

&lt;p&gt;	public static List&amp;lt;NodeConnector&amp;gt; getNodeConnectors(DataProviderService dps, String nodeId) {&lt;/p&gt;

&lt;p&gt;		// Create a Type-safe reader so that casting isn&apos;t necessary.&lt;br/&gt;
		TypeSafeDataReader reader = TypeSafeDataReader.forReader(dps);&lt;/p&gt;

&lt;p&gt;		// Create the inventory node Id key:&lt;br/&gt;
		NodeId inventoryNodeId = new NodeId(nodeId);&lt;br/&gt;
		NodeKey inventoryNodeKey = new NodeKey(inventoryNodeId);&lt;/p&gt;

&lt;p&gt;		// Get the child node Id:&lt;br/&gt;
		InstanceIdentifierBuilder&amp;lt;Node&amp;gt; nodeChild = InstanceIdentifier.builder(Nodes.class).child(Node.class,&lt;br/&gt;
				inventoryNodeKey);&lt;br/&gt;
		InstanceIdentifier&amp;lt;Node&amp;gt; nodePath = nodeChild.toInstance();&lt;/p&gt;

&lt;p&gt;		// Read the node from the Operational Data store:&lt;br/&gt;
		Node node = reader.readOperationalData(nodePath);&lt;/p&gt;

&lt;p&gt;		if (node == null) &lt;/p&gt;
{
			throw new RuntimeException(&quot;MD-SAL Node not found for nodeId:&quot; + nodeId);
		}

&lt;p&gt;		return node.getNodeConnector();&lt;br/&gt;
	}&lt;/p&gt;


&lt;p&gt;This takes about 12 seconds to run on a standard Windows desktop.&lt;/p&gt;

&lt;p&gt;An Analysis of the CPU performance using JProfiler shows a very high number of calls to SchemaAwareDataStoreAdapter$MergeFirstLevelReader$2.apply, with the bulk of CPU time spent in this method (specifically Map.equals).&lt;/p&gt;

&lt;p&gt;See attachment for screen snapshot of the JProfiler analysis.&lt;/p&gt;


&lt;p&gt;For any questions, feel free to contact.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Windows&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="24980">CONTROLLER-426</key>
            <summary>Performance Issue: Inefficient implementation of readOperationalData method.</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="ntraxler@ciena.com">Norman Traxler</reporter>
                        <labels>
                    </labels>
                <created>Tue, 29 Apr 2014 13:48:00 +0000</created>
                <updated>Tue, 25 Jul 2023 08:23:42 +0000</updated>
                            <resolved>Thu, 15 May 2014 16:14:35 +0000</resolved>
                                                                    <component>mdsal</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="48184" author="ntraxler@ciena.com" created="Tue, 29 Apr 2014 13:48:00 +0000"  >&lt;p&gt;Attachment MD-salmodePerfIssuegetNodeConnectors.png has been added with description: JProfiler screen snapshot of performance bottleneck.&lt;/p&gt;</comment>
                            <comment id="48183" author="ntraxler@ciena.com" created="Thu, 15 May 2014 16:14:35 +0000"  >&lt;p&gt;Picked up changes May 6 that have resolved the issue (due to bug fix 499).&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="13370" name="MD-salmodePerfIssuegetNodeConnectors.png" size="158699" author="ntraxler@ciena.com" created="Tue, 29 Apr 2014 13:48:00 +0000"/>
                    </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>902</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=902]]></customfieldvalue>

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

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