3 ms·
Hi, Tailscale person! If you want a fairly straightforward improvement you could make: Tailscale, by default uses SOCK_RAW. And having any raw socket listenin
by amluto 2y ago
Hi, Tailscale person! If you want a fairly straightforward improvement you could make: Tailscale, by default uses SOCK_RAW. And having any raw socket listening at all hurts receive performance systemwide:
https://lore.kernel.org/all/CALCETrVJqj1JJmHJhMoZ3Fuj685Unf=DYsiEY1uEfnJq3H+Tzg@mail.gmail.com/ https://lore.kernel.org/all/CALCETrVJqj1JJmHJhMoZ3Fuj685Unf=...
It shouldn’t be particularly hard to port over the optimization that prevents this problem for SOCK_PACKET. I’ll get to it eventually (might be quite a while), but I only care about this because of Tailscale, and I don’t have a ton of bandwidth.
- raggi 2y agoVery interesting, thank you. We’ll take a look at this!
- bradfitz 2y agoBTW, that code changed just recently: https://github.com/tailscale/tailscale/commit/1c972bc7cbebfcc45f1421bc359909f54a394b3d https://github.com/tailscale/tailscale/commit/1c972bc7cbebfc... It's now a AF_PACKET/SOCK_DGRAM fd as it was originally meant to be.