go.mod,wgengine/wgcfg: bump wg-go & make crypto queue sizing cgroup-aware

https://github.com/tailscale/wireguard-go/compare/9e10ef9af415...c90940ef3f06

Fixes tailscale/corp#47966

Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
Jordan Whited authored and Jordan Whited committed 2026-11-16 16:12:24 -08:00
1 parent cfc3f365d4
commit ca0cadf957
6 files changed
+13 -14

No files matched your search

+1 -1
View File
@@ -173,4 +173,4 @@
});
};
}
# nix-direnv cache busting line: sha256-dw6GW+nyFutqH+a+/qYbij920uHOdEWrTG0B6T3esWY=
# nix-direnv cache busting line: sha256-AeOJeTGIk14FbhP5kPXRiaNHUYm7KP01F/Mx/yoheuo=
+2 -2
View File
@@ -4,7 +4,7 @@
"sri": "sha256-Up4oMG6TVLQkV9inAYF3uYbxu+bMHeU7q9BLcXIllow="
},
"vendor": {
"goModSum": "sha256-HNO+xNC4DTJFJpetpslu3Wif8SChTWCxq32mZ8UkiBE=",
"sri": "sha256-dw6GW+nyFutqH+a+/qYbij920uHOdEWrTG0B6T3esWY="
"goModSum": "sha256-mv93TCMisvb7pystEF5p+6NM4y8eMAxwTNxzjHByOGg=",
"sri": "sha256-AeOJeTGIk14FbhP5kPXRiaNHUYm7KP01F/Mx/yoheuo="
}
}
+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-20261110220948-9e10ef9af415
github.com/tailscale/wireguard-go v0.0.0-20261116233941-c90940ef3f06
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-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/wireguard-go v0.0.0-20261116233941-c90940ef3f06 h1:F/qY0CU5GQY0ecxAWIvWu8oIwXfgChQsec+LJZfY5N4=
github.com/tailscale/wireguard-go v0.0.0-20261116233941-c90940ef3f06/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-dw6GW+nyFutqH+a+/qYbij920uHOdEWrTG0B6T3esWY=
# nix-direnv cache busting line: sha256-AeOJeTGIk14FbhP5kPXRiaNHUYm7KP01F/Mx/yoheuo=
+6 -7
View File
@@ -27,17 +27,16 @@ func getMemoryOptions() []device.Option {
//
// Small queues park I/O goroutines and hurt throughput; large queues allow
// more packet batches and their associated memory to remain outstanding. We
// have to find a balance. Crypto goroutines are sized to [runtime.NumCPU]
// in wireguard-go, so we start there, and apply a benchmark-backed scaling
// factor to reduce head I/O goroutines parking around bursts.
// have to find a balance. Crypto goroutines are sized to cgroup-aware
// [runtime.GOMAXPROCS] in wireguard-go, so we start there, and apply a
// benchmark-backed scaling factor to reduce head I/O goroutines parking
// around bursts.
const cpuScalingFactor = 4
// maxQueueSize was the previous static default, prior to creation of the
// [device.Option].
const maxQueueSize = 1024
return []device.Option{
// TODO: make cgroup-aware with runtime.GOMAXPROCS(0).
// See tailscale/corp#47966.
device.WithQueueInboundSize(min(maxQueueSize, runtime.NumCPU()*cpuScalingFactor)),
device.WithQueueOutboundSize(min(maxQueueSize, runtime.NumCPU()*cpuScalingFactor)),
device.WithQueueInboundSize(min(maxQueueSize, runtime.GOMAXPROCS(0)*cpuScalingFactor)),
device.WithQueueOutboundSize(min(maxQueueSize, runtime.GOMAXPROCS(0)*cpuScalingFactor)),
}
}