RFR: 8317538: RSA have scalability issue for high vCPU numbers

Claes Redestad redestad at openjdk.org
Mon Oct 21 20:44:20 UTC 2024


On Mon, 21 Oct 2024 18:18:12 GMT, Vladimir Ivanov <vaivanov at openjdk.org> wrote:

> This patch remove access to the shared variable to fix scalability issue in the multithread environment.  According to testing by the specjvm2008::crypto.rsa the one thread performance reduced for less than 1% while the score for the multithread run increased in ~2x. For the 2 socket system with Xeon 8480+ numbers looks as: 
> - 1 thread: 643.15 for original version vs 642.54 for patched one;
> - 224 threads: 22446.19 for original vs 46147.41 for patched.
> 
> The RSABench microbenchmark reports no score changes for the 1 thread (average for all testcases) and 2.4% improvement for the 224 threads.

Is `Provider::getService` a bottleneck in real apps or is this mostly something which manifests in specjvm2008 and such benchmarks (which likely does what could be considered setup logic in the hot path)? 

I agree with the changes though: caching transient lookup keys seem a dubious optimization at best on modern HW/JVMs, and doing so in a way that might cause cache-line ping-pong on large systems looks pretty bad.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/21622#issuecomment-2427678222


More information about the security-dev mailing list