Cf2d6ab2e120b8f29fb734c653f5c743dd948dc3
By:
Zerqz

OpenVPN speed issues, but server and home speeds are more than optimal.

February 27, 2016 2.1k views
Server Optimization VPN Ubuntu

Following a guide to setup a openvpn server on a droplet, I've come to a puzzling conclusion.

*Testing my vps speed is:
Testing download speed........................................
Download: 607.40 Mbit/s
Testing upload speed..................................................
Upload: 264.37 Mbit/s
Testing my home speed NOT through vpn is:
Testing download speed........................................
Download: 146.77 Mbit/s
Testing upload speed..................................................
Upload: 10.86 Mbit/s
Testing my home connection TO my vps:
Testing download speed........................................
Download: 144.83 Mbit/s
Testing upload speed..................................................
Upload: 11.87 Mbit/s*
BUT after connecting to my openvpn setup, USING port **443/tcp not the defaults** .......

Testing download speed........................................
Download: 11.33 Mbit/s
Testing upload speed..................................................
Upload: 4.12 Mbit/s

Why is it nerfed so hard?

Is there anything I can do about this? I don't think it has anything to do with my ISP throttling my connection, as I have not had any issues with any other services. Even using a paid for vpn, like PIA, gives me slightly better speeds.

Edit:
Here's my config


port 443
proto tcp
dev tun
sndbuf 0
rcvbuf 0
ca ca.crt
cert server.crt
key server.key
dh dh.pem
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
keepalive 10 120
comp-lzo                                            #Tried with and without
persist-key
persist-tun
status openvpn-status.log
verb 0
crl-verify crl.pem

1 Answer

Hi,

Can you post the results of running Top, or otherwise looking at the CPU performance of your Droplet while using your OpenVPN setup? It's possible you're maxing out or pushing the resources of the Droplet as you send traffic through it.

  • 
    %Cpu(s):  5.6 us,  2.1 sy,  0.0 ni, 89.8 id,  0.0 wa,  0.0 hi,  1.1 si,  1.4 st
    KiB Mem:    500660 total,   467992 used,    32668 free,   138524 buffers
    KiB Swap:        0 total,        0 used,        0 free.   227488 cached Mem
    
      PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND
     1280 root      20   0   31364   5268   4076 S 10.3  1.1   0:22.69 openvpn
    24208 root      20   0   98436   6524   5580 S  0.7  1.3   0:00.03 sshd
        3 root      20   0       0      0      0 S  0.3  0.0   0:00.12 ksoftirqd/0
    24195 userxx     20   0   25228   2888   2488 R  0.3  0.6   0:00.07 top
        1 root      20   0   37572   5172   3484 S  0.0  1.0   0:20.07 systemd
        2 root      20   0       0      0      0 S  0.0  0.0   0:00.04 kthreadd
        5 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 kworker/0:0H
        7 root      20   0       0      0      0 S  0.0  0.0   0:06.65 rcu_sched
        8 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcu_bh
        9 root      20   0       0      0      0 R  0.0  0.0   0:06.57 rcuos/0
       10 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuob/0
       11 root      rt   0       0      0      0 S  0.0  0.0   0:00.00 migration/0
    

    That was done while running 2 simultaneous speed tests on separate clients.
    and the DO cpu usage graph doesn't show anything over 7%

    This openvpn server is running on a 5$ droplet with nothing else on it.

Have another answer? Share your knowledge.