Repository navigation
Backlog
Description
A pull request's checks take 6 to 7 minutes. The goal is under 5, and under 3 if possible, without running fewer OpenJDK tests on pull requests and without more than 8 shards.
Where the time goes
Each OpenJDK shard runs 4 tests at a time on a 4-vCPU runner. The shards take 4.4 to 6.6 minutes, and the test job about 4. Every shard is limited by CPU, so more tests at once is slower: on the same runner, 6 at a time took 225 to 239 s against 203 to 209 s for 4. A shard can't finish before its slowest test, and these set the floor:
| Test | Time in a shard | On HotSpot | Where the time goes |
|---|---|---|---|
| java/util/Random/RandomCanaryPi.java | 200 to 330 s | 10 s | long arithmetic on BigInt in the nextLong of every RandomGenerator, NativePRNG reads |
| java/net/httpclient/ResponsePublisher.java | 215 to 285 s | 89 s | waiting (half the profile is idle), garbage collection |
| java/net/httpclient/SpecialHeadersTest.java | 165 to 255 s | 72 s | garbage collection (30%): the test calls System.gc() 500 to 800 times at about 75 ms each |
| java/nio/channels/Channels/TransferTo.java | 190 to 320 s | 15 s | java.util.Random.next and nextBytes: BigInt seed arithmetic and its compareAndSet |
| java/security/Provider/SecurityProviderModularTest.java | about 110 s since #148, 240 to 314 s before | 29 s | about 96 child VMs, each a short run of interpreted and newly compiled code |
Done
- perf: cut the two slowest OpenJDK tests by a third with SHA-3 and Math.abs intrinsics, and halve the jdb test in CI #139: SHA-3 and
Math.absintrinsics, a cached JDK image, and the jdb sessions run side by side. - perf(jit): call Unsafe, System.arraycopy and other common natives directly from compiled code, cutting slow concurrency and digest tests by 10 to 30% #142: compiled code calls Unsafe,
System.arraycopyand other common natives directly. - ci(jtreg): balance shards on the test times measured after the JIT and intrinsic speed-ups #143: shards balanced on current test times.
- ci(jtreg): run each shard's tests but its slowest at a lower CPU priority, so the slowest one no longer sets the shard's time #148: each shard's slowest test at normal priority and the rest niced; the jar cache survives runner changes.
Tried, no gain
- arm64 runners: same speed as x64 (242 s against 249 s on one shard).
- Letting threads run between back-to-back
System.gc()calls: the HTTP client tests got slower. - Running a test's child VMs on
dist/instead ofsrc/node.ts: no faster, and ProcessHandle/OnExitTest timed out. - Boot snapshots for SecurityProviderModularTest's child VMs: 92 s with them, 94 s without.
- Folding
static finalfields to constants in the JIT, with constant-offset Unsafe calls turned into field access: no gain on master after perf(jit): inline hot callees up to 100 bytes and deoptimize at their never-run calls and unresolved instructions, as HotSpot's uncommon traps do #146.
Leads
longvalues as BigInt are the largest remaining cost in RandomCanaryPi and TransferTo. V8 handlesBigInt.asIntN(64, a op b)well when it stays inside one function, at about 28 ns for aRandom.nextstep, but values that cross calls or fields are allocated.- The HTTP client tests'
ReferenceTrackerloops onSystem.gc()with 10 ms sleeps. Each collection is a full V8 GC of the VM's heap, so a smaller live heap after the TLS handshake would shorten each one.
Reacted by coderabbitai
Metadata
Metadata
Assignees
Labels
No labels
Activity
coderabbitai commentedon Dec 5, 2026
🔗 Related PRs
#36 - Run 911 more OpenJDK tests in CI, in up to eight shards balanced by run time [merged]
#72 - fix: Deflater dictionary data loss, PATH lookup and other review findings, and narrower PR test runs [closed]
#148 - ci(jtreg): run each shard's tests but its slowest at a lower CPU priority, so the slowest one no longer sets the shard's time [closed]
#86 - ci(jtreg): run each shard's tests slowest first so a long test does not start last [merged]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.Successfully generated implementation plan.
Use
@coderabbitai <feedback>to replan🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!
coderabbitai commentedon Dec 5, 2026
Warning
A plan generation is already in progress. Please wait for it to complete before requesting a new plan.
coderabbitai commentedon Dec 5, 2026
Caution
Plan generation was interrupted by a service restart. Please try again.