I am seeing quite a noticeable performance variation between LE and Armbian on the same Amlogic S905 box for encryption and decryption use in OpenVPN, which should be relevant to all of us running Kodi with a VPN connection, using Zomboided, for instance.
LibreElec seems to deliver roughly half the throughput when compared to an Armbian install on the same hardware (NexBox A95X with a S905 AmLogic chipset - the non-X version).
Here are the stats:
LibreElec 8.0.1h-temp_sensor_disabled
Kodi:~ # openssl speed -evp aes-128-cbc
Doing aes-128-cbc for 3s on 16 size blocks: 4558454 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 64 size blocks: 1290974 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 256 size blocks: 334686 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 1024 size blocks: 84452 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 8192 size blocks: 10585 aes-128-cbc's in 3.00s
LibreSSL 2.4.4
built on: date not available
options:bn(64,32) rc4(ptr,int) des(idx,cisc,16,long) aes(partial) idea(int) blowfish(idx)
compiler: information not available
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-128-cbc 24311.75k 27540.78k 28559.87k 28826.28k 28904.11
Average throughput is ~27628 for LibreElec
Balbes ARMBIAN 5.27 stable Ubuntu 16.04.2 LTS 3.14.29 (headless server build):
kodi@amlogic-s905x:~$ openssl speed -evp aes-128-cbc
Doing aes-128-cbc for 3s on 16 size blocks: 8416879 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 64 size blocks: 2436154 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 256 size blocks: 637152 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 1024 size blocks: 161162 aes-128-cbc's in 3.00s
Doing aes-128-cbc for 3s on 8192 size blocks: 20208 aes-128-cbc's in 3.00s
OpenSSL 1.0.2g 1 Mar 2016
built on: reproducible build, date unspecified
options:bn(64,64) rc4(ptr,char) des(idx,cisc,16,int) aes(partial) blowfish(ptr)
compiler: cc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wa,--noexecstack -Wall -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
aes-128-cbc 44890.02k 51971.29k 54370.30k 55009.96k 55181.31k
Average throughput is ~52284 for Armbian.
Therefore it seems that LibreElec is only offering ~53% of the OpenVPN throughput performance compared to the same hardware running Armbian. Why is that?
And can this be used in our favor / utilized in future LE8 versions for the S905/X Amlogic boxes? In other words; are there any low-hanging fruits in terms of possible optimizations for encryption and decryption speed on LE8 in the future for the AmLogic boxes we use and grind on a daily basis?