Limit JIT tiering for one-shot CLI subcommands#432
Draft
silug wants to merge 1 commit into
Draft
Conversation
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>
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.
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