You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now we run agent and CLI binaries without any sort of privilege escalation, which leaves us with the inability to increase buffer sizes for our UDP sockets. This is shown by the following log message:
2023-09-26 21:30:17.014 [debu] net.wgengine: magicsock: [warning] failed to force-set UDP write buffer size to 7340032: operation not permitted; using kernel default values (impacts throughput only)
I tested a bit with giving coder binaries CAP_NET_ADMIN (which allows us to resize UDP buffers) and got about ~50% increase in performance on two cores.
Adding CAP_NET_ADMIN to agents should be pretty straight forward, as long as the workspace contains setcap. For CLI installs, we might be able to automatically add it via the install script. It's worth noting the increase in speeds only happen when both the agent and CLI have CAP_NET_ADMIN. If either are missing, the lower speeds are seen.
It might be good to experiment with higher buffer sizes to find a happy medium for our use case.
The text was updated successfully, but these errors were encountered:
This would be great to get in. We should make sure that everything continues to work if that capability is unavailable, e.g. testing on OpenShift with PodSecurity policy that prohibits escalation.
Right now we run agent and CLI binaries without any sort of privilege escalation, which leaves us with the inability to increase buffer sizes for our UDP sockets. This is shown by the following log message:
I tested a bit with giving
coder
binariesCAP_NET_ADMIN
(which allows us to resize UDP buffers) and got about ~50% increase in performance on two cores.Without
CAP_NET_ADMIN
(both agent and CLI)With
CAP_NET_ADMIN
(both agent and CLI)Adding
CAP_NET_ADMIN
to agents should be pretty straight forward, as long as the workspace containssetcap
. For CLI installs, we might be able to automatically add it via the install script. It's worth noting the increase in speeds only happen when both the agent and CLI haveCAP_NET_ADMIN
. If either are missing, the lower speeds are seen.It might be good to experiment with higher buffer sizes to find a happy medium for our use case.
The text was updated successfully, but these errors were encountered: