OPNsense Forum

English Forums => Virtual private networks => Topic started by: Andreiva on May 19, 2023, 03:41:09 PM

Title: Wireguard is slow
Post by: Andreiva on May 19, 2023, 03:41:09 PM
Hi! I have an issue with my site to site wireguard vpn between OPNSense and Openwrt and that is slow speed, I get around 20mbps while I get at least 300mbps both upload and download at both sites. A client connecting directly just to the OPNSense vpn experiences the same speed. I have tried bigger and smaller MTUs with no meaningful change. Also both wireguard-kmod and wireguard-go offer the same performance. CPU usage isn't over 50%...
Title: Re: Wireguard is slow
Post by: Kinerg on May 20, 2023, 10:25:10 PM
How are you testing performance?
Title: Re: Wireguard is slow
Post by: Andreiva on May 21, 2023, 03:42:25 PM
With iperf3 server on the opnsense machine and client on my desktop at the other site, same thing happens if iperf3 server runs on a pc connected to opnsense
Title: Re: Wireguard is slow
Post by: meyergru on May 21, 2023, 06:00:56 PM
CPU not going over 50% is no sure indicator that it is not too slow for this application. Did you try iperf with -P8?

It is a common misconception to think that full bandwidth can be achieved with only one connection - much more true if that one thread runs on one core that is too slow to handle encryption. That being said, Wireguard is less taxing on CPU than any other VPN software and does not even need AES-NI acceleration.
Title: Re: Wireguard is slow
Post by: Andreiva on May 21, 2023, 06:05:42 PM
Tried with -P8, still limited to under 20mbps.
Title: Re: Wireguard is slow
Post by: Kinerg on June 03, 2023, 05:31:40 PM
Did you manage to find the culprit?