RFR: 8276618: Pad cacheline for Thread::_rcu_counter
tschatzl at openjdk.java.net
Mon Nov 8 09:51:36 UTC 2021
On Thu, 4 Nov 2021 05:09:48 GMT, Hamlin Li <mli at openjdk.org> wrote:
> Currently, Thread::_rcu_counter is not padded by cacheline, it should be beneficail to do so.
> The initial spebjbb test shows about 10.5% improvement of critical, and 0.7% improvement of max in specjbb2015, specjbb arguments:
> JAVA_OPTS_BE="-server -XX:+UseG1GC -Xms32g -Xmx32g"
we tried to reproduce your numbers internally, but failed to do so. Differences seem to be within noise.
We tried with specjbb2015 multi-jvm on a fairly large machine (152 threads; it was what has been "on hand") and multiple runs of our internal benchmarks and specjbb2015 composite runs on various (not-so-large but still fairly big sized machines).
Could you post or send more details about your configuration?
The other concern that has been brought up internally has been that this increases the size of Thread by ~40% from 624 to 872 bytes; do you think there a way to save some memory by reorganizing the fields so that the counter is on a separate cache line "naturally"?
More information about the hotspot-gc-dev