Hi,
I'm facing a speed problem with openvpn. I have a VPS server with a 1gbit link from scaleway and I also have a 1gbit fiber optic connection frim my ISP.
Without any vpn, the server can output at least at 700 mbit, as show the iperf3 test result :
$ iperf3 -c 4.testdebit.info -i 1 -Z
Connecting to host 4.testdebit.info, port 5201
[ 4] local YYY.YYY.YYY.YYY port 47877 connected to 89.84.127.61 port 5201
[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 4] 0.00-1.00 sec 88.8 MBytes 745 Mbits/sec 42 201 KBytes
[ 4] 1.00-2.00 sec 89.0 MBytes 746 Mbits/sec 19 222 KBytes
[ 4] 2.00-3.00 sec 89.5 MBytes 751 Mbits/sec 22 277 KBytes
[ 4] 3.00-4.00 sec 87.4 MBytes 733 Mbits/sec 24 211 KBytes
[ 4] 4.00-5.00 sec 90.0 MBytes 755 Mbits/sec 78 204 KBytes
[ 4] 5.00-6.00 sec 87.1 MBytes 731 Mbits/sec 4 274 KBytes
[ 4] 6.00-7.00 sec 88.1 MBytes 739 Mbits/sec 20 246 KBytes
[ 4] 7.00-8.00 sec 87.5 MBytes 734 Mbits/sec 55 194 KBytes
[ 4] 8.00-9.00 sec 88.3 MBytes 741 Mbits/sec 2 273 KBytes
[ 4] 9.00-10.00 sec 88.7 MBytes 744 Mbits/sec 8 270 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-10.00 sec 884 MBytes 742 Mbits/sec 274 sender
[ 4] 0.00-10.00 sec 883 MBytes 740 Mbits/sec receiver
If I do the same test from my vps server to my home, I get the almost the same results (but with a lot of retries packets) :
$ iperf3 -c $home -i 1 -Z
Connecting to host XXX.XXX.XXX.XXX, port 5201
[ 4] local YYY.YYY.YYY.YYY port 46157 connected to XXX.XXX.XXX.XXX port 5201
[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 4] 0.00-1.00 sec 68.2 MBytes 572 Mbits/sec 2867 262 KBytes
[ 4] 1.00-2.00 sec 83.9 MBytes 703 Mbits/sec 1714 314 KBytes
[ 4] 2.00-3.00 sec 77.1 MBytes 645 Mbits/sec 2679 370 KBytes
[ 4] 3.00-4.00 sec 82.5 MBytes 693 Mbits/sec 578 263 KBytes
[ 4] 4.00-5.00 sec 84.7 MBytes 711 Mbits/sec 0 291 KBytes
[ 4] 5.00-6.00 sec 76.8 MBytes 644 Mbits/sec 4456 549 KBytes
[ 4] 6.00-7.01 sec 57.1 MBytes 477 Mbits/sec 3538 348 KBytes
[ 4] 7.01-8.00 sec 88.8 MBytes 749 Mbits/sec 5 283 KBytes
[ 4] 8.00-9.00 sec 87.5 MBytes 734 Mbits/sec 2 225 KBytes
[ 4] 9.00-10.00 sec 86.2 MBytes 723 Mbits/sec 0 259 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-10.00 sec 793 MBytes 665 Mbits/sec 15839 sender
[ 4] 0.00-10.00 sec 789 MBytes 662 Mbits/sec receiver
iperf Done.
So everything seems to be ok without openvpn.
I then start an openvpn tunnel
without encryption, neither fragmentation and using 16000 bytes for mtu value (1500 gives me bad result, from 6000 to 48000 it doesn't change anything).
Server :
$ sudo openvpn --verb 4 --dev tun --proto udp --port 11000 --ifconfig 10.200.0.1 10.200.0.2 --cipher none --auth none --fragment 0 --mssfix 0 --tun-mtu 16000
Client :
$ sudo openvpn --verb 4 --dev tun --proto udp --port 11000 --ifconfig 10.200.0.2 10.200.0.1 --cipher none --auth none --remote YYY.YYY.YYY.YYY --fragment 0 --mssfix 0 --tun-mtu 160
And when I try the same iperf3 test, this time using the tunnel local ip address, results are showing
50% penalty :
$ iperf3 -c 10.200.0.2 -i 1 -Z
Connecting to host 10.200.0.2, port 5201
[ 4] local 10.200.0.1 port 34403 connected to 10.200.0.2 port 5201
[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 4] 0.00-1.00 sec 43.0 MBytes 360 Mbits/sec 8 841 KBytes
[ 4] 1.00-2.00 sec 38.8 MBytes 325 Mbits/sec 2 716 KBytes
[ 4] 2.00-3.00 sec 36.2 MBytes 304 Mbits/sec 2 623 KBytes
[ 4] 3.00-4.00 sec 37.5 MBytes 315 Mbits/sec 7 576 KBytes
[ 4] 4.00-5.00 sec 35.0 MBytes 294 Mbits/sec 0 639 KBytes
[ 4] 5.00-6.00 sec 36.2 MBytes 304 Mbits/sec 0 701 KBytes
[ 4] 6.00-7.00 sec 38.8 MBytes 325 Mbits/sec 2 607 KBytes
[ 4] 7.00-8.00 sec 36.2 MBytes 304 Mbits/sec 0 701 KBytes
[ 4] 8.00-9.00 sec 37.5 MBytes 315 Mbits/sec 0 748 KBytes
[ 4] 9.00-10.00 sec 36.2 MBytes 304 Mbits/sec 1 592 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-10.00 sec 375 MBytes 315 Mbits/sec 22 sender
[ 4] 0.00-10.00 sec 373 MBytes 313 Mbits/sec receiver
That's kind of sucks 🙁
For the record, the vps server has this cpu : VIA Nano processor U2250 (1.6GHz Capable)
The host is a mac mini with an Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
At least also tried all the same tests from another vps server with an Intel Atom cpu, and the resulsts were identical.
There must be something I'm missing, because on this
wiki page they can easily get gbit speed without encryption.
Any help is highly appreciated.