Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize the Maven Surefire JVM to speedup tests #246

Merged
merged 1 commit into from
Oct 22, 2019

Conversation

jtnord
Copy link
Member

@jtnord jtnord commented Oct 21, 2019

given we are forking the JVM for all the tests local testing (with several plugins) has shown that we can be much faster if we do not try and do expensive JIT compilation.
Also set the initial memory to the same as the maximum as this helps too.

This will not work if the JVM does not recognise the flags (they are available in hotspot in JDK7+) but other JVMs (j9?) are unknown about. that said the magority of plugin developers most likely use a hotspot based JVM and this is what we use in ci.jenkins.ci so I would recommend this and then let plugins whose authors build on something else adjust as nescessary.

@oleg-nenashev oleg-nenashev changed the title optimize the surefire JVM Eptimize the Maven Surefire JVM to speedup tests Oct 21, 2019
@oleg-nenashev oleg-nenashev changed the title Eptimize the Maven Surefire JVM to speedup tests Optimize the Maven Surefire JVM to speedup tests Oct 21, 2019
Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fine with that. Will work on AdoptOpenJDK also for the default engine

@jtnord
Copy link
Member Author

jtnord commented Oct 21, 2019

J9 ignores the flags (tried with a bogus flag -XX:+sdkfjsdkfjsdf) so this should be (mostly) safe.

> java -XX:+sdkfjsdkfjsdf -showversion -jar jenkins-cli.jar --help
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (build 1.8.0_232-b09)
Eclipse OpenJ9 VM (build openj9-0.17.0, JRE 1.8.0 Windows 10 amd64-64-Bit Compressed References 20191016_492 (JIT enabled, AOT enabled)
OpenJ9   - 77c1cf708
OMR      - 20db4fbc
JCL      - 97b5ec8f383 based on jdk8u232-b09)

Neither -s nor the JENKINS_URL env var is specified.
Jenkins CLI
Usage: java -jar jenkins-cli.jar [-s URL] command [opts...] args...
Options:
-s URL       : the server URL (defaults to the JENKINS_URL env var)
-http        : use a plain CLI protocol over HTTP(S) (the default; mutually exclusive with -ssh and -remoting)
-ssh         : use SSH protocol (requires -user; SSH port must be open on server, and user must have registered a public key)
-remoting    : use deprecated Remoting channel protocol (if enabled on server; for compatibility with legacy commands or command modes only)
-i KEY       : SSH private key file used for authentication (for use with -ssh or -remoting)
-p HOST:PORT : HTTP proxy host and port for HTTPS proxy tunneling. See https://jenkins.io/redirect/cli-https-proxy-tunnel
-noCertificateCheck : bypass HTTPS certificate check entirely. Use with caution
-noKeyAuth   : dont try to load the SSH authentication private key. Conflicts with -i
-user        : specify user (for use with -ssh)
-strictHostKey : request strict host key checking (for use with -ssh)
-logger FINE : enable detailed logging from the client
-auth [ USER:SECRET | @FILE ] : specify username and either password or API token (or load from them both from a file);
for use with -http, or -remoting but only when the JNLP agent port is disabled

The available commands depend on the server. Run the help command to
see the list.

@jtnord jtnord requested a review from amuniz October 22, 2019 09:10
@oleg-nenashev oleg-nenashev merged commit b8f0936 into jenkinsci:master Oct 22, 2019
@jtnord jtnord deleted the surefire-optimization branch October 24, 2019 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants