

I had to borrow a phone to set up a mobile hotspot.
It has the same speeds inside the wireguard tunnel as when I tested from my wired connection (250 kbps TCP, 170 kbps UDP).
The loss reported by iperf is dependent on the bandwidth that i test with. But as I increase bandwidth from the client the loss grows towards 100%.
I tried testing in reverse (sending from VPS to devices on different networks) with surprising results:
- TCP, wireguard: 5-10 mbps
- UDP, wireguard: 50 mbps
- TCP, no wireguard: 45 mbps
- UDP, no wireguard: 250 mbps (saturates download speed on client when compared to speedtest.net)
Thanks for the suggestions.
I see no CPU spike on the VPS, and no CPU spikes on the clients.
I use WG started by root using wg-quick via systemctl on all devices.
I tried setting the MTU to 1280, with no significant changes, apart from slight slowdown compared to MTU of 1420 or 1440.
Smaller packet size also resulted in slightly lower speeds.
I used
tcpdump
on both client and server to find the negotiated MSS, and it shows an MSS of 1460 outside wg tunnel, so by following the calculations shown in this article https://www.procustodibus.com/blog/2022/12/wireguard-performance-tuning/, 1440 is the correct MTU for the wireguard interface when using IPv4 inside the tunnel.