Skip to content

Set JRUBY_OPTS=--dev for JRuby CI jobs#2595

Merged
yahonda merged 1 commit into
rsim:masterfrom
yahonda:ci-jruby-opts-dev-retry
Apr 24, 2026
Merged

Set JRUBY_OPTS=--dev for JRuby CI jobs#2595
yahonda merged 1 commit into
rsim:masterfrom
yahonda:ci-jruby-opts-dev-retry

Conversation

@yahonda
Copy link
Copy Markdown
Collaborator

@yahonda yahonda commented Apr 24, 2026

Summary

Retry of #2536. Sets JRUBY_OPTS=--dev for every JRuby CI job so the JVM uses -XX:TieredStopAtLevel=1 and the other flags JRuby's Improving startup time wiki recommends for dev/test workloads. On these workflows total time is dominated by bundle install, RSpec, and the bug report templates, not long-running compiled code, so trading peak JIT for faster startup is the right call.

Since #2536 was closed, #2521 replaced a slow UNION ALL query with an optimized all_objects query in resolve_data_source_name, which reduced total CI time. JRuby jobs are still noticeably slower than CRuby jobs on each workflow on top of that faster baseline, so re-landing --dev is worth another look.

Scope

  • Mixed CRuby + JRuby matrices — test.yml, test_11g.yml: matrix.include adds jruby_opts: '--dev' for the jruby-10.1.0.0 row, and the top-level env: maps it via JRUBY_OPTS: ${{ matrix.jruby_opts }} so CRuby rows receive an empty value.
  • JRuby-only workflows — test_11g_ojdbc11.yml, jruby_head.yml: JRUBY_OPTS: "--dev" is set directly on the workflow's env: block.

The .rspec --profile 10 line from #2536 (added only to produce benchmark tables) is intentionally omitted.

Test plan

  • CI runs green on test.yml for CRuby 4.0 / 3.4 / 3.3 and the jruby-10.1.0.0 row
  • CI runs green on test_11g.yml for the same matrix
  • Compare JRuby execution-step totals (Bundle install + Run RSpec + bug report templates) against a recent master run on the same workflow
  • test_11g_ojdbc11.yml and jruby_head.yml scheduled runs remain green

--dev is recommended by the JRuby project for dev/test workloads. It
sets -XX:TieredStopAtLevel=1 and related JVM flags, trading peak JIT
performance for faster startup. On these workflows that matters
because total runtime is dominated by bundle install, RSpec, and bug
report template execution rather than long-running compiled code.

For mixed-matrix workflows (test.yml, test_11g.yml) the option is
routed through matrix.include so CRuby rows are unaffected. For
JRuby-only workflows (test_11g_ojdbc11.yml, jruby_head.yml) it is set
directly on the top-level env block.
@yahonda
Copy link
Copy Markdown
Collaborator Author

yahonda commented Apr 24, 2026

Benchmark — jruby-10.1.0.0 on current master (with all_objects optimization)

Compared the PR's JRuby rows against the 2026-04-24 scheduled master runs (test.yml 24876572846, test_11g.yml 24876572842).

test.yml

Step master PR --dev diff
Set up Ruby 27s 110s +83s ⚠️
Bundle install 47s 36s -11s
Run RSpec 178s 143s -35s
Run bug report templates 36s 19s -17s
Execution subtotal 261s 198s -63s (-24%)
Total job 5m58s 6m15s +17s

test_11g.yml

Step master PR --dev diff
Update RubyGems 20s 97s +77s ⚠️
Bundle install 44s 31s -13s
Run RSpec 274s 258s -16s
Execution subtotal 318s 289s -29s (-9%)
Total job 6m6s 6m57s +51s

⚠️ "Set up Ruby" and "Update RubyGems" spikes are JRuby download / RubyGems mirror variance, unrelated to --dev — same pattern as #2536.

Notes

@yahonda yahonda merged commit e11a0ef into rsim:master Apr 24, 2026
12 checks passed
@yahonda yahonda deleted the ci-jruby-opts-dev-retry branch April 24, 2026 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant