bgp / stayrtr

RPKI-To-Router server implementation in Go
BSD 3-Clause "New" or "Revised" License
85 stars 13 forks source link

Add switch to disable TCP_NODELAY #112

Closed benjojo closed 5 months ago

benjojo commented 5 months ago

This in an attempt quell CPU usage, since PCCW is having issues when their {N} number of routers all start RTR sessions at the same time.

A perf of the system suggests all of the CPU is going to sending TCP traffic, and since golang enables NO_DELAY (infamously?) by default, this is a good smoking gun, since this would imply that stayrtr is sending 1 TCP packet per RTR PDU, something that would indeed cause a lot of CPU usage in aggergate!

This patch was written some time ago, but reports from PCCW states that this does actually help their network a noticeable amount, So I think this is a worthy switch to be introduced

job commented 5 months ago

Yup

job commented 5 months ago

It's actually a switch to enable NODELAY, but it is still morning so we'll let that slide ;-)