<div dir="ltr">Have you tried installing openssl and dependencies from Raspbian on the Debian image? It sounds like you already tried mixing the kernels, so that would be the next step to triangulate the issues, I think.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 30, 2018 at 6:24 PM, Mathieu Gallissot <span dir="ltr"><<a href="mailto:mathieu.gallissot@gmail.com" target="_blank">mathieu.gallissot@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear all,<div>I've been benchmarking openssl in aarch64 using the debian image and I'm surprised about the poor performance obtained. In the end i've got the raspian twice faster in 32bits than the 64bit debian.</div><div><br></div><div>Here is the test results on raspian 32bits </div><div><br></div><div>
<pre style="font-family:Consolas,Menlo,"Liberation Mono",Courier,monospace;margin:1em 1em 1em 1.6em;padding:8px;background-color:rgb(250,250,250);border:1px solid rgb(226,226,226);border-radius:3px;width:auto;overflow-x:auto;overflow-y:hidden;color:rgb(51,51,51);font-size:12px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">pi@raspberrypi:~ $ openssl version
OpenSSL 1.1.0f 25 May 2017
pi@raspberrypi:~ $ openssl speed -evp aes-256-cbc
Doing aes-256-cbc for 3s on 16 size blocks: 5462846 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 64 size blocks: 1778112 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 256 size blocks: 482197 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 1024 size blocks: 123167 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 8192 size blocks: 15496 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 16384 size blocks: 7754 aes-256-cbc's in 3.00s
OpenSSL 1.1.0f 25 May 2017
built on: reproducible build, date unspecified
options:bn(64,32) rc4(char) des(long) aes(partial) blowfish(ptr)
compiler: gcc -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -D SHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/lib/ssl\"<wbr>" -DENGINESDIR="\"/usr /lib/arm-linux-gnueabihf/<wbr>engines-1.1\""
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
aes-256-cbc 29135.18k 37933.06k 41147.48k 42041.00k 42314.41k 42347.18k</pre>
note : using a 64bits kernel doens't impact much the speed</div><div><br></div><div>And here are the same tests results on same hardware, but with an debian full 64bits image build with raspi3-image-spec</div><div>
<pre style="font-family:Consolas,Menlo,"Liberation Mono",Courier,monospace;margin:1em 1em 1em 1.6em;padding:8px;background-color:rgb(250,250,250);border:1px solid rgb(226,226,226);border-radius:3px;width:auto;overflow-x:auto;overflow-y:hidden;color:rgb(51,51,51);font-size:12px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">root@rpi3:~# openssl version
OpenSSL 1.1.0g 2 Nov 2017
root@rpi3:~# openssl speed -evp aes-256-cbc
Doing aes-256-cbc for 3s on 16 size blocks: 2648717 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 64 size blocks: 848118 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 256 size blocks: 229195 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 1024 size blocks: 58474 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 8192 size blocks: 7353 aes-256-cbc's in 3.00s
Doing aes-256-cbc for 3s on 16384 size blocks: 3678 aes-256-cbc's in 3.00s
OpenSSL 1.1.0g 2 Nov 2017
built on: reproducible build, date unspecified
options:bn(64,64) rc4(char) des(int) aes(partial) blowfish(ptr)
compiler: gcc -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/lib/ssl\"<wbr>" -DENGINESDIR="\"/usr/lib/<wbr>aarch64-linux-gnu/engines-1.1\<wbr>""
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
aes-256-cbc 14126.49k 18093.18k 19557.97k 19959.13k 20078.59k 20086.78k</pre>
I've tried to recompile on the board the package (using apt-get source and debuild) without luch results. I would expect the 64bit version to be at least at the same speed.</div><div>Any idea on how to increase the openssl speed ?</div><div><br></div><div>Best,</div><div>Mathieu </div></div>
<br>______________________________<wbr>_________________<br>
Pkg-raspi-maintainers mailing list<br>
<a href="mailto:Pkg-raspi-maintainers@lists.alioth.debian.org">Pkg-raspi-maintainers@lists.<wbr>alioth.debian.org</a><br>
<a href="https://lists.alioth.debian.org/mailman/listinfo/pkg-raspi-maintainers" rel="noreferrer" target="_blank">https://lists.alioth.debian.<wbr>org/mailman/listinfo/pkg-<wbr>raspi-maintainers</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Best regards,<br>Michael</div>
</div>