6

I have set up a VPS with openVPN running on centOS. The VPN works, but it's too slow.

Is there a way to speed this up using open multiple connections like IDM or aria2?

I'm using openVPN but I'm open to use any other VPN on the server side with any third-party software on the client side.

  • Have you tested the speed from your server with scp or similar tool? I doubt that the problem is in OpenVPN itself, more likely the problem is in the network connectivity from that server. – Tero Kilkanen Mar 12 '16 at 16:38
  • @TeroKilkanen The problem with my ISP the internet is very slow. the best thing for speed it, the accelerating. – Adam Mo. Mar 12 '16 at 17:13
  • 4
    If the network connection itself is slow, there is no magic trick to accelerate it. You need to get a better connection. – Tero Kilkanen Mar 12 '16 at 17:25
8
+50

The number one way to increase the speed of the connection is to work with the internet service provider (ISP).

If the physical link is 1 Mbps symmetrical with 100 ms latency to the server, you will not be able to accelerate that beyond 1 Mbps and 100 ms latency via software.

You can add additional physical links to the connection increasing the overall bandwidth but additional links will not improve the latency. If latency needs to be improved you may need to find a different ISP.

Remember to look at both ends of the VPN connection; both the server-side and the client-side. You will not get the desired effect improving one-side if the bottleneck is already on the other-side.

| improve this answer | |
6

First off, check that your bottleneck is not the CPU required for encryption on your VPN. If your CPU is already maxed then no arrangement of spreading your traffic over multiple connections at the existing VPN server can help, though increasing the CPU resources available could.

A major limitation on the speed of any TCP connection is from the combination of Round Trip Time (aka ping) and Window size. See Wikipedia for more on that. Connections through your VPN may have a long round trip time, depending where your VPN is located. You may be able to improve things with some tuning of the TCP receive window size, but you might want to think first about the location of your VPN server. The effectiveness of increasing the TCP Window size is limited by the packet loss rate.

If you connect to your OpenVPN server over TCP, and it's a long way away, that link may be constrained by the RTT/Receive window size, and the limit imposed is on the total for all the traffic you put through that link. Connecting to OpenVPN over UDP might help there.

If you really want to have a go at spreading your traffic over multiple VPN links, you could look at this advanced routing guide, but it looks daunting. It gives an outline of how things work, and some of the commands necessary to put it in place, but being able to debug the setup would require quite a lot more than is presented. It seems likely that there should be a higher level tool to manage this, but I don't know it. I'd be interested to hear about such a thing.

| improve this answer | |
  • If you are on AWS you can use AES based algorithms with OpenVPN (by default will be used CBC Blowfish), as their CPU has hardware acceleration for the AES - Intel AES NI – ALex_hha Mar 22 '16 at 16:33
  • High level tool? :) Sorry, no such thing in linux kernel. AFAIK it's the only way. – Michal Sokolowski Apr 5 '16 at 11:55
  • @MichalSokolowski I'd expect such a tool to sit outside the kernel and just manage the configuration using the lower level commands available. – mc0e Apr 5 '16 at 12:57
  • Hmm, iproute2 is exactly the thing you described. – Michal Sokolowski Apr 5 '16 at 12:59
  • @MichalSokolowski That guide uses iproute2 commands, which is what prompted me to wonder about a higher level tool. – mc0e Apr 5 '16 at 13:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.