Skip to content

-XX:[+|-]JITServerAOTCachePersistence

(Linux® only)

This option enables or disables the JITServer server's ability to allow other JITServer instances to reuse AOT caches.

Syntax

    -XX:[+|-]JITServerAOTCachePersistence
Setting Effect Default
-XX:+JITServerAOTCachePersistence Enable
-XX:-JITServerAOTCachePersistence Disable yes

Explanation

With the -XX:+JITServerAOTCachePersistence option, the JITServer server periodically saves its AOT caches to files. Other JITServer instances can then load these caches from files the first time a client requests a particular named cache. This feature is useful to improve performance, especially in scenarios where JITServer instances are started up and shut down regularly.

This feature depends on the -XX:+JITServerUseAOTCache command-line option, which is used to enable caching of AOT-compiled methods. You must specify this option both at the client JVM and at the server.

Use the -XX:JITServerAOTCacheName=<cache_name> option at the client to request a particular AOT cache. If the requested cache does not exist at the server in-memory, but the AOT cache persistence feature is enabled (-XX:+JITServerAOTCachePersistence), the server checks whether a file for that cache exists. If the AOT cache file exists, it is loaded in the background. If the AOT cache file does not exist or the AOT cache persistence feature is disabled (-XX:-JITServerAOTCachePersistence), the server creates an empty AOT cache and gradually populates it with AOT method bodies it compiles.

You can use the -XX:JITServerAOTCacheDir=<directory> option to specify the directory where the AOT cache must be saved to or loaded from.

The name of an AOT cache file has the following structure:

    JITServerAOTCache.<CACHE_NAME>.J<JAVA_VERSION>

Where,

  • <CACHE_NAME> is the name of the AOT cache requested by the client, and
  • <JAVA_VERSION> is the version of Java used by JITServer instance (for example, 17 will be used for Java 17)

See also