Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wireguard UDP packets are occasionally reordered in GCP, limiting throughput #13195

Open
spikecurtis opened this issue May 7, 2024 · 0 comments
Labels
bug Used to filter all bug issues networking Area: networking

Comments

@spikecurtis
Copy link
Contributor

When running Coder on Google Cloud VMs, we observe that Wireguard UDP packets sent between hosts are occasionally reordered. This is interpreted as a congestion event by gVisor, and results in lower TCP performance. The events do not seems strongly correlated with network congestion.

I tested with AWS VMs, and did not observe this reordering.

I have verified that the packets are in order when delivered to the magicsock, and are in order as reported by tcpdump on the outgoing network interface (by checking the Wireguard packet counters).

The packets are reordered when they arrive at the destination VM, as reported by tcpdump. The reordering seems like like it might be related to Generic Receive Offloading (GRO), where multiple UDP packets from the wire are consolidated into a larger UDP packet. The reordering often seems to be correlated with GRO packet boundaries. However, I still observe the reordering even with GRO disabled on the receiving VM.

Kernel wireguard didn't seem to have reordering issues when I set up a link between the VMs and tested throughput, and neither does iperf3 in UDP mode. So, it seems to be something particular about the way that tailscale interacts with the networking APIs in Linux.

related to #13042

@spikecurtis spikecurtis added the networking Area: networking label May 7, 2024
@coder-labeler coder-labeler bot added the bug Used to filter all bug issues label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to filter all bug issues networking Area: networking
Projects
None yet
Development

No branches or pull requests

1 participant