OpenVPN client performance is slow and cpu load is only 25%.

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Advanced Networking
Author Message
bales33
DD-WRT Novice


Joined: 21 May 2019
Posts: 1

PostPosted: Tue May 21, 2019 14:43    Post subject: OpenVPN client performance is slow and cpu load is only 25%. Reply with quote
Guys,

I'm trying to setup VPN client on my router to tunnel all internet connection through it. Specs:

Router: NetGear R6400 v2
CPU: Broadcom BCM4708C0 (1 GHz, 2 cores)

Configuration:




On my desktop, i'm reaching around 100mb/s.
While running on router i get only around 30 mb/s.

During the speedtest load, the router's cpu is only loaded at 25% maximum (0.25). So it looks like the cpu is not the problem.



What might be the reason for such degradated performance?
Can i do anything to improve it?
Sponsor
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 8034

PostPosted: Tue May 21, 2019 15:24    Post subject: Reply with quote
https://www.snbforums.com/threads/expressvpn-setup-app-vs-manual-configuration-in-asus-routers.46341/#post-482239
_________________
DD-WRT: DNS Leak Detection w/ VPNs (updated 6/5/19)
NEW SCRIPT!: ddwrt-mount-usb-drives.sh
NEW SCRIPT!: ddwrt-blacklist-domains.sh
NEW SCRIPT!: ddwrt-ovpn-remote-access.sh
NEW SCRIPT!: ddwrt-pptp-policy-based-routing.sh
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 4362
Location: Netherlands

PostPosted: Tue May 21, 2019 16:30    Post subject: Reply with quote
I have an R6400v2 running OpenVPN to PIA it will get me max 35Mb/s when it is not doing anything else and with AES 128.

If you want faster VPN speed you need a faster router like an R7800.

I saw an interesting paper by Jason Donenfeld (Wireguard) and one of the reasons it is much faster is that everything is done in kernel space.
So the switching between user and kernel space looks like one of the main culprits of slow performance of OpenVPN on these simple ARM cores

_________________
Routers:Netgear R7800, Netgear R6400v1, Netgear R6400v2, Linksys EA6900 (XvortexCFE), Linksys E2000 (converted WRT320N), WRT54GS v1.
Install guide Linksys EA6900: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=291230
OpenVPN Policy Based Routing guide: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321686
Install guide R6400v2:http://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
OpenVPN Server Setup:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318795
Install guide R7800: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Wireguard Setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1183135
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 8034

PostPosted: Tue May 21, 2019 16:43    Post subject: Reply with quote
Yep, I'm convinced at this point it's ring changes that's the ultimate culprit here. And that means there's not a darn thing you can do about it except throw more horsepower at it. The same thing happened w/ PPTP in its heyday. Jumping from user space to kernel space and back is extremely expensive in terms of time required to make that transition.

If you want better performance, you have two options; get a better router (probably 1.4GHz min, and the more the better), or move the VPN to a server, crappy old PC, etc., anything but the router.

_________________
DD-WRT: DNS Leak Detection w/ VPNs (updated 6/5/19)
NEW SCRIPT!: ddwrt-mount-usb-drives.sh
NEW SCRIPT!: ddwrt-blacklist-domains.sh
NEW SCRIPT!: ddwrt-ovpn-remote-access.sh
NEW SCRIPT!: ddwrt-pptp-policy-based-routing.sh
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum