Hi John, On 22/08/15 22:12, joh...@fastmail.com wrote: > Hi Gert > > On Sat, Aug 22, 2015, at 12:57 PM, Gert Doering wrote: >> Jan Just is wondering since years why OpenVPN is "slow", but he's talking >> about "getting only 600Mbit out of a Gbit link" or such :-) > That would be nice! of course, I'm also interested in squeezing the maximum out of my own home cable connection. > >>> 18M->15.5M is ~ a 14% slowdown. I don't know if that's as good as it gets >>> or if more can be done.
I've been playing around with openvpn and iperf. My home cable connection is 40 Mbps down, 4 Mbps up, which I can verify using iperf, which gives me 40120 +/- 100 kbps and 4080 +/- 20 kbps. These numbers are for multiple testruns where I calculate the average and standard deviation (hey I'm an experimental physicist, OK). It is important to use the iperf results from the *receiving* end, which is the side where you start the server (iperf -s) . The numbers from the sending party are not particularly reliable, they tend to fluctuate much more, esp over UDP. This makes some sense, as the sending party spits out packets at a particular rate and it does not care whether they arrive or not. This will skew the results slightly. By playing around with the some parameters I can get pretty close to those number, but OpenVPN does give you an overhead of ~ 6 %, with IPv6 overhead slightly higher than IPv4 due to the longer addresses. Parameters I played with are: --sndbuf 0 --rcvbuf 0 ## tell the OS to do this - by far the best option --fragment 0 ## actually always made it slower --mssfix 0 ## this can make it *really* slow if used badly My gut feeling is that the "--sndbuf 0 --rcvbuf 0" might be a better default value, as most OSes do tcp auto-tuning now. It also improved OpenVPN-over-UDP performance for me, however. By using "just" --cipher aes-256-cbc --hash sha256 --sndbuf 0 --rcvbuf 0 (and let the rest remain default) I achieve 37776 +/- 200 kbps down IPv4 3817 +/- 4 kbps up IPv4 3776 +/- 5 kbps up IPv6 so that's a 5.8% overhead downstream and 6.4% resp 7.5% overhead upstream. IPv6 performance downstream is not as stable as I'd like, but is also about 1% less than IPv4. If I throw in --fragment 0 the overhead increases to about ~12%, which is what you are seeing as well. Can you test it on your 16x3 connection (I actually don't know what kind of connection that is) *without* the 'fragment 0' setting and let us know the results? cheers, JJK ------------------------------------------------------------------------------ _______________________________________________ Openvpn-users mailing list Openvpn-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-users