I've just finished setting up a VPN'ed NAS with my newly acquired un-overclocked Raspberry Pi Model-B and I've run into something I can't find an answer for elsewhere.
The internet bandwidth, as determined using
wget --output-document=/dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip
is much slower than what I'd expect to get. I'm getting around 1.34 MBps on my Pi through ethernet when I'm getting close to 7MBps when the ethernet is plugged directly into my laptop.
The problem is with OpenVPN, but I can't figure what exactly it is. Here's how I know this.
I compared the download rates on the Pi with the VPN turned off and on -- it was 5.03 MBPS vs 1.34 MBPS.
Then I tried it on my laptop (wired) -- it was 6.9 MBPS (perfect) vs 6.7 MBPS (near perfect).
So the fault doesn't lie entirely with my VPN service (PrivateInternetAccess) which gives a 3% reduction in bandwidth on my laptop -- but has to do with the way OpenVPN runs on the Pi which gives a 74% reduction in bandwidth.
Any ideas on why OpenVPN on Raspbian is being so terrible?
UPDATE: Most of that reduction from 6.9MBPS on the laptop without VPN to 5.03 MBPS on the Pi without VPN seems to be from the SD card write speed, which I've determined to be around 4.9MBPS. It's that huge reduction from 5.03 MPBS on the Pi without VPN to 1.3MBPS with VPN that needs to be explained.
UPDATE 2: Some more clues from suggestions from the comments: 1) OpenVPN utilizes 70% of the CPU when it is running and wget is in the background 2) On the Pi, I get 1.34 MBPS from a US VPN server and around 500-600 KBPS from ALL European VPN servers, BUT on my laptop,I get 6.7MBPS from the US VPN server and a very similar 6.6MBPS from some European servers like the one in Netherlands. What I'm saying is that distance to the server seems to disproportionately affect the Pi rather than my laptop.
top
while testing, that should say something about the encryption overhead.