RFR: 8349763: Expose more ForkJoinPool parameters to configure virtual thread scheduler

Jiawei Tang jwtang at openjdk.org
Tue Feb 11 07:31:18 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 to configure virtual thread scheduler

Changes: https://git.openjdk.org/loom/pull/216/files
  Webrev: https://webrevs.openjdk.org/?repo=loom&pr=216&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/loom/pull/216.diff
  Fetch: git fetch https://git.openjdk.org/loom.git pull/216/head:pull/216

PR: https://git.openjdk.org/loom/pull/216


More information about the loom-dev mailing list