Pushing WireGuard on macOS to 5 Gbit/s
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
Firezone says it raised its macOS WireGuard client from about 1 Gbit/s to over 5 Gbit/s. Its reading of Apple's XNU source is that UDP writes never return EWOULDBLOCK, so packets drop at the interface queue and TCP inside the tunnel slows needlessly. Connected sockets, ENOBUFS handling, batched sendmsg_x and coalescing up to three TCP segments restored backpressure and cut per-packet cost. The 5.87 Gbit/s upload and 5.76 download figures come from one pair of M1 Macs over Thunderbolt, and the XNU buffer behavior was not independently verified.