kernelkit / infix

Linux :yellow_heart: NETCONF = Infix
https://kernelkit.org
GNU General Public License v2.0
52 stars 12 forks source link

Statd: improve speed of interface data #651

Closed rical closed 1 month ago

rical commented 1 month ago

Description

This PR removes the statd interface netlink code and improve speed of operational interface data.

This is a major redesign of statd interface handling. The goal here is to reduce the time it takes for statd to produce operational data for all interfaces on larger iron. Which manifested itself most notably in the CLI command "show interfaces".

This PR removes the netlink interface subscriptions done by the statd c code. Instead statd now subscribes to the ietf-interfaces base path which means it will be invoked for all interfaces. If the user (sysrepo) has specified an explicit interface name such as eth0, it will be extracted by statd and passed down to Yanger.

This PR also modifies Yanger to fit this new modus. No explicitly passed interface name now means all interfaces.

Side note

The main culprit of the slow operational interface data is the time it takes to bootstrap python. Which prior to this PR was done for each interface. On the HW system I'm testing this PR on, runtime is reduced by a factor of 10.