This is an automated email from the ASF dual-hosted git repository.
pjfanning pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-http.git
The following commit(s) were added to refs/heads/main by this push:
new 276093d6f fix: drop removed UseBiasedLocking option from benchmark JVM
args (#1227)
276093d6f is described below
commit 276093d6f3d5dc13e1a4e7de4573a8da372b30e9
Author: PJ Fanning <[email protected]>
AuthorDate: Wed Aug 26 09:47:06 2026 +0100
fix: drop removed UseBiasedLocking option from benchmark JVM args (#1227)
Motivation:
CommonBenchmark forks its JVM with -XX:-UseBiasedLocking. Biased locking was
disabled and the flag deprecated in JDK 15 (JEP 374), and JDK 21 no longer
recognises it at all, so the forked VM aborts immediately:
Unrecognized VM option 'UseBiasedLocking'
Error: Could not create the Java Virtual Machine.
<forked VM failed with exit code 1>
Every benchmark deriving from CommonBenchmark is therefore unrunnable on a
current JDK: ConnectionPoolBenchmark, ServerProcessingBenchmark,
StreamServerProcessingBenchmark, HttpEntityBenchmark,
H2ServerProcessingBenchmark,
H2ClientServerBenchmark and MaskingBench. The build already targets JDK 17
as a
minimum, where the flag is a no-op because biased locking is off by default.
Modification:
Remove the option from the @Fork jvmArgs.
Result:
The benchmarks run again on a current JDK.
Tests:
- sbt "http-bench-jmh/Jmh/run -f 1 -wi 1 -i 1 -r 2 -w 1 .*MaskingBench.*" -
fails to start the forked VM before this change, completes after it (JDK 21)
References:
None - found while benchmarking the HTTP parsers
---
.../src/main/scala/org/apache/pekko/http/CommonBenchmark.scala | 1 -
1 file changed, 1 deletion(-)
diff --git
a/http-bench-jmh/src/main/scala/org/apache/pekko/http/CommonBenchmark.scala
b/http-bench-jmh/src/main/scala/org/apache/pekko/http/CommonBenchmark.scala
index a40c543c3..846128df7 100644
--- a/http-bench-jmh/src/main/scala/org/apache/pekko/http/CommonBenchmark.scala
+++ b/http-bench-jmh/src/main/scala/org/apache/pekko/http/CommonBenchmark.scala
@@ -37,7 +37,6 @@ import org.openjdk.jmh.annotations.Warmup
"-XX:InitialCodeCacheSize=512m",
"-XX:ReservedCodeCacheSize=512m",
"-XX:+UseParallelGC",
- "-XX:-UseBiasedLocking",
"-XX:+AlwaysPreTouch"))
@BenchmarkMode(Array(Mode.Throughput))
@OutputTimeUnit(TimeUnit.SECONDS)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]