What's new

OPENVPN speeds drop dramatically after a while?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

coen99

Occasional Visitor
Hello guys,

First of all I really like this forum. I just joined but I have been reading a lot of posts already and it helped me a lot with a few things.
However the problem I have I cannot solve.

I have a Asus AX88 with Merlin 384.9. Thanks Merlin for the all the good work!
I use a PC connected to the router via an ethernet cable.
I'm using PIA for VPN and it all works fine for a while (high speeds etc). I have a A+-A-A+ connection using QOS fq-codel.
But after a while (eg. when I go to sleep and the next morning but sometimes after a few hours) the speeds drop from 190MB to 5 MB/s. And the ping is horrible. Then when I turn the OPENVPN client OFF and directly back ON again everything works fine again.

OpenVPN Client Settings publish.png
t14hWX7w

Any ideas why?
cheers
 
Last edited:
Create a script to do a vpn restart as a cron job. that is what I have done however I don't know the syntax for a regular openvpn config. The provider may have implemented an encrypted QoS to break the encrypted thread. Typically this is implemented in a 24 hour range so a nightly reboot at about 6 AM should do the trick.
 
Hello guys,

First of all I really like this forum. I just joined but I have been reading a lot of posts already and it helped me a lot with a few things.
However the problem I have I cannot solve.

I have a Asus AX88 with Merlin 384.9. Thanks Merlin for the all the good work!
I use a PC connected to the router via an ethernet cable.
I'm using PIA for VPN and it all works fine for a while (high speeds etc). I have a A+-A-A+ connection using QOS fq-codel.
But after a while (eg. when I go to sleep and the next morning but sometimes after a few hours) the speeds drop from 190MB to 5 MB/s. And the ping is horrible. Then when I turn the OPENVPN client OFF and directly back ON again everything works fine again.

Given that a simple local restart of the VPN Client 'fixes' the throughput issue, it is highly likely that the issue is on the PIA end?

Depending on where the PIA VPN end-point is, it could simply be that the 'virtual' PIA VPN server used by your connection becomes oversubscribed/saturated, or worst case scenario - you are subject to PIA bandwidth shaping due to inactivity while you are asleep?

Being in the UK, I connect to the USA and implemented a crude "follow-the-sun" approach to extract as much VPN Client performance as possible i.e. flip between East coast (NY) and West Coast (LA) .

So although you can automate/implement a crude fix.... i.e. use cron to automaticially restart the VPN client just before you wake up, or use a more intelligent approach (see thread link below) and switch to another PIA configuration when the performance drops below your acceptable threshold.

Naturally you should contact PIA to see if they have an explanation, but I suspect you would also need to do some investigation work to try and identify precisely when the throughput degradation occurs.... i.e. a sudden immediate drop from 190Mbps to 5Mbps at the same time overnight say 03:00, or gradually over an extended period overnight say between several hours say 01:00-04:00

I see you have only recently joined, so perhaps scripting isn't something you feel like attempting, but perhaps this thread If OpenVPN provider is offline, failover to other provider? may be useful?
 
Thnx Guys for the really quick replies!

I send a email to PIA to see what they say.
The "follow the sun approach" seems also a good idea but first I'll wait for PIA.
Keep U informed.

Cheers

PS: Will keep track of the when and how.
 
Last edited:
BTW what would be a script to just simply restart the vpn client everyday at 7.00 am?

I'm a real noob as to scripting.
@Martineau: I read your WinSCP. So I know how to use that ;)

I got this far (I really feel a 2 year old talking to a University Prof)

script: restart.sh

#!/bin/sh
service restart_vpnclient1
exit
=================

CRONJOB

# restart 7:15AM
15 7 * * * /usr/local/bin/restart.sh

=================

That's it. I have no idea if this will work and will keep working, even after a firmware update?
I don't know where to put the cronjob file? What will be the extension of this file? .sh? etc.

Any help will be appreciated.

thnx in advance
UltraNoob

BTW: still waiting for a reply from PIA
 
BTW what would be a script to just simply restart the vpn client everyday at 7.00 am?

I'm a real noob as to scripting.
@Martineau: I read your WinSCP. So I know how to use that ;)

I got this far (I really feel a 2 year old talking to a University Prof)

script: restart.sh

#!/bin/sh
service restart_vpnclient1
exit
=================

CRONJOB

# restart 7:15AM
15 7 * * * /usr/local/bin/restart.sh

=================

That's it. I have no idea if this will work and will keep working, even after a firmware update?
I don't know where to put the cronjob file? What will be the extension of this file? .sh? etc.

I would use the following system script to automatically call your custom script say 'VPN_ClientCRONrestart.sh' once during the router boot cycle.

/jffs/scripts/init-start
Code:
#! /bin/sh

# Restart VPN Client
sh /jffs/scripts/VPN_ClientCRONrestart.sh
I personally use '.sh' files to differentiate my custom scripts from the system reserved scripts, so create your custom script as say

/jffs/scripts/VPN_ClientCRONrestart.sh
Code:
#! /bin/sh

# Restart VPN Client 1 @07:15 daily
logger -st "($(basename $0))" "Schedule Restart of VPN Client 1 @07:15 daily"
cru a VPN1_Restart "15 7 * * *" service restart_vpnclient1
but some prefer (rather than use init-start) to use the following system script

/jffs/scripts/services-start

see Wiki/documentation for Asuswrt-merlin , User scripts and Scheduled tasks (CRON) to understand the reserved scripts and usage etc.
 
Last edited:
Hello everyone,

I have been testing a lot, tried all kind of scenario's, even put on the Asus original firmware.
Finally I found the cause. It's the famous T o r r ent sharing software. This connects through the Sockes5 proxy port 1080.
If it runs and you turn off the VPNclient and turn it on again everything is fine and stays fine. This way I dismissed the software at first.
So if it's already running it does not have any impact. It's turning on this software that somehow has this effect (strange ?).

Anyway, I found the culprit causing this trouble ;) and wanted to share so maybe other people can benefit from it.
Or maybe you guys have an explanation?

Thank you all for your help and suggestions.
Cheers

BTW: I love this router, as the speeds of OPENVPN are great. The hardware acceleration of AES has certainly something to do with this. Nice to see that even at high transfer speeds and many clients the CPU is not breaking a sweat! Seems to be futureproof.
With my previous Asus AC66 I was happy to reach about 12Mb/s through OPENVPN, as now I reach the almost the max of my connection around 190Mb/s. Also the responsiveness to other clients stays. As with the AC66 the CPU was at 100% and nothing much else was possible.
 
Last edited:

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top