[Verificaton XENIAL]

# i386
- Significant performance increase using the xenial-proposed/i386 package 
inside a 32-bit LXD container build using a Ryzen CPU with Intel SHA Extension 
capability.
- Same performance (as expected) using the xenial-proposed/i386 package on a 
non SHA Extension Intel CPU (i7-6770HQ) with xenial-proposed package.

# amd64
- Significant performance increase using the xenial-proposed/amd64 package on 
Ryzen CPU with Intel SHA Extension capability.
- Same performance (as expected) using the xenial-proposed/amd64 package on a 
non SHA Extension Intel CPU (i7-6770HQ) with xenial-proposed package.

Note : I unfortunately don't (nor colleagues) have access to a Intel CPU with 
SHA Extension capability at our disposal. Ideally, if someone has access to one 
to test it would be good. 
Otherwise, I think it is safe to rely on upstream author of the patch who 
confirmed it was working as expected using a Intel CPU with SHA extension 
capability. 

Reference : https://github.com/openssl/openssl/issues/2848
"...Myself I tested on Intel processors, yes, with/without...."

==
* Test xenial/i386 on a 32-bit LXD container using a non SHA Extension Intel 
CPU:
--
ii  libssl1.0.0:i386          1.0.2g-1ubuntu4.6                          i386   
      Secure Sockets Layer toolkit - shared libraries
ii  openssl                   1.0.2g-1ubuntu4.6                          i386   
      Secure Sockets Layer toolkit - cryptographic utility

# openssl speed sha1
Doing sha1 for 3s on 16 size blocks: 12391058 sha1's in 3.00s
Doing sha1 for 3s on 64 size blocks: 8934411 sha1's in 3.00s
Doing sha1 for 3s on 256 size blocks: 5048901 sha1's in 3.00s
Doing sha1 for 3s on 1024 size blocks: 1893157 sha1's in 3.00s
Doing sha1 for 3s on 8192 size blocks: 301374 sha1's in 3.00s
OpenSSL 1.0.2g  1 Mar 2016
built on: reproducible build, date unspecified
options:bn(64,32) rc4(8x,mmx) des(ptr,risc1,16,long) aes(partial) blowfish(idx) 
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 -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT 
-DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM 
-DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
sha1             66085.64k   190600.77k   430839.55k   646197.59k   822951.94k

# time openssl dgst -sha256 /var/tmp/5Gfile 
SHA256(/var/tmp/5Gfile)= 
7f06c62352aebd8125b2a1841e2b9e1ffcbed602f381c3dcb3200200e383d1d5

real    0m15.518s
user    0m14.428s
sys     0m1.084s
==
* Test xenial-proposed/i386 on a 32-bit LXD container using a non SHA Extension 
Intel CPU:
--
ii  libssl1.0.0:i386          1.0.2g-1ubuntu4.7                          i386   
      Secure Sockets Layer toolkit - shared libraries
ii  openssl                   1.0.2g-1ubuntu4.7                          i386   
      Secure Sockets Layer toolkit - cryptographic utility

# openssl speed sha1
Doing sha1 for 3s on 16 size blocks: 12451389 sha1's in 3.00s
Doing sha1 for 3s on 64 size blocks: 8913173 sha1's in 3.00s
Doing sha1 for 3s on 256 size blocks: 5037978 sha1's in 3.00s
Doing sha1 for 3s on 1024 size blocks: 1904530 sha1's in 3.00s
Doing sha1 for 3s on 8192 size blocks: 303177 sha1's in 3.00s
OpenSSL 1.0.2g  1 Mar 2016
built on: reproducible build, date unspecified
options:bn(64,32) rc4(8x,mmx) des(ptr,risc1,16,long) aes(partial) blowfish(idx) 
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 -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT 
-DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM 
-DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
sha1             66407.41k   190147.69k   429907.46k   650079.57k   827875.33k

# time openssl dgst -sha256 /var/tmp/5Gfile 
SHA256(/var/tmp/5Gfile)= 
7f06c62352aebd8125b2a1841e2b9e1ffcbed602f381c3dcb3200200e383d1d5

real    0m15.259s
user    0m14.372s
sys     0m0.884s
==
* Test xenial/i386 on a 32-bit LXD container using a Ryzen CPU:
--
ii  libssl1.0.0:i386                 1.0.2g-1ubuntu4.6                          
i386         Secure Sockets Layer toolkit - shared libraries
ii  openssl                          1.0.2g-1ubuntu4.6                          
i386         Secure Sockets Layer toolkit - cryptographic utility

# openssl speed sha1
Doing sha1 for 3s on 16 size blocks: 11833291 sha1's in 2.98s
Doing sha1 for 3s on 64 size blocks: 9305964 sha1's in 3.00s
Doing sha1 for 3s on 256 size blocks: 5679556 sha1's in 3.00s
Doing sha1 for 3s on 1024 size blocks: 2285214 sha1's in 3.00s
Doing sha1 for 3s on 8192 size blocks: 345908 sha1's in 3.00s
OpenSSL 1.0.2g  1 Mar 2016
built on: reproducible build, date unspecified
options:bn(64,32) rc4(8x,mmx) des(ptr,risc1,16,long) aes(partial) blowfish(idx) 
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 -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT 
-DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM 
-DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
sha1             63534.45k   198527.23k   484655.45k   780019.71k   944559.45k

#time openssl dgst -sha256 /var/tmp/5Gfile 
SHA256(/var/tmp/5Gfile)= 
7f06c62352aebd8125b2a1841e2b9e1ffcbed602f381c3dcb3200200e383d1d5

real    0m15.768s
user    0m14.536s
sys     0m1.224s
==
* Test xenial-proposed/i386 on a 32-bit LXD container using a Ryzen CPU:
--
ii  libssl1.0.0:i386                 1.0.2g-1ubuntu4.7                          
i386         Secure Sockets Layer toolkit - shared libraries
ii  openssl                          1.0.2g-1ubuntu4.7                          
i386         Secure Sockets Layer toolkit - cryptographic utility

# openssl speed sha1
Doing sha1 for 3s on 16 size blocks: 14893525 sha1's in 3.00s
Doing sha1 for 3s on 64 size blocks: 12927665 sha1's in 3.00s
Doing sha1 for 3s on 256 size blocks: 9115331 sha1's in 3.00s
Doing sha1 for 3s on 1024 size blocks: 4153241 sha1's in 3.00s
Doing sha1 for 3s on 8192 size blocks: 682211 sha1's in 3.00s
OpenSSL 1.0.2g  1 Mar 2016
built on: reproducible build, date unspecified
options:bn(64,32) rc4(8x,mmx) des(ptr,risc1,16,long) aes(partial) blowfish(idx) 
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 -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT 
-DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM 
-DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
sha1             79432.13k   275790.19k   777841.58k  1417639.59k  1862890.84k

# time openssl dgst -sha256 /var/tmp/5Gfile 
SHA256(/var/tmp/5Gfile)= 
7f06c62352aebd8125b2a1841e2b9e1ffcbed602f381c3dcb3200200e383d1d5

real    0m3.650s
user    0m3.004s
sys     0m0.644s
==
* Test xenial/am64 on Intel CPU (64-bit) with Non Intel SHA Extension:
--
ii  libssl1.0.0:amd64          1.0.2g-1ubuntu4.6                          amd64 
       Secure Sockets Layer toolkit - shared libraries
ii  openssl                    1.0.2g-1ubuntu4.6                          amd64 
       Secure Sockets Layer toolkit - cryptographic utility

# openssl speed sha1
Doing sha1 for 3s on 16 size blocks: 16131936 sha1's in 3.00s
Doing sha1 for 3s on 64 size blocks: 11366181 sha1's in 3.00s
Doing sha1 for 3s on 256 size blocks: 6534703 sha1's in 3.00s
Doing sha1 for 3s on 1024 size blocks: 2442789 sha1's in 3.00s
Doing sha1 for 3s on 8192 size blocks: 357145 sha1's in 3.00s
OpenSSL 1.0.2g  1 Mar 2016
built on: reproducible build, date unspecified
options:bn(64,64) rc4(16x,int) des(idx,cisc,16,int) aes(partial) blowfish(idx) 
compiler: cc -I. -I.. -I../include  -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS 
-D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -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 -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT 
-DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM 
-DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM 
-DGHASH_ASM -DECP_NISTZ256_ASM
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
sha1             86036.99k   242478.53k   557627.99k   833805.31k   975243.95k

#time openssl dgst -sha256 /var/tmp/5Gfile 
SHA256(/var/tmp/5Gfile)= 
7f06c62352aebd8125b2a1841e2b9e1ffcbed602f381c3dcb3200200e383d1d5

real    0m12.574s
user    0m11.832s
sys     0m0.740s
==
* Test xenial-proposed/amd64 on Intel CPU (64-bit) with Non Intel SHA Extension:
--
ii  libssl1.0.0:amd64          1.0.2g-1ubuntu4.7                          amd64 
       Secure Sockets Layer toolkit - shared libraries
ii  openssl                    1.0.2g-1ubuntu4.7                          amd64 
       Secure Sockets Layer toolkit - cryptographic utility

# openssl speed sha1
Doing sha1 for 3s on 16 size blocks: 15937653 sha1's in 3.00s
Doing sha1 for 3s on 64 size blocks: 11304094 sha1's in 3.00s
Doing sha1 for 3s on 256 size blocks: 6501379 sha1's in 3.00s
Doing sha1 for 3s on 1024 size blocks: 2441543 sha1's in 3.00s
Doing sha1 for 3s on 8192 size blocks: 357137 sha1's in 3.00s
OpenSSL 1.0.2g  1 Mar 2016
built on: reproducible build, date unspecified
options:bn(64,64) rc4(16x,int) des(idx,cisc,16,int) aes(partial) blowfish(idx) 
compiler: cc -I. -I.. -I../include  -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS 
-D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -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 -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT 
-DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM 
-DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM 
-DGHASH_ASM -DECP_NISTZ256_ASM
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
sha1             85000.82k   241154.01k   554784.34k   833380.01k   975222.10k

# time openssl dgst -sha256 /var/tmp/5Gfile 
SHA256(/var/tmp/5Gfile)= 
7f06c62352aebd8125b2a1841e2b9e1ffcbed602f381c3dcb3200200e383d1d5

real    0m12.376s
user    0m11.812s
sys     0m0.560s
==
* Test xenial/amd64 on a Ryzen CPU:
--

ii  libssl1.0.0:amd64                1.0.2g-1ubuntu4.6                          
amd64        Secure Sockets Layer toolkit - shared libraries
ii  openssl                          1.0.2g-1ubuntu4.6                          
amd64        Secure Sockets Layer toolkit - cryptographic utility

# openssl speed sha1
Doing sha1 for 3s on 16 size blocks: 17131254 sha1's in 3.00s
Doing sha1 for 3s on 64 size blocks: 12106212 sha1's in 3.00s
Doing sha1 for 3s on 256 size blocks: 6704314 sha1's in 3.00s
Doing sha1 for 3s on 1024 size blocks: 2441523 sha1's in 3.00s
Doing sha1 for 3s on 8192 size blocks: 352205 sha1's in 3.00s
OpenSSL 1.0.2g  1 Mar 2016
built on: reproducible build, date unspecified
options:bn(64,64) rc4(8x,int) des(idx,cisc,16,int) aes(partial) blowfish(idx) 
compiler: cc -I. -I.. -I../include  -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS 
-D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -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 -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT 
-DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM 
-DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM 
-DGHASH_ASM -DECP_NISTZ256_ASM
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
sha1             91366.69k   258265.86k   572101.46k   833373.18k   961754.45k

# time openssl dgst -sha256 /var/tmp/5Gfile
SHA256(/var/tmp/5Gfile)= 
7f06c62352aebd8125b2a1841e2b9e1ffcbed602f381c3dcb3200200e383d1d5

real    0m13.664s
user    0m12.448s
sys     0m1.208s

==
* Test xenial-proposed/amd64 on a Ryzen CPU:
--
ii  libssl1.0.0:amd64                1.0.2g-1ubuntu4.7                          
amd64        Secure Sockets Layer toolkit - shared libraries
ii  openssl                          1.0.2g-1ubuntu4.7                          
amd64        Secure Sockets Layer toolkit - cryptographic utility

# openssl speed sha1
Doing sha1 for 3s on 16 size blocks: 25297696 sha1's in 3.00s
Doing sha1 for 3s on 64 size blocks: 19825090 sha1's in 3.00s
Doing sha1 for 3s on 256 size blocks: 12025484 sha1's in 3.00s
Doing sha1 for 3s on 1024 size blocks: 4665262 sha1's in 3.00s
Doing sha1 for 3s on 8192 size blocks: 694700 sha1's in 3.00s
OpenSSL 1.0.2g  1 Mar 2016
built on: reproducible build, date unspecified
options:bn(64,64) rc4(8x,int) des(idx,cisc,16,int) aes(partial) blowfish(idx) 
compiler: cc -I. -I.. -I../include  -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS 
-D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -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 -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT 
-DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM 
-DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM 
-DGHASH_ASM -DECP_NISTZ256_ASM
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
sha1            134921.05k   422935.25k  1026174.63k  1592409.43k  1896994.13k

# time openssl dgst -sha256 /var/tmp/5Gfile
SHA256(/var/tmp/5Gfile)= 
7f06c62352aebd8125b2a1841e2b9e1ffcbed602f381c3dcb3200200e383d1d5

real    0m3.579s
user    0m2.940s
sys     0m0.636s
==

** Tags added: verification-done-xenial verification-done-zesty

** Tags removed: sts verification-needed
** Tags added: ua

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1674399

Title:
  OpenSSL CPU detection for AMD Ryzen CPUs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/1674399/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to