On Fri, 25 Oct 2024 18:18:16 GMT, Vladimir Ivanov <vaiva...@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. With the non-static field the reported score similar to the score with removed variable. I.e. the minimal changes - private static volatile ServiceKey previousKey = + private transient ServiceKey previousKey = gives a little bit smaller score for the 224 threads runs vs variable remove but scores close to run-to-run variation. For the first glance, this update should have no negative impact for performance for other apps/ benchmarks. Reported scores for current/removed var/instance var for 1 thread runs are 641.98/639.4/644.47 and for 224 threads are 21271.09/47841.5/42045.25. ------------- PR Comment: https://git.openjdk.org/jdk/pull/21719#issuecomment-2445369468