Making bulk CLI queries / CLI performance / bird-bulk tool in Python

Baptiste Jonglez baptiste at bitsofnetworks.org
Thu Dec 12 17:14:05 CET 2019


Hi,

For a research project, I need to query routes through the Bird CLI around
10k times per second.

To do this, I wrote a small Python tool that talks to the Bird CLI over
its Unix socket and parses CLI replies.

For anyone interested, the first version of the code is here: https://github.com/jonglezb/bird-bulk

The parsing code is not terribly efficient and it would be much faster in
C or Go, but it's fast enough for my needs: it can perform 17k queries per
second on a Bird daemon with a full BGP view.

Out of curiosity, I started several instances of my benchmark script in
parallel, and Bird maxed out at 50k queries per second.  This is quite
impressive considering that it is loaded with almost 800k routes.

Conclusion: Bird *is* efficient :)

Let me know if you are interested in re-using this code, I can package it
properly in pip.

Regards,
Baptiste
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20191212/5a164390/attachment.sig>


More information about the Bird-users mailing list