Skip to content

Limit JIT tiering for one-shot CLI subcommands#432

Draft
silug wants to merge 1 commit into
OpenVoxProject:mainfrom
silug:java-args-cli-tiering
Draft

Limit JIT tiering for one-shot CLI subcommands#432
silug wants to merge 1 commit into
OpenVoxProject:mainfrom
silug:java-args-cli-tiering

Conversation

@silug

@silug silug commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Pull Request (PR) description

The gem, irb, and ruby subcommands boot a full JVM per invocation but live only seconds. Their JRuby already runs with compile-mode :off (the jruby-utils default, shared with the server pools), but the JVM itself was untuned: ezbake's :java-args-cli defaults to an empty string, so these one-shot processes paid full C2 JIT warm-up.

Set -XX:TieredStopAtLevel=1 as the packaged default for JAVA_ARGS_CLI. Measured on an installed 4-core server with 'puppetserver gem list':

wall clock: 3.00s -> 2.48s (~17% faster)
CPU time: 7.34s -> 4.11s (~44% less)
max RSS: 420MB -> 298MB (~29% less)

The service path (JAVA_ARGS) is untouched and keeps full JIT. Operators can still override JAVA_ARGS_CLI in the service defaults file, since ezbake renders it as ${JAVA_ARGS_CLI:-}. The ca and prune subcommands run under the agent's MRI Ruby and are unaffected.

Suggested by @Sharpie in review of openvox-server#427.

Code generated by Claude Code.

This Pull Request (PR) fixes the following issues

N/A

The gem, irb, and ruby subcommands boot a full JVM per invocation but
live only seconds. Their JRuby already runs with compile-mode :off (the
jruby-utils default, shared with the server pools), but the JVM itself
was untuned: ezbake's :java-args-cli defaults to an empty string, so
these one-shot processes paid full C2 JIT warm-up.

Set -XX:TieredStopAtLevel=1 as the packaged default for JAVA_ARGS_CLI.
Measured on an installed 4-core server with 'puppetserver gem list':

  wall clock:  3.00s -> 2.48s  (~17% faster)
  CPU time:    7.34s -> 4.11s  (~44% less)
  max RSS:     420MB -> 298MB  (~29% less)

The service path (JAVA_ARGS) is untouched and keeps full JIT. Operators
can still override JAVA_ARGS_CLI in the service defaults file, since
ezbake renders it as ${JAVA_ARGS_CLI:-<default>}. The ca and prune
subcommands run under the agent's MRI Ruby and are unaffected.

Suggested by @Sharpie in review of openvox-server#427.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Steven Pritchard <steven.pritchard@gmail.com>
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