RFR: 8349763: Expose more ForkJoinPool parameters for virtual thread scheduler to reduce startup jitter and improve stability
Jiawei Tang
jwtang at openjdk.org
Tue Feb 11 03:08:53 UTC 2025
Since the parameters `-Djdk.virtualThreadScheduler.parallelism=N` , `-Djdk.virtualThreadScheduler.maxPoolSize=M`, `-Djdk.virtualThreadScheduler.minimumRunnable=Y` have already been made available, it would be worth considering opening up additional ForkJoinPool-related parameters: `-Djdk.virtualThreadScheduler.corePoolSize=X`, `-Djdk.virtualThreadScheduler.keepAliveTime=Z` and `-Djdk.virtualThreadScheduler.timeUnit`.
In particular, configuring corePoolSize can help reduce jitter caused by thread ramp-up during application startup, while keepAliveTime and timeUnit ensures more threads are available within the time expected by users. Opening these parameters would be highly meaningful for optimizing virtual thread scheduling.
-------------
Commit messages:
- 8349763: Expose more ForkJoinPool parameters for virtual thread scheduler to reduce startup jitter and improve stability
Changes: https://git.openjdk.org/jdk/pull/23549/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23549&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8349763
Stats: 27 lines in 1 file changed: 25 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/23549.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23549/head:pull/23549
PR: https://git.openjdk.org/jdk/pull/23549
More information about the core-libs-dev
mailing list