Here's the deal - I want to use my RPi 4 as a torrent box (obviously, with VPN (I use ExpressVPN)), but I just don't seem to get enough speed out of it.
My setup is basically RPi 4 connected to an external drive with all meaningful stuff running on docker. haugene/docker-transmission-openvpn seemed like a good candidate, but all i got was lousy ~80 MBps. To verify my suspicion, I've pulled another docker image (raspbian/stretch), installed openvpn and speedtest there, and, indeed, with VPN it's ~80Mbps, without - ~250Mbps (with ~50% packets lost).
I gave an official client from ExpressVPN a shot (apparently they support Raspbian), but speed was even worse (~30Mbps). After I've reached out to their support, they basically shrugged and said that they don't have RPi atm to test it, but they might look into it at some point.
I thought that CPU might be a bottleneck, but CPU usage didn't even reach 20%, so I doubt that this is the case. I've seen posts where people explained that RPi 4 hardware doesn't support AES, but even without encryption speed remained the same.
My old setup is FreeNAS running on some old PC, which gives me great speed with Transmission and OpenVPN running in jail and I vaguely remember that in order to fix similar problem I set couple variables (don't remember why did they have to be exactly these values):
Code: Select all
kern.ipc.maxsockbuf=5242880
net.inet.udp.recvspace=4194304Code: Select all
transmission openvpn[53761]: Socket Buffers: R=[4194304->524288] S=[9216->524288]Code: Select all
Socket Buffers: R=[163840->327680] S=[163840->327680]Sorry for the long post :) I hope that someone has seen this before and somehow fixed it. If someone is using another VPN provider and is able to achieve decent speed on their PI, i'm also curious, since I'm not really married to ExpressVPN.