[CONTROLLER-426] Performance Issue: Inefficient implementation of readOperationalData method. Created: 29/Apr/14 Updated: 25/Jul/23 Resolved: 15/May/14 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | mdsal |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Norman Traxler | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Windows |
||
| Attachments: |
|
| External issue ID: | 902 |
| Description |
|
I have an ODL controller running with 198 nodes; each node with 104 NodeConnectors. My code queries each of the 198 nodes for the nodeConnectors using the following code: public static List<NodeConnector> getNodeConnectors(DataProviderService dps, String nodeId) { // Create a Type-safe reader so that casting isn't necessary. // Create the inventory node Id key: // Get the child node Id: // Read the node from the Operational Data store: if (node == null) { throw new RuntimeException("MD-SAL Node not found for nodeId:" + nodeId); } return node.getNodeConnector(); This takes about 12 seconds to run on a standard Windows desktop. 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). See attachment for screen snapshot of the JProfiler analysis. For any questions, feel free to contact. |
| Comments |
| Comment by Norman Traxler [ 29/Apr/14 ] |
|
Attachment MD-salmodePerfIssuegetNodeConnectors.png has been added with description: JProfiler screen snapshot of performance bottleneck. |
| Comment by Norman Traxler [ 15/May/14 ] |
|
Picked up changes May 6 that have resolved the issue (due to bug fix 499). |