Thanks all, I increased the system-wide default to 2MB and seems to be better (default was 256K). On code changes, I completely agree this should be configurable either globally or per protocol kernel, having to set a system-wide default when a socket option is available isn't great. On the previously posted patch, I don't think SO_RCVBUFFORCE would be the best idea. Generally, max system setting should be honored, and SO_RCVBUF used (caped at the lesser of user configured value and the system-wide max). Alexander writes:
On 2021-09-21 17:51, Trisha Biswas wrote:
We are using the following patch to increase the netlink receive buffer size to 2 MB.
I am afraid that this might be insufficient - as it depends on CPU power, system load and probably some other factors like number of routes etc.
In my case (multi-CPU dedicated border router) where bird is the only significant consumer of CPU power and running only BGP (with very few OSPF nodes) I had to set it to 128MB to get rid of any loss, 64MB was barely sufficient.
Therefore I believe it makes sense to make the buffer size configurable.
/Al
-- Dave