forked from FRRouting/frr
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bgpd: delay and reduce VPN processing calls from ZAPI notifications
At startup, when both the configuration of hundreds of VRFS interfaces and an L3VPN peering is being set up, a CPU surge happens for BGP. The following message can be seen: > STARVATION: task zclient_read (7fa1886cc98d) ran for 5069ms (cpu time 2417ms) > May 03 11:27:40 xxx bgpd[5351]: [PHJDC-499N2][EC 100663314] STARVATION: task zclient_read (7fa1886cc98d) ran for 5155ms (cpu time 2419ms) > May 03 11:28:42 xxx bgpd[5351]: [PHJDC-499N2][EC 100663314] STARVATION: task zclient_read (7fa1886cc98d) ran for 5112ms (cpu time 2416ms) The interface UP notification of each of those interfaces forces the zclient task to perform VPN processing. The below extra traces indicate the time taken between each interface up event stands for the time to perform VPN processing. > 2024/05/06 11:56:42 BGP: [ZXFVW-H54SV] Rx Intf up VRF 29 IF c38119 > 2024/05/06 11:56:43 BGP: [ZXFVW-H54SV] Rx Intf up VRF 30 IF c3812 > 2024/05/06 11:56:46 BGP: [ZXFVW-H54SV] Rx Intf up VRF 31 IF c38120 > 2024/05/06 11:56:49 BGP: [ZXFVW-H54SV] Rx Intf up VRF 32 IF c38121 > 2024/05/06 11:56:52 BGP: [ZXFVW-H54SV] Rx Intf up VRF 33 IF c38122 > 2024/05/06 11:56:54 BGP: [ZXFVW-H54SV] Rx Intf up VRF 34 IF c38123 The more there are VRF interfaces, and VPN prefixes, the more the time taken will increase and starvation issues will happen. To resolve this issue, a separate thread for VPN processing will be scheduled by the ZAPI interface. This will let time for the ZAPI to get more similar events to process. If the VPN job is already scheduled, the event_add_timer() call will not launch it. Signed-off-by: Philippe Guibert <[email protected]>
- Loading branch information
1 parent
fd8a2c4
commit c4e2fe6
Showing
6 changed files
with
31 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters