Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8317538

Potential bottleneck in Provider::getService: specjvm2008::crypto.rsa have scalability issue for high vCPU numbers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 24
    • CPU22_07
    • security-libs
    • b26
    • generic
    • generic

      The specjvm2008::crypto.rsa workload have scalability issue that for high vCPU number looks as no score improvements for extra vCPU.
      Reported score dependency on the vCPU numbers looks as:
      mainline JDK | 1 |60 |120 |180 | 240
      Score, baseline | 546 | 9261 | 17633 |24051 | 24364

      According to performance profile this issue caused by access to the ‘private static volatile ServiceKey previousKey’ variable in the src/java.base/share/classes/java/security/Provider.java file.
      It looks like some caching to improve one thread performance but it affect multithreading score.

      The minimal changes are:
      =========
      +// ServiceKey key = previousKey;
      +// if (!key.matches(type, algorithm)) {
      +// key = new ServiceKey(type, algorithm, false);
      +// previousKey = key;
      +// }

      + ServiceKey key = new ServiceKey(type, algorithm, false);
      =========
      May be it make sense to do caching on the thread level.

      Without access to the variable scores looks as:
      patch | 1 |60 | 120 |180 | 240
      Score, patched |544 | 9340 | 18195 | 26560 | 32873

            vaivanov Vladimir Ivanov
            vaivanov Vladimir Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: