Slow BridgeBridgeTopologie discovery with enlinkd.

Description

The BridgeBridgeTopologie discovery in a big installation of an customer ( over 7000 nodes and 12000 links) is very slow and need sometimes hours for a single node.
Picture 1 shows the amount of time that enlinkd needs for the BridgeBridgeTopologie the have 34 active layer2 interfaces. The other Protocols (cdp and lldp) are as fast as usual.
In a test run with only one Node enlinkd needs only seconds for the discovery (Picture 2).
I add the logfiles of enlinkd, eventd and the output.log.
The JDBC-Errors in eventd.log seems to be caused by reimport form a big amount of Nodes with the REST-API.

Environment

OpenNMS runs an three dedicated server, one for the Database, one for the GUI and one for the monitoring. The server have more than enough memory and CPU power so this couldn't be the problem.

Acceptance / Success Criteria

None

Attachments

8

Lucidchart Diagrams

Activity

Show:

Antonio Russo April 2, 2016 at 10:01 PM

Merged in Foundation 2016!!!!!!

MacBook-Pro-di-Antonio-Russo:opennms antonio$ git merge features/enlinkd-foundation-2016
Removing opennms-webapp/src/main/webapp/element/routeipnode.jsp
Removing opennms-webapp/src/main/webapp/element/bridgenode.jsp
Auto-merging opennms-services/src/main/java/org/opennms/netmgt/enlinkd/Node.java
Removing opennms-model/src/test/java/org/opennms/netmgt/model/topology/DefaultBridgeTopologyTest.java
Removing opennms-model/src/main/java/org/opennms/netmgt/model/topology/LinkableNode.java
Removing opennms-model/src/main/java/org/opennms/netmgt/model/topology/BridgeTopology.java
Removing opennms-model/src/main/java/org/opennms/netmgt/model/topology/AtInterface.java
Merge made by the 'recursive' strategy.
.../org/opennms/netmgt/dao/api/BridgeBridgeLinkDao.java | 5 +
.../org/opennms/netmgt/dao/api/BridgeElementDao.java | 3 +
.../org/opennms/netmgt/dao/api/BridgeMacLinkDao.java | 4 +
.../org/opennms/netmgt/dao/api/BridgeStpLinkDao.java | 3 +
.../org/opennms/netmgt/dao/api/BridgeTopologyDao.java | 30 +
.../java/org/opennms/netmgt/dao/api/CdpElementDao.java | 1 +
.../main/java/org/opennms/netmgt/dao/api/CdpLinkDao.java | 2 +
.../java/org/opennms/netmgt/dao/api/IpNetToMediaDao.java | 3 +
.../java/org/opennms/netmgt/dao/api/IsIsElementDao.java | 2 +
.../java/org/opennms/netmgt/dao/api/IsIsLinkDao.java | 3 +
.../java/org/opennms/netmgt/dao/api/LldpElementDao.java | 4 +-
.../java/org/opennms/netmgt/dao/api/LldpLinkDao.java | 4 +-
.../java/org/opennms/netmgt/dao/api/OspfElementDao.java | 2 +
.../java/org/opennms/netmgt/dao/api/OspfLinkDao.java | 2 +
.../opennms/netmgt/dao/BridgeTopologyDaoInMemory.java | 242 +
.../dao/hibernate/BridgeBridgeLinkDaoHibernate.java | 13 +
.../netmgt/dao/hibernate/BridgeElementDaoHibernate.java | 9 +
.../netmgt/dao/hibernate/BridgeMacLinkDaoHibernate.java | 28 +-
.../netmgt/dao/hibernate/BridgeStpLinkDaoHibernate.java | 7 +
.../netmgt/dao/hibernate/CdpElementDaoHibernate.java | 8 +
.../netmgt/dao/hibernate/CdpLinkDaoHibernate.java | 19 +-
.../netmgt/dao/hibernate/IpNetToMediaDaoHibernate.java | 7 +
.../netmgt/dao/hibernate/IsIsElementDaoHibernate.java | 10 +
.../netmgt/dao/hibernate/IsIsLinkDaoHibernate.java | 22 +-
.../netmgt/dao/hibernate/LldpElementDaoHibernate.java | 7 +
.../netmgt/dao/hibernate/LldpLinkDaoHibernate.java | 19 +-
.../netmgt/dao/hibernate/OspfElementDaoHibernate.java | 7 +
.../netmgt/dao/hibernate/OspfLinkDaoHibernate.java | 21 +-
.../META-INF/opennms/applicationContext-dao.xml | 5 +
.../java/org/opennms/netmgt/model/BridgeBridgeLink.java | 6 +-
.../java/org/opennms/netmgt/model/BridgeMacLink.java | 5 +-
.../org/opennms/netmgt/model/topology/AtInterface.java | 115 -
.../java/org/opennms/netmgt/model/topology/Bridge.java | 58 +
.../opennms/netmgt/model/topology/BridgeMacLinkHash.java | 53 +
.../org/opennms/netmgt/model/topology/BridgePort.java | 93 +
.../opennms/netmgt/model/topology/BridgeTopology.java | 609 -
.../opennms/netmgt/model/topology/BroadcastDomain.java | 233 +
.../org/opennms/netmgt/model/topology/LinkableNode.java | 333 -
.../org/opennms/netmgt/model/topology/SharedSegment.java | 334 +
.../opennms/netmgt/model/topology/SimpleConnection.java | 25 +
.../netmgt/model/topology/DefaultBridgeTopologyTest.java | 1232 -
.../java/org/opennms/netmgt/enlinkd/EnhancedLinkd.java | 104 +-
.../org/opennms/netmgt/enlinkd/EnhancedLinkdService.java | 148 +-
.../opennms/netmgt/enlinkd/EnhancedLinkdServiceImpl.java | 1698 +-
.../src/main/java/org/opennms/netmgt/enlinkd/Node.java | 8 +-
.../java/org/opennms/netmgt/enlinkd/NodeDiscovery.java | 68 +-
.../org/opennms/netmgt/enlinkd/NodeDiscoveryBridge.java | 145 +-
.../netmgt/enlinkd/NodeDiscoveryBridgeTopology.java | 1043 +
.../org/opennms/netmgt/enlinkd/NodeDiscoveryCdp.java | 5 +-
.../netmgt/enlinkd/NodeDiscoveryIpNetToMedia.java | 4 +-
.../org/opennms/netmgt/enlinkd/NodeDiscoveryIsis.java | 3 +-
.../org/opennms/netmgt/enlinkd/NodeDiscoveryLldp.java | 3 +-
.../org/opennms/netmgt/enlinkd/NodeDiscoveryOspf.java | 5 +-
.../opennms/applicationContext-enhancedLinkd.xml | 1 +
.../org/opennms/netmgt/enlinkd/BroadcastDomainTest.java | 740 +
.../org/opennms/netmgt/enlinkd/EnLinkdBuilderITCase.java | 16 +
.../test/java/org/opennms/netmgt/enlinkd/EnLinkdIT.java | 429 +-
.../org/opennms/netmgt/enlinkd/EnLinkdTestHelper.java | 2125 +-
.../java/org/opennms/netmgt/enlinkd/Nms4930EnIT.java | 426 +-
.../java/org/opennms/netmgt/enlinkd/Nms7918EnIT.java | 1213 +
.../org/opennms/netmgt/nb/Nms7918NetworkBuilder.java | 93 +
.../java/org/opennms/netmgt/nb/NmsNetworkBuilder.java | 43 +
.../opennms/applicationContext-enhancedLinkdTest.xml | 4 +
.../src/test/resources/linkd/nms7918/asw01.txt | 4756 +
.../src/test/resources/linkd/nms7918/osp.ess01.txt | 894 +
.../src/test/resources/linkd/nms7918/ospedale-wl1.txt | 711 +
.../src/test/resources/linkd/nms7918/pe01.txt | 126154 +++++++++++++++++++++
.../src/test/resources/linkd/nms7918/sam.asw01.txt | 9491 ++
.../src/test/resources/linkd/nms7918/stc.asw01.txt | 4603 +
.../java/org/opennms/web/enlinkd/BridgeLinkNode.java | 51 +-
.../org/opennms/web/enlinkd/BridgeLinkRemoteNode.java | 80 +-
.../org/opennms/web/enlinkd/BridgeLinkSharedHost.java | 70 +
.../main/java/org/opennms/web/enlinkd/CdpLinkNode.java | 7 +-
.../org/opennms/web/enlinkd/EnLinkdElementFactory.java | 1198 +-
.../main/java/org/opennms/web/enlinkd/IsisLinkNode.java | 6 +-
.../main/java/org/opennms/web/enlinkd/LldpLinkNode.java | 6 +-
.../java/org/opennms/web/enlinkd/NodeLinkBridge.java | 73 +-
.../main/java/org/opennms/web/enlinkd/OspfLinkNode.java | 24 +-
opennms-webapp/src/main/webapp/element/bridgenode.jsp | 213 -
opennms-webapp/src/main/webapp/element/linkednode.jsp | 160 +-
opennms-webapp/src/main/webapp/element/routeipnode.jsp | 193 -
81 files changed, 156129 insertions, 4473 deletions
create mode 100644 opennms-dao-api/src/main/java/org/opennms/netmgt/dao/api/BridgeTopologyDao.java
create mode 100644 opennms-dao/src/main/java/org/opennms/netmgt/dao/BridgeTopologyDaoInMemory.java
delete mode 100644 opennms-model/src/main/java/org/opennms/netmgt/model/topology/AtInterface.java
create mode 100644 opennms-model/src/main/java/org/opennms/netmgt/model/topology/Bridge.java
create mode 100644 opennms-model/src/main/java/org/opennms/netmgt/model/topology/BridgeMacLinkHash.java
create mode 100644 opennms-model/src/main/java/org/opennms/netmgt/model/topology/BridgePort.java
delete mode 100644 opennms-model/src/main/java/org/opennms/netmgt/model/topology/BridgeTopology.java
create mode 100644 opennms-model/src/main/java/org/opennms/netmgt/model/topology/BroadcastDomain.java
delete mode 100644 opennms-model/src/main/java/org/opennms/netmgt/model/topology/LinkableNode.java
create mode 100644 opennms-model/src/main/java/org/opennms/netmgt/model/topology/SharedSegment.java
create mode 100644 opennms-model/src/main/java/org/opennms/netmgt/model/topology/SimpleConnection.java
delete mode 100644 opennms-model/src/test/java/org/opennms/netmgt/model/topology/DefaultBridgeTopologyTest.java
rename opennms-model/src/main/java/org/opennms/netmgt/model/topology/LinkableSnmpNode.java => opennms-services/src/main/java/org/opennms/netmgt/enlinkd/Node.java (95%)
create mode 100644 opennms-services/src/main/java/org/opennms/netmgt/enlinkd/NodeDiscoveryBridgeTopology.java
create mode 100644 opennms-services/src/test/java/org/opennms/netmgt/enlinkd/BroadcastDomainTest.java
create mode 100644 opennms-services/src/test/java/org/opennms/netmgt/enlinkd/Nms7918EnIT.java
create mode 100644 opennms-services/src/test/java/org/opennms/netmgt/nb/Nms7918NetworkBuilder.java
create mode 100644 opennms-services/src/test/resources/linkd/nms7918/asw01.txt
create mode 100644 opennms-services/src/test/resources/linkd/nms7918/osp.ess01.txt
create mode 100644 opennms-services/src/test/resources/linkd/nms7918/ospedale-wl1.txt
create mode 100644 opennms-services/src/test/resources/linkd/nms7918/pe01.txt
create mode 100644 opennms-services/src/test/resources/linkd/nms7918/sam.asw01.txt
create mode 100644 opennms-services/src/test/resources/linkd/nms7918/stc.asw01.txt
create mode 100644 opennms-webapp/src/main/java/org/opennms/web/enlinkd/BridgeLinkSharedHost.java
delete mode 100644 opennms-webapp/src/main/webapp/element/bridgenode.jsp
delete mode 100644 opennms-webapp/src/main/webapp/element/routeipnode.jsp
MacBook-Pro-di-Antonio-Russo:opennms antonio$ git push
Counting objects: 12, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 311 bytes | 0 bytes/s, done.
Total 2 (delta 1), reused 0 (delta 0)
To git@github.com:OpenNMS/opennms.git
7600a7b..99b0714 foundation-2016 -> foundation-2016

Antonio Russo April 2, 2016 at 12:26 PM

MacBook-Pro-di-Antonio-Russo:opennms antonio$ git cherry-pick 30c46e8513b98a95f15477295184ddb46a6bd267
[features/enlinkd-foundation-2016 7fa861e] : slow topology bridge discover
2 files changed, 127 insertions, 101 deletions
MacBook-Pro-di-Antonio-Russo:opennms antonio$ git cherry-pick dbe1650de79f4152af8c49fc7b6a55b8891029f3
[features/enlinkd-foundation-2016 86e5a5d] : Fix Null Pointer Exception
1 file changed, 12 insertions, 14 deletions
MacBook-Pro-di-Antonio-Russo:opennms antonio$ git cherry-pick aec13fc7b2a1c04540b3cfd744053d4952970080
[features/enlinkd-foundation-2016 f2c6091] : slow topology bridge discover
2 files changed, 37 insertions, 15 deletions
MacBook-Pro-di-Antonio-Russo:opennms antonio$ git push
Counting objects: 219, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (29/29), done.
Writing objects: 100% (38/38), 4.27 KiB | 0 bytes/s, done.
Total 38 (delta 16), reused 0 (delta 0)
To git@github.com:OpenNMS/opennms.git
45777db..f2c6091 features/enlinkd-foundation-2016 -> features/enlinkd-foundation-2016

Antonio Russo April 2, 2016 at 12:23 PM

MacBook-Pro-di-Antonio-Russo:opennms antonio$ git push
Counting objects: 205, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (24/24), done.
Writing objects: 100% (31/31), 3.47 KiB | 0 bytes/s, done.
Total 31 (delta 13), reused 0 (delta 0)
To git@github.com:OpenNMS/opennms.git
30c46e8..aec13fc features/17.1.1-enlinkd -> features/17.1.1-enlinkd

Antonio Russo April 2, 2016 at 12:22 PM

[features/17.1.1-enlinkd aec13fc] : slow topology bridge discover
2 files changed, 37 insertions, 15 deletions
MacBook-Pro-di-Antonio-Russo:opennms antonio$ git log
commit aec13fc7b2a1c04540b3cfd744053d4952970080
Author: Antonio <rssntn67@yahoo.it>
Date: Sat Apr 2 18:21:03 2016 +0200

: slow topology bridge discover

Fixed an error in loading topology from database
better Layout for nodelink.jsp page, reworked EnLinkdElementFactory

Antonio Russo April 1, 2016 at 2:32 PM

commit 30c46e8513b98a95f15477295184ddb46a6bd267
Author: Antonio <rssntn67@yahoo.it>
Date: Fri Apr 1 20:30:51 2016 +0200

: slow topology bridge discover

Better layout of nodelink.jsp

[features/17.1.1-enlinkd 30c46e8] : slow topology bridge discover
2 files changed, 127 insertions, 101 deletions
MacBook-Pro-di-Antonio-Russo:opennms-webapp antonio$ git push
Counting objects: 122, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (12/12), done.
Writing objects: 100% (14/14), 2.07 KiB | 0 bytes/s, done.
Total 14 (delta 10), reused 0 (delta 0)
To git@github.com:OpenNMS/opennms.git
24b8431..30c46e8 features/17.1.1-enlinkd -> features/17.1.1-enlinkd

Fixed

Details

Assignee

Reporter

Components

Sprint

Affects versions

Priority

PagerDuty

Created October 9, 2015 at 6:52 AM
Updated April 13, 2016 at 1:41 AM
Resolved April 2, 2016 at 10:01 PM