Jump to content
Not connected, Your IP: 54.80.173.217
Sign in to follow this  

Recommended Posts

I am using a Raspberry Pi as a server, along with openVPN. When I am connected directly to the internet, or to a usenet server with SSL encryption, I can max out my connection at 1.6MB/s. If I used openvPN though I get 0.8MB/s at most. My guess is that I have a CPU problem, since my Raspberry Pi has not enough power to handle the encryption/decryption process. Nevertheless I could max out the connection with SSL. Is there a choice of protocol or configuration that could allow me to get higher speeds by a lower load on the cpu?

 

Best Regards

Share this post


Link to post

Hello!

 

Your analysis is probably correct, however watch out, OpenVPN over SSL will make things worse:

  • the CPU will have to encrypt/decrypt on the fly even more (one additional "encryption layer")
  • you will lose OpenVPN efficiency
  • you will have all the problems related to UDP over TCP over TCP

 

All in all for a Raspberry PI, 0.8 MB/s (6.4 Mbit/s) appears as a good performance for an AES-256-CBC throughput, some DD-WRT compatible routers do not even go near to that in real-life testings.

 

Kind regards

Share this post


Link to post

In fact the SSL 1.6MB/s speed I had was with RC4 encryption. I guess that I will settle with this speed then!

 

Thanks

Share this post


Link to post

Data points for the new Raspberry pi 2 - Raspbian (installed from NOOBS)

 
pi@rpi~ $ openssl speed md5 sha1 sha256 sha512 des des-ede3 aes-128-cbc aes-192-
cbc aes-256-cbc rsa2048 dsa2048
 
OpenSSL 1.0.1e 11 Feb 2013
 
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
md5               4424.63k    14538.54k    37895.36k    62648.66k    77733.89k
sha1              4465.32k    12760.15k    27185.41k    38208.17k    43475.14k
des cbc          10702.26k    11303.34k    11504.25k    11507.37k    11474.28k
des ede3          4018.59k     4100.12k     4138.98k     4130.82k     4131.50k
aes-128 cbc      18316.10k    20455.33k    21299.11k    21428.91k    21458.11k
aes-192 cbc      16046.11k    17708.76k    18081.71k    18285.23k    18277.20k
aes-256 cbc      14571.75k    15700.33k    16072.36k    16215.04k    16285.37k
sha256            5164.17k    11642.97k    19969.11k    24478.39k    26096.98k
sha512            1547.07k     6174.70k     8720.35k    11795.80k    13180.93k
                  sign    verify    sign/s verify/s
rsa 2048 bits 0.045545s 0.001409s     22.0    709.8
                  sign    verify    sign/s verify/s
dsa 2048 bits 0.013872s 0.016393s     72.1     61.0
 
Speed tests  - used a random debian file to download from their US mirrors
 
Unencrypted - 50/12 connection, running over wireless n. 
 
2.9.2+svn20120603-8_amd64.deb
word-dbg_2.9.2+svn20120603-8_amd64.deb
Resolving ftp.us.debian.org (ftp.us.debian.org)... 128.61.240.89, 64.50.236.52, 
64.50.233.100, ...
Connecting to ftp.us.debian.org (ftp.us.debian.org)|128.61.240.89|:80... connect
ed.
HTTP request sent, awaiting response... 200 OK
Length: 32409168 (31M) [application/octet-stream]
Saving to: `abiword-dbg_2.9.2+svn20120603-8_amd64.deb.8'
 
100%[======================================>] 32,409,168  4.54M/s   in 9.8s    
 
2015-03-23 01:27:26 (3.15 MB/s) - `abiword-dbg_2.9.2+svn20120603-8_amd64.deb.8' 
saved [32409168/32409168]
 
Consistent speed of 3.15 MB/s (25.2 Mbit/s) x 5.
 
 
TCP:443 (consistently 14/4 throttled by my ISP on i7 laptop)
 
2015-03-23 01:38:47 (1.31 MB/s) - `abiword-dbg_2.9.2+svn20120603-8_amd64.deb.9' 
saved [32409168/32409168]
 
2015-03-23 01:39:56 (1.06 MB/s) - `abiword-dbg_2.9.2+svn20120603-8_amd64.deb.10'
 saved [32409168/32409168]
 
2015-03-23 01:40:47 (1.36 MB/s) - `abiword-dbg_2.9.2+svn20120603-8_amd64.deb.11'
 saved [32409168/32409168]
 
2015-03-23 01:41:28 (1.22 MB/s) - `abiword-dbg_2.9.2+svn20120603-8_amd64.deb.12'
 saved [32409168/32409168]
 
Max 1.36 MB/s (10.88 Mbit/sec)
 
 
CPU average of ~10-25% during all downloads.
 
So perhaps a bit better than the previous.  Anyone else have speed numbers?

Share this post


Link to post

More data as I am able to play around.  

 

I do not have flash enabled on this browser, so can't use speedtest.net.  AirVPN speed test consistently gives results that are not consistent with the speed that I am seeing.  Typical download speeds using AirVPN test are 3 Mbit/sec out of tunnel, 0.25 Mbit/sec inside tunnel.  Uploads being 1 Mbit/sec outside, 0.05 Mbit/sec inside.  Does not match with either the "feel" of the speed I am getting (ie. no delay in any page loading or streaming video) or the numbers I get from downloading individual files.  Tried several HTML5 download monitors, no consistency between data.  So am using the poor man's version of a speed test, in downloading moderate and larger sized files from debian mirrors, which should at least give an approximation of speed.  (caveats of server load, distance from me, etc.)  Also, note caveat of being on Wifi and not direct ethernet.

 

Using AirVPN SSL (which doesn't get throttled by my ISP), which I typically get 40/10 Mbit/sec on an i7 laptop.  

Data on Raspberry Pi 2 with AirVPN SSL 

 

 pi@rpi ~ $ wget http://ftp.us.debian.org/debian/pool/main/a/abiword/abiword-dbg_2.9.2+svn20120603-8_amd64.deb

Resolving ftp.us.debian.org (ftp.us.debian.org)... 64.50.233.100, 64.50.236.52, 128.61.240.89, ...
Connecting to ftp.us.debian.org (ftp.us.debian.org)|64.50.233.100|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 32409168 (31M) [application/x-debian-package]
Saving to: `abiword-dbg_2.9.2+svn20120603-8_amd64.deb.13'
 
100%[======================================>] 32,409,168  3.29M/s   in 14s     
 
2015-03-24 14:27:57 (2.26 MB/s) - `abiword-dbg_2.9.2+svn20120603-8_amd64.deb.13' saved [32409168/32409168]
2015-03-24 14:28:16 (2.46 MB/s) - `abiword-dbg_2.9.2+svn20120603-8_amd64.deb.14' saved [32409168/32409168]
2015-03-24 14:28:32 (2.58 MB/s) - `abiword-dbg_2.9.2+svn20120603-8_amd64.deb.15' saved [32409168/32409168]
2015-03-24 14:28:51 (2.14 MB/s) - `abiword-dbg_2.9.2+svn20120603-8_amd64.deb.16' saved [32409168/32409168]
2015-03-24 14:30:34 (2.71 MB/s) - `abiword-dbg_2.9.2+svn20120603-8_amd64.deb.17' saved [32409168/32409168]
 
Average of 2.43 MB/s (19.44 Mbit/sec)
 
A bigger file (139M)
 
Resolving ftp.us.debian.org (ftp.us.debian.org)... 64.50.233.100, 64.50.236.52, 128.61.240.89, ...
Connecting to ftp.us.debian.org (ftp.us.debian.org)|64.50.233.100|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 145255554 (139M) [application/x-debian-package]
Saving to: `blender-dbg_2.73.a+dfsg0-1_i386.deb'
 
100%[==========================================>] 145,255,554 1.62M/s   in 60s     
 
2015-03-24 14:34:13 (2.29 MB/s) - `blender-dbg_2.73.a+dfsg0-1_i386.deb' saved [145255554/145255554]
2015-03-24 14:37:07 (2.23 MB/s) - `blender-dbg_2.73.a+dfsg0-1_i386.deb.1' saved [145255554/145255554]
 
Average of 2.26 MB/sec (18.08 Mbit/sec)
 
This stresses the processor more, and between openVPN and stunnel they are usually at 80-90% load.  So likely not going to get too much more than this.  But overall, a nice improvement (18-19 Mbit/sec) from the original Raspberry Pi (~6.5 Mbit/sec).
 
mlp

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image
Sign in to follow this  

×
×
  • Create New...