[Babel-users] babeld slashes kernel route manipulation performance by 17000%

Toke Høiland-Jørgensen toke at toke.dk
Wed Feb 23 20:43:29 GMT 2022


Daniel Gröber <dxld at darkboxed.org> writes:

> Hi,
>
> I'm seeing a rather odd issue in my babeld deployment. I'm using babeld on
> one of my linux routers which also has bird running with a v6 BGP full
> table session thats being inserted into the kernel FIB.
>
> Whenever bird tries to clear/reinsert all routes in the kernel table I'm
> seeing a 17000% reduction[1] in route insertion performance if babled is
> running simultaniously :)
>
> Since I've anticipated babeld not being quite ready to even see/filter a
> kernel table with 100k+ routes I've set things up such that bird inserts
> its routes into a separate table so babeld has a chance to just completely
> ignore them and only see a nice and short main routing table.
>
> Any ideas/pointers how babled could be slowing this down so much?

Probably because babeld subscribes to netlink notifications for all new
routes, and only filters them on the table name fairly late,
specifically here:

https://github.com/jech/babeld/blob/master/kernel_netlink.c#L1175

So babeld will process and parse all route entries even if it won't
export them.

I run Bird in a similar setup as yours, BTW, but using the Babel
implementation in Bird as well; that has no issues with running
concurrently with a full BGP table. It is even possible to run babel and
BGP in the same Bird instance, but I split mine out to two instances
(one for BGP, one for Babel) because I had issues with the
single-threaded nature of Bird causing Babel to miss hello updates while
processing a large BGP update.

-Toke



More information about the Babel-users mailing list