Performance Issue With OpenSSL 1.1.1c
Dennis Clarke
dclarke at blastwave.org
Tue May 28 23:07:01 UTC 2019
> I also noticed that with 1.1.1b, the CFLAGS automatically included
> '-Wall -O3', but with 1.1.1c, '-Wall -O3' is no longer included in the
> CFLAGS. was this dropped? I added '-Wall -O3' to the CFLAGS, but this
> did not seem to have any affect on the performance issue (unrelated?).
>
> This is for a 32-bit ARM build.
>
> Jay
Well, for what it is worth, on ye old Solaris 10 sparc world things were
horrific before and horrific after an upgrade. No optimization at all.
Slightly better but still horrific :
beta # uname -a
SunOS beta 5.10 Generic_150400-65 sun4u sparc SUNW,SPARC-Enterprise
beta #
beta # psrinfo -pv
The physical processor has 8 virtual processors (0-7)
SPARC64-VII+ (portid 1024 impl 0x7 ver 0xa1 clock 2860 MHz)
beta #
* * * before * * *
beta # /usr/local/bin/openssl speed rsa
Doing 512 bits private rsa's for 10s: 12665 512 bits private RSA's in 9.99s
Doing 512 bits public rsa's for 10s: 239095 512 bits public RSA's in 10.00s
Doing 1024 bits private rsa's for 10s: 2453 1024 bits private RSA's in 9.99s
Doing 1024 bits public rsa's for 10s: 95296 1024 bits public RSA's in 10.00s
Doing 2048 bits private rsa's for 10s: 400 2048 bits private RSA's in 10.01s
Doing 2048 bits public rsa's for 10s: 29899 2048 bits public RSA's in 10.00s
Doing 3072 bits private rsa's for 10s: 164 3072 bits private RSA's in 10.04s
Doing 3072 bits public rsa's for 10s: 14204 3072 bits public RSA's in 10.00s
Doing 4096 bits private rsa's for 10s: 78 4096 bits private RSA's in 10.00s
Doing 4096 bits public rsa's for 10s: 8257 4096 bits public RSA's in 10.00s
Doing 7680 bits private rsa's for 10s: 16 7680 bits private RSA's in 10.56s
Doing 7680 bits public rsa's for 10s: 2439 7680 bits public RSA's in 10.00s
Doing 15360 bits private rsa's for 10s: 3 15360 bits private RSA's in 13.18s
Doing 15360 bits public rsa's for 10s: 622 15360 bits public RSA's in 10.00s
OpenSSL 1.1.1b 26 Feb 2019
built on: Tue Mar 26 06:51:39 2019 UTC
options:bn(64,32) rc4(char) des(int) aes(partial) idea(int) blowfish(ptr)
compiler: /opt/developerstudio12.6/bin/cc -KPIC -m64 -Xa -g
-errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff
-xmemalign=8s -xnolibmil -xcode=pic32 -xregs=no%appl -xlibmieee -mc
-ftrap=%none -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -xarch=sparc
-xdebugformat=dwarf -xstrconst -m64 -xarch=sparc -g -Xa -errfmt=error
-erroff=%none -errshort=full -xstrconst -xildoff -xmemalign=8s
-xnolibmil -xcode=pic32 -xregs=no%appl -xlibmieee -mc -ftrap=%none
-xbuiltin=%none -xunroll=1 -Qy -xdebugformat=dwarf -DFILIO_H -DB_ENDIAN
-DBN_DIV2W -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT
-DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM
-DAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -D_REENTRANT
-DNDEBUG -I/usr/local/include -D_POSIX_PTHREAD_SEMANTICS
-D_LARGEFILE64_SOURCE -D_TS_ERRNO
sign verify sign/s verify/s
rsa 512 bits 0.000789s 0.000042s 1267.8 23909.5
rsa 1024 bits 0.004073s 0.000105s 245.5 9529.6
rsa 2048 bits 0.025025s 0.000334s 40.0 2989.9
rsa 3072 bits 0.061220s 0.000704s 16.3 1420.4
rsa 4096 bits 0.128205s 0.001211s 7.8 825.7
rsa 7680 bits 0.660000s 0.004100s 1.5 243.9
rsa 15360 bits 4.393333s 0.016077s 0.2 62.2
beta #
* * * after * * *
beta # /usr/local/bin/openssl version
OpenSSL 1.1.1c 28 May 2019
beta # /usr/local/bin/openssl speed rsa
Doing 512 bits private rsa's for 10s: 13654 512 bits private RSA's in 9.99s
Doing 512 bits public rsa's for 10s: 238275 512 bits public RSA's in 10.00s
Doing 1024 bits private rsa's for 10s: 2665 1024 bits private RSA's in
10.00s
Doing 1024 bits public rsa's for 10s: 95371 1024 bits public RSA's in 9.99s
Doing 2048 bits private rsa's for 10s: 431 2048 bits private RSA's in 9.99s
Doing 2048 bits public rsa's for 10s: 29914 2048 bits public RSA's in 10.00s
Doing 3072 bits private rsa's for 10s: 164 3072 bits private RSA's in 10.04s
Doing 3072 bits public rsa's for 10s: 14256 3072 bits public RSA's in 9.99s
Doing 4096 bits private rsa's for 10s: 80 4096 bits private RSA's in 10.06s
Doing 4096 bits public rsa's for 10s: 8278 4096 bits public RSA's in 10.00s
Doing 7680 bits private rsa's for 10s: 16 7680 bits private RSA's in 10.34s
Doing 7680 bits public rsa's for 10s: 2437 7680 bits public RSA's in 9.99s
Doing 15360 bits private rsa's for 10s: 3 15360 bits private RSA's in 13.17s
Doing 15360 bits public rsa's for 10s: 621 15360 bits public RSA's in 10.01s
OpenSSL 1.1.1c 28 May 2019
built on: Tue May 28 19:37:03 2019 UTC
options:bn(64,32) rc4(char) des(int) aes(partial) idea(int) blowfish(ptr)
compiler: /opt/developerstudio12.6/bin/cc -KPIC -m64 -xarch=sparc -g -Xa
-errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff
-xmemalign=8s -xnolibmil -xcode=pic32 -xregs=no%appl -xlibmieee -mc
-ftrap=%none -xbuiltin=%none -xunroll=1 -Qy -xdebugformat=dwarf
-xstrconst -Xa -m64 -xarch=sparc -g -Xa -errfmt=error -erroff=%none
-errshort=full -xstrconst -xildoff -xmemalign=8s -xnolibmil -xcode=pic32
-xregs=no%appl -xlibmieee -mc -ftrap=%none -xbuiltin=%none -xunroll=1
-Qy -xdebugformat=dwarf -DFILIO_H -DB_ENDIAN -DBN_DIV2W -DOPENSSL_PIC
-DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DGHASH_ASM
-DECP_NISTZ256_ASM -DPOLY1305_ASM -D_REENTRANT -DNDEBUG
-I/usr/local/include -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE
-D_TS_ERRNO
sign verify sign/s verify/s
rsa 512 bits 0.000732s 0.000042s 1366.8 23827.5
rsa 1024 bits 0.003752s 0.000105s 266.5 9546.6
rsa 2048 bits 0.023179s 0.000334s 43.1 2991.4
rsa 3072 bits 0.061220s 0.000701s 16.3 1427.0
rsa 4096 bits 0.125750s 0.001208s 8.0 827.8
rsa 7680 bits 0.646250s 0.004099s 1.5 243.9
rsa 15360 bits 4.390000s 0.016119s 0.2 62.0
beta #
The fact that it all works is good enough.
--
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional
More information about the openssl-users
mailing list