[quagga-dev 11608] bgpd-mrai.patch

Daniel Walton dwalton at cumulusnetworks.com
Thu Oct 23 14:16:19 BST 2014


Pradosh's patch: 

bgpd: bgpd-mrai.patch 
BGP: Event-driven route announcement taking into account min route adv interval 

ISSUE 

BGP starts the routeadv timer (peer->t_routeadv) to expire in 1 sec 
when a peer is established. From then on, the timer expires 
periodically based on the configured MRAI value (default: 30sec for 
EBGP, 5sec for IBGP). At the expiry, the write thread is triggered 
that takes the routes from peer's sync FIFO (adj-rib-out) and sends 
UPDATEs. This has a few drawbacks: 

(1) Delay in new route announcement: Even when the last UPDATE message 
was sent a while back, the next route change will necessarily have 
to wait for routeadv expiry 
(2) CPU usage: The timer is always armed. If the operator chooses to 
configure a lower value of MRAI (zero second is a preferred choice 
in many deployments) for better convergence, it leads to high CPU 
usage for BGP process, even at the times of no network churn. 

PATCH 

Make the route advertisement event-driven - When routes are added to 
peer's sync FIFO, check if the routeadv timer needs to be adjusted (or 
started). Conversely, do not arm the routeadv timer unconditionally. 

The patch also addresses route announcements during read-only mode 
(update-delay). During read-only mode operation, the routeadv timer 
is not started. When BGP comes out of read-only mode and all the 
routes are processed, the timer is started for all peers with zero 
expiry, so that the UPDATEs can be sent all at once. This leads to 
(near-)optimal UPDATE packing. 

Finally, the patch makes the "max # packets to write to peer socket at 
a time" configurable. Currently it is hard-coded to 10. The command is 
at the top router-bgp mode and is called "write-quanta <number>". It 
is a useful convergence parameter to tweak. 

https://github.com/CumulusNetworks/quagga/commit/5a4f179d62418921bb23995864304d849e952d42 

Daniel 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20141023/73c198f6/attachment-0001.html>


More information about the Quagga-dev mailing list