Skip to content

ci: get pull request checks under 5 minutes by speeding up the slowest OpenJDK tests #151

Backlog

Description

@Project516

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

Tried, no gain

Leads

  • long values as BigInt are the largest remaining cost in RandomCanaryPi and TransferTo. V8 handles BigInt.asIntN(64, a op b) well when it stays inside one function, at about 28 ns for a Random.next step, but values that cross calls or fields are allocated.
  • The HTTP client tests' ReferenceTracker loops on System.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.

Activity

  1. coderabbitai commented on Dec 5, 2026

    @coderabbitai
    🔗 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 plan command 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:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  2. coderabbitai commented on Dec 5, 2026

    @coderabbitai

    Warning

    A plan generation is already in progress. Please wait for it to complete before requesting a new plan.

  3. coderabbitai commented on Dec 5, 2026

    @coderabbitai

    Caution

    Plan generation was interrupted by a service restart. Please try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions