JITServer technology (technical preview)
Linux® on x86-64 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 even performance of Java applications. We recommend trying 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 enviroment 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, its pros and cons, and when best to use it, see the blog Free your JVM from the JIT with JITServer Technology.
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 OpenJ9 in client mode
Use the following command-line option to launch 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.
Launch OpenJ9 in server mode
Use the following command to start a JITServer process that listens for incoming compilation requests:
Configuring JITServer technology
You can use the following command line options to further configure the JITServer and the client VM processes:
||Specifies the port the server listens to for compilation requests||
||Specifies the name or IP of the server||
||Specifies a timeout value in milliseconds for socket operations||(Note 1)|
Note 1: The timeout default is 30000 ms for the JITServer process, and 2000 ms when OpenJ9 is launched as a client VM. You might need to increase the latter value if network latency is large.
You can encrypt network communication between the client VM and JITServer by using OpenSSL 1.0.x or 1.1.x. To enable encryption, specify the private key (
<key>.pem) and the certificate (
<cert>.pem) at the server:
and use the certificate at the client:
For more details and further discussion about security considerations, see Free your JVM from the JIT with JITServer Technology.
Building an SDK with JITServer technology
If you want to build a JDK with JITServer technology for yourself, see Appendix A of Free your JVM from the JIT with JITServer Technology.