- 
    Bug 
- 
    Resolution: Fixed
- 
     P3 P3
- 
    CPU22_07
- 
        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
            
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
- links to
- 
                     Commit(master)
        openjdk/jdk/4956a766 Commit(master)
        openjdk/jdk/4956a766
- 
                     Review
        openjdk/jdk/16403 Review
        openjdk/jdk/16403
- 
                     Review(master)
        openjdk/jdk/21573 Review(master)
        openjdk/jdk/21573
- 
                     Review(master)
        openjdk/jdk/21622 Review(master)
        openjdk/jdk/21622
- 
                     Review(master)
        openjdk/jdk/21719 Review(master)
        openjdk/jdk/21719