diff options
| author | James Tucker <james@tailscale.com> | 2025-01-23 16:23:41 -0800 |
|---|---|---|
| committer | James Tucker <jftucker@gmail.com> | 2025-01-24 16:19:55 -0800 |
| commit | ca39c4e150366b0cdcb766a62c9c8bc3fb116083 (patch) | |
| tree | 4b206dd4a38339eb30b9e583c0bca957e6ef7cc4 /wgengine/netstack/netstack.go | |
| parent | 1a7274fccb0617f6d0bc31a45d835b61a9d5c5b7 (diff) | |
| download | tailscale-ca39c4e150366b0cdcb766a62c9c8bc3fb116083.tar.xz tailscale-ca39c4e150366b0cdcb766a62c9c8bc3fb116083.zip | |
cmd/natc,wgengine/netstack: tune buffer size and segment lifetime in natc
Some natc instances have been observed with excessive memory growth,
dominant in gvisor buffers. It is likely that the connection buffers are
sticking around for too long due to the default long segment time, and
uptuned buffer size applied by default in wgengine/netstack. Apply
configurations in natc specifically which are a better match for the
natc use case, most notably a 5s maximum segment lifetime.
Updates tailscale/corp#25169
Signed-off-by: James Tucker <james@tailscale.com>
Diffstat (limited to 'wgengine/netstack/netstack.go')
| -rw-r--r-- | wgengine/netstack/netstack.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/wgengine/netstack/netstack.go b/wgengine/netstack/netstack.go index 0b8c67b06..f0c4c5271 100644 --- a/wgengine/netstack/netstack.go +++ b/wgengine/netstack/netstack.go @@ -405,6 +405,14 @@ func (ns *Impl) Close() error { return nil } +// SetTransportProtocolOption forwards to the underlying +// [stack.Stack.SetTransportProtocolOption]. Callers are responsible for +// ensuring that the options are valid, compatible and appropriate for their use +// case. Compatibility may change at any version. +func (ns *Impl) SetTransportProtocolOption(transport tcpip.TransportProtocolNumber, option tcpip.SettableTransportProtocolOption) tcpip.Error { + return ns.ipstack.SetTransportProtocolOption(transport, option) +} + // A single process might have several netstacks running at the same time. // Exported clientmetric counters will have a sum of counters of all of them. var stacksForMetrics syncs.Map[*Impl, struct{}] |
