Skip to content

CAUTION: This site hosts draft documentation for the next release. For published content of the latest release, visit www.eclipse.org/openj9/docs

JITServer technology

Linux® on x86, Linux on IBM Power® systems, Linux on AArch64 and Linux on IBM Z® systems (64-bit only)

JITServer technology decouples the JIT compiler from the VM and lets the JIT compiler run remotely in its own process. This mechanism prevents your Java™ application suffering possible negative effects due to CPU and memory consumption caused by JIT compilation.

This technology can improve quality of service, robustness, and performance of Java applications. You might want to try this technology if the following criteria are met:

  • Your Java application is required to compile many methods using JIT in a relatively short time.
  • The application is running in an environment with limited CPU or memory, which can worsen interference from the JIT compiler.
  • The network latency between JITServer and client VM is relatively low.

For more details about JITServer technology, including its advantages and disadvantages and when best to use it, see blog posts such as the following:

For a more in-depth description of the JITServer design and implementation, see the following research paper:

Using JITServer technology

JITServer technology is not enabled by default: you must explicitly invoke it. Running OpenJ9 without either of the following options launches it as a regular VM with embedded JIT compilation.

Launch Eclipse OpenJ9 in client mode

Use the following command-line option to launch Eclipse OpenJ9™ in client mode. In this mode, the VM sends compilation requests to an available JITServer. The client operates as a regular VM with its own JIT compiler if a server is not available.

 -XX:+UseJITServer

Launch OpenJ9 in server mode

Use the following command to start a JITServer process that listens for incoming compilation requests:

jitserver

Configuring JITServer technology

You can use command line options to further configure the JITServer and the client VM processes. For example:

If a JITServer server crashes, the client is forced to perform compilations locally. You can change this behavior by using the -XX:[+|-]RequireJITServer option so that the client crashes with an assert when it detects that the server is unavailable. This feature is useful when you are running a test suite with JITServer enabled and you want the server crash to cause the test to fail.

Security

You can encrypt network communication between the client VM and JITServer by using OpenSSL 1.0.x, 1.1.x, or 3.x. To enable encryption, you specify the private key and the certificate at the server and use the certificate at the client. For more information, see -XX:JITServerSSLCert / -XX:JITServerSSLKey / -XX:JITServerSSLRootCerts.

Tuning JITServer

For best practices regarding JITServer configuration and tuning, see the document JITServer tuning and practical considerations.

Building a JDK with JITServer technology

If you want to build a JDK with JITServer technology, see Appendix A of Free your JVM from the JIT with JITServer Technology.

See also