Hello!
We are monitoring an array of switches in our distributed environment, some of them act as core switches, responsible for whole site availability. Obviously, they have an array of VLANs configured on them.
On the other hand, since it is a distributed environment, we are using distributed polling model (the experimental one) in LibreNMS. Therefore, pollers are connecting to a remote MySQL server, which is producing a certain overhead on the operation, but up until now it was bearable. A couple of months before a certain issue became to emerge: loaded switch discovery is not finished in time because of the MySQL time necessary to finish discovery.
Refer to the attached link for a full VLAN discovery debug information, but in a nutshell here is what matters:
Runtime for discovery module ‘vlans’: 1677.0000 seconds with 564336 bytes
SNMP: [5/10.80s] MySQL: [9980/1645.80s] RRD: [0/0.00s]
Full VLAN debug: LibreNMS VLAN discovery debug · GitHub
There are 6653 select and 3326 update statements to carry out on a database level, which I personally assume to be a flaw. Say please, are there any options to resolve/optimize such behavior? Let me know if you would like me to provide additional information.
I read through /includes/discovery/vlans.inc.php for a possible fix, but unfortunately this is far beyond my skills…
Regards,
Oleg