Description
Component: FRR / BGP / VRF. Affects 1.5.1-S1 (FRR 10.5.5) and rolling (FRR stable/10.7, same code).
With a full table in a VRF (about 1.08M IPv4 + 253k IPv6 routes) and import vrf between the default VRF and the VRF, every router bgp <asn> on the default instance costs about 40 s of bgpd CPU. frr-reload.py enters the default instance once per changed line, so a commit with 11 changed BGP blocks takes about 8 minutes. During that time vtysh and the commit are blocked.
Cause (FRR bgpd/bgp_vty.c): router_bgp() calls vpn_leak_postchange_all() on every entry into the default instance, which re-leaks every path in both directions even though nothing changed.
Upstream issue: https://github.com/FRRouting/frr/issues/24488
Upstream fix: https://github.com/FRRouting/frr/pull/24489
Lab result with the fix on 10.5.5: 1.0 - 1.4 s -> 0.02 - 0.03 s at 200k routes. FRR topotests for VRF leak, L3VPN, EVPN and SRv6 pass.
Workaround until fixed: none in the config. Commit time scales with the number of BGP blocks that frr-reload.py has to change.
Plan: carry the upstream fix as a patch in vyos-build (packages/frr patches) until FRR has it in a release the VyOS build uses.