Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This is a big headache for me for a few days now.

I having 2 servers on different location. We use OpenVPN to connect between the 2 servers.

Server1 has a Uplink of ~100mbps (OPENVPN Server)
Server2 has a Uplink of ~50mbps  (OPENVPN Client)

However, after i config the openVPN within the 2, i can hardly surpass 2mbps speed.

I use HTTP to test the uplink of each other.

              HTTP, NO VPN         HTTP, WITH VPN
SV1<->SV2     48mbps(6MB/s)        2-3mbps (~200-300KB/s)

Here is my Configuration on serverside (SV1):

port 1194
proto udp
dev tun
#tun-mtu 9000
fragment 0
mssfix 0
ca ca.crt
cert mysite.crt
key mysite.key
dh dh1024.pem
cipher none
auth none
server 10.8.0.0 255.255.255.0
keepalive 10 120
comp-lzo
max-clients 1
persist-key
persist-tun
#status openvpn-status.log
#verb 3

On Client Side (SV2)

client
proto udp
dev tun
#tun-mtu 9000
remote 123.34.56.7 1194
resolv-retry infinite
nobind
#persist-key
#persist-tun
cipher none
auth none
ca ca.crt
cert mysite.crt
key mysite.key
comp-lzo
#verb 3

Most of the test on iperf showing the same speed at 1mbps.

[ ID] Interval       Transfer     Bandwidth       Jitter   Lost/Total Datagrams
[1884]  0.0-10.0 sec  1.20 MBytes  1.00 Mbits/sec  6.220 ms   38/  893 (4.3%)
[1884] local 10.8.0.1 port 11100 connected with 10.8.0.6 port 54784
[ ID] Interval       Transfer     Bandwidth       Jitter   Lost/Total Datagrams
[1884]  0.0-10.0 sec  1.21 MBytes  1.01 Mbits/sec  6.307 ms   29/  893 (3.2%)
[1884] local 10.8.0.1 port 11100 connected with 10.8.0.6 port 50475
[ ID] Interval       Transfer     Bandwidth       Jitter   Lost/Total Datagrams
[1884]  0.0-10.0 sec  1.19 MBytes   996 Kbits/sec  6.564 ms   45/  893 (5%)
[1884] local 10.8.0.1 port 11100 connected with 10.8.0.6 port 44565
[ ID] Interval       Transfer     Bandwidth       Jitter   Lost/Total Datagrams
[1884]  0.0-10.0 sec  1.20 MBytes  1.01 Mbits/sec  6.152 ms   34/  893 (3.8%)

What should I do to improve this?

share|improve this question

migrated from stackoverflow.com May 13 '12 at 15:45

This question came from our site for professional and enthusiast programmers.

1 Answer 1

One reason might be that UDP traffic is shaped somewhere. Try running iperf with -u -p 1194 directly between the servers without using OpenVPN. If that is still slow try different ports and vary between UDP and TCP with iperf to see if it makes a difference.

If the CPU is really old in any of the servers also try removing the compression option comp-lzo.

share|improve this answer
    
Is it normal that if i set -t=60 it is goes up to 6mbps and if i set -t=180 it is go up to 16mbps? –  DucDigital May 13 '12 at 16:34
1  
When using TCP it takes time to reach the full possible speed of the connection so that might be ok. If this is with UDP I am puzzled. –  Johan Nilsson May 17 '12 at 8:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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