bird under heavy cpu load

Alexander V. Chernikov melifaro at yandex-team.ru
Mon Mar 12 11:27:23 CET 2012


On 12.03.2012 13:25, Oleg wrote:
> Hi, all.
>
> I have some experience with bird under heavy cpu load. I had a
> situation when bird do frequent updates of kernel table, because
> of bgp-session frequent down/up (because of cpu and/or net load).
> I waited about 5-10 minutes for birdc started, when i wanted to
> reconfigure bird with configure soft command from birdc(ssh and
> other interactive programs works well). After i changed bird.conf
> in such a way that i get from upstream 0.0.0.0/0 instead of full view
> birdc worked fine and bird cpu load lowered(before, bird load cpu about
> 30-89%).
> What can i do in such situtation in future for birdc normal work?
Adding/removing kernel routes is a complex task, results in main process 
waiting for system call is completed.

It is very costy and one (developer) possibility is to add additional 
thread which does kernel interaction.

We workaround this by installing IGP routes only (which does not help 
for border router)

You can try to reduce MAX_RX_STEPS to 1 in sysdep/unix/io.c, this will 
help a bit for new route installation (2 minutes instead of 5),

but at the moment answer seems to be "don't export all routes to 
kernel". You can filter all that is >=/20, for example, to provide 
reasonable load balancing with much less routes in OS kernel.

>
> And additional two questions:
> Does bird immediately push routes info in kernel table, if it receive routes
> updates from bgp-peer or it wait for the next kernel table scan?
Kernel protocol (just as any other protocol) receives route updates 
immediately after they are announced to the routing table by BGP 
protocol instance. In the came callback kernel update (for the single 
route) is prepared and called.

> How can i set in one kernel protocol different scan time from another one?
>
> Thanks.




More information about the Bird-users mailing list