I configured wireguard on my openwrt router, Xiaomi Redmi AC2100 which has MT7621 in it.
However, the wireguard speed is around 35Mbps lower than I expected.
As the speed without vpn is higher than 250Mbps, I expected wireguard speed would be higher than 100Mbps, the result is as low as 35Mbps.
The test clients are windows 10 laptop, macbook, iphone, which results almost the same speed.
There is no need to masquerade the wg firewall zone.
Also no need for wan->wg forwarding. If I understand properly the wan is the outside internet zone.
Don't use endpoint_port orendpoint_host in the peer configuration part.
Check with top or htop the cpu utilization during the file transfer.
Is the speedtest initiated from wan or wg?
=> The speedtest app on wireguard client sends packet to the wireguard server on openwrt.
Which one is this peer?
Previously I tought that you meant in client config.
Now I just deleted the followings from /etc/config/network on openwrt server.
option endpoint_port '31194'
option endpoint_host ''
I agree with you this information isn't required on server.
However, the speed test result is the same as before.
It looks that Luci doesn't allow to select only HW flow offloading.
It allows to select both of HW flow offloading and SW flow offloading, or allows to select only SW flow offloading like the following 2 pictures.
Is this normal?
Anyway the speed test result is the same.
I doubt that this supports Hardware flow offloading.
As I'm currently in another country, I just found that their internet is ADSL, different from my country.
The place where I currently test uses ADSL, whose upload speed is only around 35Mbps. So the speed of wireguard server on the peer over the internet is restricted to 35Mbps, because vpn traffic both uploads and downloads in terms of vpn server.
Therefore, I just changed the test environment, which set the wireguard server on the intranet with the wireguard client, then the wireguard speed is about 87Mbps whose speed is still restricted by old test router wan 100Mbps speed.
The test environment is currently restricted, I can't test further for now.
But I expect that wireguard speed on my device will be higher than 87Mbps hopefully over 100Mbps, if use new router later.
Can confirm that it is nothing to do with OpenWrt, nor your device. I have the same Redmi AC2100 with 19.07.5 and using Wireguard. The speed of your WAN connection, what ultimately decices your throughput with WG. And I can tell you, I only had positive experiences with WG on OpenWRT.
Also, if you are setting up a full WG tunnel (understand as: allowing 0.0.0.0/0 on your peer - mobile app client, whatever), you don't need to set up a separate firewall zone for the WG interface on your OpenWRT wireguard "server". You can instead add the wg interface to your LAN zone, or create an alternative LAN (VLAN) zone and forward that to WAN, and add the full tunnel WG interface to it - you don't want to forward your "main" LAN...
You can also test your speed with iperf3 as mentioned with a "split tunnel" configuration, eg. allowing only internal LAN forwardings on both sides. The tunnel will still use your WAN connection as a backbone, so you would get more realistic statistics this way (instead of relying on some shady, no-name "speedtest app" that connects to who-knows-what crappy server)
Thanks for your reply
Good to hear you have the same device as mine.
I sent the device to the peer side over internet which is not ADSL. And the throughput result by speedtest is higher than 100Mbps which I expected in real internet. The test server on speedtest including ISP is definitely reliable.
I'll check stability more, but so far so good!
In my tests, wireguard performance did drop a lot, even at less than half the original rate without offload enabled. I am investigating this issue and will update here if I find anything.