Hi - I like to have a permanent VPN connection between my two homes.
That is no longer an issue as I have openvpn 2.4.2 set up between two AESNI compatible boards and speeds are as expected, max bandwidth ( upload 30Mbit/s limit and download 100Mbit/s ) is used.
Also I managed to get satisfactory results between two RPi2 boards and openvpn2.4 ( both jessie and currently stretch ). Satisfactory meaning roughly 30Mbit both ways, which is more than convenient for streaming (U)HD as half of that would be just fine.
Yet I tried to move similar config to a RPiZero with Realtek 8152 LAN card ( ID 0bda:8152 Realtek Semiconductor Corp. ) and here it seems more tuning will be required if it will work at all ... My aim is to squish at least 20Mbit/s over VPN both ways.
The RPiZero shows currently following results ( below ) using iperf. It came to my attention whenever iperf starts to throw data in the VPN tunnel the openvpn process goes sky high ( 96% ), eg:
top - 15:00:27 up 42 min, 3 users, load average: 0.26, 0.10, 0.08
Tasks: 100 total, 2 running, 98 sleeping, 0 stopped, 0 zombie
%Cpu(s): 38.9 us, 23.2 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 37.9 si, 0.0 st
KiB Mem : 493252 total, 366508 free, 34804 used, 91940 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 403832 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
529 root 20 0 8224 4904 4280 R 95.9 1.0 1:40.77 /usr/sbin/openvpn --daemon ovpn-server --st+
This results in data transfers just below my requirements:
A/ server to client
---
root@rpivpn01:~# iperf -c 192.168.20.11 -t30 -P1
------------------------------------------------------------
Client connecting to 192.168.20.11, TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 3] local 10.8.0.1 port 52692 connected with 192.168.20.11 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-30.1 sec 45.9 MBytes 12.8 Mbits/sec
B/ client to server
---
root@rpivpn11:~# iperf -c 192.168.10.61 -t30 -P1
------------------------------------------------------------
Client connecting to 192.168.10.61, TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 3] local 10.8.0.2 port 53554 connected with 192.168.10.61 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-30.8 sec 54.8 MBytes 14.9 Mbits/sec
Fiddled around with some kernel settings already, mainly
- /proc/sys/net/core/rmem_max
- /proc/sys/net/core/wmem_max
- /proc/sys/net/ipv4/tcp_rmem
- /proc/sys/net/ipv4/tcp_wmem
But do not seem to manage squeezing the final bits so it will reach 20-25Mbit.
Anyone a hint to get this working on a RPiZero ?
TIA!
