Hi all,
I have a fully running Wireguard VPN client running on Openwrt (TPLink Archer 1750). The server is on a AWS T2 Micro . I conducted speedests on the router and found that the speeds are averagin 24 Mbps. I find the speed to be quite low.
root@OpenWrt:/tmp# ./speedtest.sh -p 8.8.8.8
2024-01-02 04:50:28 Testing against netperf.bufferbloat.net (ipv4) with 5 simultaneous sessions while pinging 8.8.8.8 (60 seconds in each direction)
...................................................................................................................................
Download: 0.00 Mbps
Latency: (in msec, 131 pings, 0.00% packet loss)
Min: 13.204
10pct: 16.043
Median: 20.591
Avg: 21.814
90pct: 26.455
Max: 35.751
.....................................................................................................................................
Upload: 0.00 Mbps
Latency: (in msec, 133 pings, 0.00% packet loss)
Min: 12.716
10pct: 16.150
Median: 21.074
Avg: 23.034
90pct: 27.957
Max: 89.637
root@OpenWrt:/tmp# ./speedtest.sh
2024-01-02 04:55:53 Testing against netperf.bufferbloat.net (ipv4) with 5 simultaneous sessions while pinging gstatic.com (60 seconds in each direction)
......................................................................................................................................
Download: 0.00 Mbps
Latency: (in msec, 134 pings, 0.00% packet loss)
Min: 13.815
10pct: 16.553
Median: 21.286
Avg: 22.185
90pct: 26.953
Max: 35.945
.....................................................................................................................................
Upload: 0.00 Mbps
Latency: (in msec, 133 pings, 0.00% packet loss)
Min: 16.567
10pct: 16.837
Median: 22.039
Avg: 24.615
90pct: 31.134
Max: 74.617
My internet speed is 500 Mbps. The AWS t2 Micro speed is
curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python3 -
Retrieving speedtest.net configuration...
Testing from Amazon.com ()...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Bell Mobility (Montréal, QC) [1.39 km]: 2.143 ms
Testing download speed................................................................................
Download: 1007.56 Mbit/s
Testing upload speed......................................................................................................
Upload: 1046.04 Mbit/s
The MTU is set to 1412 on both the client and server. Is there a way to further tune the Wireguard setup to improve the avg connection speed?
I also have clamping set on the Wireguard server -A ufw-after-forward -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
New to this and maybe a little wet behind the ears ... BUT:
The first entry shows a speedtest against a DNS server (8.8.8.8:Google) and got a ZERO transfer of data but a median LATENCY of 26ms. Which is okay (I generally get 10ms from router, 13ms from desktop). I don't know why a DNS service would support speedtest; its got more important things to do ...
The second says you have 500Mbps service but upload and download speed result of 1000+ Mbps. Seems more like the ISP is not correctly throttling your modem, or you may be seeing a slightly larger than expected bill this month.
The TPLink Archer 1750 would not seem to be a good choice for a VPN tunnel @500Mbps as it does not have hardware encryption support and only runs about 700MHz which doesn't leave a lot of process space, but itseems like there is very little going on with your "top" output; was the network loaded or a speedtest underway during the "top" screenshot?
If you're really in need of hot VPN performance, and the router is getting cpu bound, either choose router hardware that helps the process, or off-load the Tunnel to a secondary machine so as not to load the typical router.
However - the test results would not seem to support your concerns voiced.
I think the output of top was gathered while the tunnel was not under heavy duty.
Otherwise you will see it's usage under ksoftirq as the router/os is busy to move packets from one interface to another while en- and de-capsulation packets...
Although I did see a big drop in speed when the Video call was on. VPN on, no video call
root@OpenWrt:/tmp# ./speedtest.sh
2024-01-05 22:48:41 Testing against netperf.bufferbloat.net (ipv4) with 5 simultaneous sessions while pinging gstatic.com (60 seconds in each direction)
......................................................................................................................................
Download: 0.00 Mbps
Latency: (in msec, 134 pings, 0.00% packet loss)
Min: 20.155
10pct: 21.536
Median: 27.217
Avg: 28.300
90pct: 31.307
Max: 111.049
....................................................................................................................................
Upload: 0.00 Mbps
Latency: (in msec, 133 pings, 0.00% packet loss)
Min: 20.723
10pct: 21.729
Median: 27.630
Avg: 35.953
90pct: 71.400
Max: 121.311
VPN on, with Video call on
root@OpenWrt:/tmp# ./speedtest.sh
2024-01-05 22:42:57 Testing against netperf.bufferbloat.net (ipv4) with 5 simultaneous sessions while pinging gstatic.com (60 seconds in each direction)
..................................................................................................................................
Download: 0.00 Mbps
Latency: (in msec, 131 pings, 0.00% packet loss)
Min: 15.669
10pct: 17.325
Median: 21.203
Avg: 22.555
90pct: 27.188
Max: 66.555
.....................................................................................................................................
Upload: 0.00 Mbps
Latency: (in msec, 133 pings, 0.00% packet loss)
Min: 13.955
10pct: 14.100
Median: 21.056
Avg: 21.764
90pct: 26.077
Max: 41.925
I'm trying to understand , if its possible to increase the Avg Speed from 20-30 to close to 100 , given I have 500 Mbps download speed. Or is it curtailed because my upload speed is only ~ 25Mbps?
I got between 60 and 70 MBit/s on LAN with Openwrt 18 and 19. Afterwards the performance has dipped and speeds ranged from 25 to 40 MBit/s with Openwrt 21 and 22 on LAN. Tested on dozens of devices with several self build images.
If you want at least 100 MBit/s with Wireguard, look for something like the TP-Link AX23 (up to 140 MBit/s) or even more powerful devices.
Ideally - you should be sending some significant amount of data to bufferbloat. When it shows "0.00 Mbps", ask yourself "How much data is being actually transfered."(????)
For giggles, I loaded speedtest-netperf on OpenWRT 23.05 and ran it.
Testing this morning seems to show netperf.bufferbloat.net down which will result in "Download: 0.00 Mbps" - try using "netperf-west.bufferbloat.net"
root@[Redacted]:~# speedtest-netperf.sh -H netperf-west.bufferbloat.net -t 5
2024-01-07 09:30:55 Starting speedtest for 5 seconds per transfer session.
Measure speed to netperf-west.bufferbloat.net (IPv4) while pinging gstatic.com.
Download and upload sessions are sequential, each with 5 simultaneous streams.
......
Download: 315.71 Mbps
Latency: [in msec, 5 pings, 0.00% packet loss]
Min: 21.131
10pct: 0.000
Median: 0.000
Avg: 22.856
90pct: 0.000
Max: 27.026
CPU Load: [in % busy (avg +/- std dev) @ avg frequency, 3 samples]
cpu0: 88.7 +/- 0.0 @ 1400 MHz
cpu1: 38.5 +/- 0.9 @ 1400 MHz
Overhead: [in % used of total CPU available]
netperf: 55.5
......
Upload: 322.22 Mbps
Latency: [in msec, 6 pings, 0.00% packet loss]
Min: 25.405
10pct: 0.000
Median: 0.000
Avg: 29.057
90pct: 0.000
Max: 35.089
CPU Load: [in % busy (avg +/- std dev) @ avg frequency, 4 samples]
cpu0: 100.0 +/- 0.0 @ 1400 MHz
cpu1: 7.9 +/- 2.3 @ 1400 MHz
Overhead: [in % used of total CPU available]
netperf: 4.8
AND for gawds sake - set "-t 5" ; 60 seconds is just much more than you need to run to get a valid result for your purposes.
The speedtest client itself uses a lot of router CPU. For an accurate benchmark of routing and VPN capacity, don't run the speedtest client on the router itself, run it on a PC connected through the router.