JDK-8149554 : high CPU utilization seen in execution of class "java.math.BigInteger"
  • Type: Enhancement
  • Component: security-libs
  • Sub-Component: javax.crypto
  • Affected Version: 7u85
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2016-02-10
  • Updated: 2016-04-01
  • Resolved: 2016-03-16
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
After upgrade of
Weblogic version 12.1.3.0.3 (from 12.1.3.0)
Java version 1.7.0_85 (from 1.7.0_76)

Since then the weblogic instance is seeing high CPU utilization and we have
seen an increase in execution of class "java.math.BigInteger"




Comments
FTR. Here's an example of the top of a stack trace, which showed the source of poor performance before the backport of JDK-8130150 was done. at java.math.BigInteger.oddModPow(BigInteger.java:1849) at java.math.BigInteger.modPow(BigInteger.java:1599) at sun.security.rsa.RSACore.crtCrypt(RSACore.java:170) at sun.security.rsa.RSACore.rsa(RSACore.java:110) at com.sun.crypto.provider.RSACipher.doFinal(RSACipher.java:354) at com.sun.crypto.provider.RSACipher.engineDoFinal(RSACipher.java:391) at javax.crypto.Cipher.doFinal(Cipher.java:1970) at java.security.Signature$CipherAdapter.engineSign(Signature.java:1277) at java.security.Signature$Delegate.engineSign(Signature.java:1180) at java.security.Signature.sign(Signature.java:553) at sun.security.ssl.RSASignature.engineSign(RSASignature.java:166) at java.security.Signature$Delegate.engineSign(Signature.java:1180) at java.security.Signature.sign(Signature.java:553) at sun.security.ssl.HandshakeMessage$ECDH_ServerKeyExchange.<init>(HandshakeMessage.java:1012) at sun.security.ssl.ServerHandshaker.clientHello(ServerHandshaker.java:779) at sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:167) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:901) at sun.security.ssl.Handshaker$1.run(Handshaker.java:841) at sun.security.ssl.Handshaker$1.run(Handshaker.java:839) at java.security.AccessController.doPrivileged(Native Method) at sun.security.ssl.Handshaker$DelegatedTask.run(Handshaker.java:1273)
16-03-2016

Should be noted, that the backport of JDK-8130150 was done with a slight difference, as it is not enabled by default in jdk7u and jdk8u. To make it available the following command-line options should be specified: -XX:+UseMontgomerySquareIntrinsic -XX:+UseMontgomeryMultiplyIntrinsic Consult JDK-8151522 for details.
16-03-2016

This is basically a request to backport some recent enhancements done in jdk9 which improve the performance of certain cryptography operations.
16-03-2016

JDK-8071726 fixed for 7u79/80 might have impacted the performance of RSA
11-02-2016