RFR: 8349927: Waiting for compiler termination delays shutdown for 10+ ms [v2]
Aleksey Shipilev
shade at openjdk.org
Thu Feb 13 08:28:55 UTC 2025
> See bug for extended description. This PR reworks the shutdown waiting mechanism in three ways:
> 1. Use exponential backoff with very small wait time at the start, to catch compiler threads earlier.
> 2. Avoid timed-wait on Monitor, when a sleep would suffice.
> 3. Track the time accurately, so we are not at the mercy of sleep/wait accuracy.
>
> I originally found this issue when studying Leyden performance, but it affects mainline in the same way. For example, JavacBenchApp from Leyden shows we consistently save ~10ms of round-trip time:
>
>
> Benchmark 1: build/linux-x86_64-server-release/images/jdk/bin/java -Xmx512m -Xms512m -XX:+UseParallelGC \
> -cp JavacBenchApp.jar JavacBenchApp 1 1
>
> # Before
> Time (mean ± σ): 495.4 ms ± 2.4 ms [User: 1321.2 ms, System: 110.4 ms]
> Range (min … max): 489.8 ms … 502.6 ms 100 runs
>
> # After
> Time (mean ± σ): 485.4 ms ± 2.7 ms [User: 1318.9 ms, System: 110.3 ms]
> Range (min … max): 479.8 ms … 494.3 ms 100 runs
>
>
> Additional testing:
> - [x] Linux x86_64 server fastdebug, `tier1`
> - [ ] Linux AArch64 server fastdebug, `all`
Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
Update src/hotspot/share/runtime/vmOperations.cpp
Co-authored-by: David Holmes <62092539+dholmes-ora at users.noreply.github.com>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/23593/files
- new: https://git.openjdk.org/jdk/pull/23593/files/31696b1c..a656380a
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=23593&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=23593&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/23593.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23593/head:pull/23593
PR: https://git.openjdk.org/jdk/pull/23593
More information about the hotspot-runtime-dev
mailing list