kylemanna / docker-openvpn

🔒 OpenVPN server in a Docker container complete with an EasyRSA PKI CA
https://hub.docker.com/r/kylemanna/openvpn/
MIT License
8.74k stars 2.39k forks source link

Slow Speed On default config #238

Open un33k opened 7 years ago

un33k commented 7 years ago

Bug? Enhancement?

Normal download speed of my ISP is 300 Mbps. Internet -> Mac Pro. After going through VPN the speed is around 19.81 Mbps.

Configuration:

Any configuration tweaking that may be required?

kylemanna commented 7 years ago

I would see the low-end 512 MB DO droplet max out around 100Mb/s when I used it for my home network. I have since stopped that and now use it only for traveling remotely.

The CPU usage you mention was on which end, the MacPro or the droplet? Sounds like a network bottleneck if the CPU utilization is that low. Where'd you get the VPN client?

I'd recommend setting up iperf and doing some tests. I do think it's possible for some OpenVPN optimizations, but you should be doing 2-5x better then you are.

un33k commented 7 years ago

@kylemanna I update the question with more info. Thx

pieterlange commented 7 years ago

Im assuming you're tunnelling over TCP, in which case you may wish to disable comp-lzo and do some other openvpn configuration tuning related to connecting over TCP. These are going to be mostly user-specific..

un33k commented 7 years ago

@kylemanna what cipher key size did you use? Extreme security is not a need. Just when traveling to various countries on business, need to have fast access. On last travel, a 10Mps ADSL pipe was reduced to 1Mps throughput when going through my VPN. So, perhaps someone with a lower encryption key length experience who can share their results here?

kylemanna commented 7 years ago

I used the default crypto options to get to 100Mb/s on DO droplet. This was a while ago as I don't tunnel all my traffic like I used to.

qrzeller commented 7 years ago

Its the same for me, speed not above 20Mb/s. up or down

I tried to figure on my own. As I see some comment maybe it whorth investigate inside openvpn conf? Asside that, thanks for your config @kylemanna, time-saver and easy