Set JRUBY_OPTS=--dev for JRuby CI jobs#2595
Merged
Merged
Conversation
--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.
Collaborator
Author
Benchmark — jruby-10.1.0.0 on current master (with
|
| 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 |
--dev — same pattern as #2536.
Notes
- Execution steps (Bundle + RSpec + bug report templates) are reliably faster on both workflows.
test_11g.ymlmaster baseline is now 6m6s (vs ~15m when Set JRUBY_OPTS=--dev for JRuby CI jobs #2536 was originally benchmarked). Theall_objectsoptimization (Replace slow UNION ALL query with optimized all_objects query #2521) shrank the absolute savings headroom but JRuby is still noticeably slower than CRuby on the same workflow, so the--devwin is still meaningful in relative terms.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Retry of #2536. Sets
JRUBY_OPTS=--devfor every JRuby CI job so the JVM uses-XX:TieredStopAtLevel=1and 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 ALLquery with an optimizedall_objectsquery inresolve_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--devis worth another look.Scope
test.yml,test_11g.yml:matrix.includeaddsjruby_opts: '--dev'for thejruby-10.1.0.0row, and the top-levelenv:maps it viaJRUBY_OPTS: ${{ matrix.jruby_opts }}so CRuby rows receive an empty value.test_11g_ojdbc11.yml,jruby_head.yml:JRUBY_OPTS: "--dev"is set directly on the workflow'senv:block.The
.rspec--profile 10line from #2536 (added only to produce benchmark tables) is intentionally omitted.Test plan
test.ymlfor CRuby 4.0 / 3.4 / 3.3 and thejruby-10.1.0.0rowtest_11g.ymlfor the same matrixmasterrun on the same workflowtest_11g_ojdbc11.ymlandjruby_head.ymlscheduled runs remain green