UPDATE (later that day…)
I re-ran the test, this time using the BBB as the server and the OpenVPN client was running in an Ubuntu VM on my Mac. The two devices were connected directly via Ethernet. As expected, the numbers are much better when they don’t travel across the world.

And the bandwidth results:
Over OpenVPN:
iperf -c 10.1.0.1 -t 20 ------------------------------------------------------------ Client connecting to 10.1.0.1, TCP port 5001 TCP window size: 21.8 KByte (default) ------------------------------------------------------------ [ 3] local 10.1.0.2 port 58840 connected with 10.1.0.1 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-20.1 sec 79.2 MBytes 33.1 Mbits/sec
Over raw TCP. Interestingly, this was slower. However, I only ran the test once.
iperf -c 192.168.2.10 -t 20 ------------------------------------------------------------ Client connecting to 192.168.2.10, TCP port 5001 TCP window size: 22.9 KByte (default) ------------------------------------------------------------ [ 3] local 10.0.2.15 port 59179 connected with 192.168.2.10 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-20.1 sec 68.4 MBytes 28.6 Mbits/sec
Original Post follows
A visitor asked about OpenVPN performance on the BeagleBone Black (BBB). It wasn’t too bad to set up OpenVPN on a server; I followed this tutorial. The test setup is as follows:
- OpenVPN client: BBB, located in the middle of the United States
- OpenVPN server: My Virtual Private Server, located in Europe
For various reasons I didn’t want to run the server on my local computer. I mention this because the measured bandwidth is not very impressive. However, the inquirer seemed more interested in CPU performance, so I think this test setup should be fine.
After I connect the client and server via the VPN, I ran iperf to gather the statistics. On the client, I used this clever script to capture CPU performance and prep the data for gnuplot. Gnuplot is one of those programs that I use once in blue-moon, so I’m posting the commands, mainly so I remember them next time 😉
set title "BeagleBone Black OpenVPN AES-128-CBC Performance" set ylabel "Idle CPU (percent)" set xlabel "Time (seconds)" set terminal postscript eps set output 'out.eps' plot "openvpn.txt" using 1:2 title 'OpenVPN' with lines, "no_vpn.txt" using 1:2 title "No VPN" with lines
Anyway, here are the results. Continue reading “BeagleBone Black OpenVPN Performance”