go.mod,wgengine/wgcfg: bump wg-go & configure staged global limit on iOS

https://github.com/tailscale/wireguard-go/compare/79ead109a81a8f57c75ac9e6ddee61714c82744b...9e10ef9af41578baabde0283237d5cbb6422ff25

Start off with device.WithQueueStagedGlobalLimit inheriting the same
value from the knob it replaced, device.WithPreallocatedBuffersPerPool.

Unlike WithPreallocatedBuffersPerPool, WithQueueStagedGlobalLimit is
exclusive of packet memory allocated for transport messages that are
immediately transmitted. So, one must consider
WithQueueStagedGlobalLimit alongside .Queue{In,Out}boundSize to
understand overall memory ceiling impacts.

An approximation of the configured packet memory ceiling on iOS can be
calculated with the following formula:

device.singlePacketSlabSize * ( // 1788
  (2 * device.WithQueueOutboundSize) + // 128
  (2 * device.WithQueueInboundSize) + // 128
  device.WithQueueStagedGlobalLimit // 64
)
=
~572KB

Where previously it was:
device.singlePacketSlabSize * ( // 1788
  device.WithPreallocatedBuffersPerPool // 64
)
=
~114KB

Updates tailscale/tailscale#1971
Updates tailscale/tailscale#21773
Updates tailscale/corp#46396

Signed-off-by: Jordan Whited <[email protected]>
This commit is contained in:
Jordan Whited authored and Jordan Whited committed 2026-11-10 16:45:40 -08:00
1 parent 1ebf217e93
commit a7befef034
6 files changed
+9 -12

No files matched your search

+1 -1
View File
@@ -173,4 +173,4 @@
});
};
}
# nix-direnv cache busting line: sha256-M7jMKZAikFtuHU7GZ1TBUme1cHrgKcg3LQObcXoXImU=
# nix-direnv cache busting line: sha256-Ackcupvrl5NqcyZZ7D3X3h/COrZ6Uz/rtxtzeu3ciU8=
+2 -2
View File
@@ -4,7 +4,7 @@
"sri": "sha256-sdlgTLTkdhTvGCeQTwAsR+Do8rNwBzBUp5QPc09BPgI="
},
"vendor": {
"goModSum": "sha256-fY5/kwYNwUr/WUhki7WhKxjO0u/PeBHY9iauefNCJvI=",
"sri": "sha256-M7jMKZAikFtuHU7GZ1TBUme1cHrgKcg3LQObcXoXImU="
"goModSum": "sha256-ieea25MFXJHi9hzOR7vzPfxMPu8EKmsDnyqCXhdiiCU=",
"sri": "sha256-Ackcupvrl5NqcyZZ7D3X3h/COrZ6Uz/rtxtzeu3ciU8="
}
}
+1 -1
View File
@@ -126,7 +126,7 @@ require (
github.com/tailscale/ts-gokrazy v0.0.0-20260630224145-b83088f2e52e
github.com/tailscale/web-client-prebuilt v0.0.0-20260917222731-e0ed2d0d0fea
github.com/tailscale/wf v0.0.0-20240214030419-6fbb0a674ee6
github.com/tailscale/wireguard-go v0.0.0-20261105205217-79ead109a81a
github.com/tailscale/wireguard-go v0.0.0-20261110220948-9e10ef9af415
github.com/tailscale/xnet v0.0.0-20240729143630-8497ac4dab2e
github.com/tc-hib/winres v0.3.1
github.com/tcnksm/go-httpstat v0.2.0
+2 -2
View File
@@ -1154,8 +1154,8 @@ github.com/tailscale/web-client-prebuilt v0.0.0-20260917222731-e0ed2d0d0fea h1:a
github.com/tailscale/web-client-prebuilt v0.0.0-20260917222731-e0ed2d0d0fea/go.mod h1:agQPE6y6ldqCOui2gkIh7ZMztTkIQKH049tv8siLuNQ=
github.com/tailscale/wf v0.0.0-20240214030419-6fbb0a674ee6 h1:l10Gi6w9jxvinoiq15g8OToDdASBni4CyJOdHY1Hr8M=
github.com/tailscale/wf v0.0.0-20240214030419-6fbb0a674ee6/go.mod h1:ZXRML051h7o4OcI0d3AaILDIad/Xw0IkXaHM17dic1Y=
github.com/tailscale/wireguard-go v0.0.0-20261105205217-79ead109a81a h1:bxmkuenopCCc4jbWxUkZ26NZHq4sYdfPdVNB2XX+nV8=
github.com/tailscale/wireguard-go v0.0.0-20261105205217-79ead109a81a/go.mod h1:rUelGmuK4UnSJYM5gl5Mknp6YbwwcL8+VAPMhNYe+jg=
github.com/tailscale/wireguard-go v0.0.0-20261110220948-9e10ef9af415 h1:/C32PSOxVVL2ZIWN/iNNY4+5sSb7yM/OwFteAIeGeoU=
github.com/tailscale/wireguard-go v0.0.0-20261110220948-9e10ef9af415/go.mod h1:rUelGmuK4UnSJYM5gl5Mknp6YbwwcL8+VAPMhNYe+jg=
github.com/tailscale/xnet v0.0.0-20240729143630-8497ac4dab2e h1:zOGKqN5D5hHhiYUp091JqK7DPCqSARyUfduhGUY8Bek=
github.com/tailscale/xnet v0.0.0-20240729143630-8497ac4dab2e/go.mod h1:orPd6JZXXRyuDusYilywte7k094d7dycXXU5YnWsrwg=
github.com/tc-hib/winres v0.3.1 h1:CwRjEGrKdbi5CvZ4ID+iyVhgyfatxFoizjPhzez9Io4=
+1 -1
View File
@@ -16,4 +16,4 @@
) {
src = ./.;
}).shellNix
# nix-direnv cache busting line: sha256-M7jMKZAikFtuHU7GZ1TBUme1cHrgKcg3LQObcXoXImU=
# nix-direnv cache busting line: sha256-Ackcupvrl5NqcyZZ7D3X3h/COrZ6Uz/rtxtzeu3ciU8=
+2 -5
View File
@@ -13,15 +13,12 @@ func getMemoryOptions() []device.Option {
// avoid getting killed.
//
// See _notios.go for a longer explanation of what the Queue{In,Out}boundSize
// knobs control and the tradeoffs involved. Eventually Queue{In,Out}boundSize
// should be CPU-scaled, and WithPreallocated... removed, but we keep them all
// static for now, until the [device.WaitPool] ceiling is eliminated.
// (See tailscale/corp#46396).
// knobs control and the tradeoffs involved.
return []device.Option{
device.WithQueueStagedSize(64),
device.WithQueueOutboundSize(64),
device.WithQueueInboundSize(64),
device.WithQueueHandshakeSize(64),
device.WithPreallocatedBuffersPerPool(64),
device.WithQueueStagedGlobalLimit(64),
}
}