Visit Azul.com Support

Command-Line Options

Java command-line options that control the interaction between Azul Zulu Prime Builds of OpenJDK (Azul Zulu Prime JVM) and Azul Zulu Prime System Tools (ZST) begin with the -XX: prefix. These options summarized in the following table. Azul Zulu Prime JVM command-line options are case sensitive.

Azul Zulu Prime JVM Command-Line Options

Command Line Option Description Default

-Xmx<size>[m|M|g|G]

Specifies the maximum size of the Java heap.

The Examples below both specify a 10 GB heap:

  • -Xmx10240M

  • -Xmx10G

Minumum heap size is as follows:

  • Minimum heap size: 512 MB

  • Maximum heap size without ZST: 2500 GB (2.5 TB)

  • Maximum heap size with ZST: 20000 GB (20 TB)

The default default heap size is 1 GB, except in the following situations:

  • Container environments or under cgroups: here it matches OpenJDK and is 25% of the cgroup or container limit. The upper limit of the default value is 32 GB.

  • With enabled heap elasticity, available since version 21.05.0.0, see Recommended Heap Size for details.

Same as OpenJDK: 25% of the RAM size or cgroup or container limit. The upper limit of the default value is 32 GB.

-Xms<size>[m|M|g|G]

Specifies the minimum size of the Java heap that is committed at the start of the Java command. During uptime, the Garbage Collector uses this minimum value as target heap utilization to minimize the memory footprint. For application environments with primary goal of reducing latency and highest throughput performance, setting -Xms to the value of -Xmx is recommended to avoid CPU intensive memory optimization. The default value is depending on the system RAM and ranges from 512 MB to 2 GB.

This flag is ignored and the initial heap size is always set to the -Xmx value, except when heap elasticity is enabled. Heap elasticity is only available since 21.05.0.0. See Recommended Heap Size for details.

-XX:JavaMemMax=<size>

Specifies the maximum amount of memory that can be allocated to the Azul Zulu Prime JVM process (the Java heap). Units can be specified in kilobytes (K or k), megabytes (M or m), or gigabytes (G or g). For example: -XX:JavaMemMax=2g -XX:JavaMemMax=128M -XX:JavaMemMax=128m If this option is not specified the maximum size to which Java heap can grow is calculated internally by the JVM based on the size of the Java system memory. Contact Azul customer support for more information about this option. You might need this option when multiple JVMs are run on the same host and frequent usage of contingency or pause prevention memory has been observed.

Value of -Xmx plus available Contingency Memory

-XX:InitialRAMPercentage=<value>

This is an alternative to -Xms and defines the initial heap size as percentage of the RAM of the machine, container or cgroup. With JDK 8, a decimal number is required as value, like 5.0. On JDK 11 and later integer numbers are also accepted. This parameter is only used when Heap Elasticity is enabled.

1.5

-XX:MaxRAMPercentage=<value>

This is an alternative to -Xmx and defines the maximum heap size as percentage of the RAM of the machine, container or cgroup. With JDK 8, a decimal number is required as value, like 75.0. On JDK 11 and later integer numbers are also accepted. The default value is 25.0, but the default is capped to a maximum of 32 GB.

25

‑XX:[+/‑]AutoTuneResourceDefaultsBasedOnXmx

Allows Azul Zulu Prime JVM to start with Xmx128M or Xmx256M by reducing default values for some parameters such as ReservedCodeCacheSize and GC thread count. The flag is automatically set to true for java ‑version, ‑help, etc.

true

-XX:[+/-]UseZST

Allows Azul Zulu Prime JVM to start with or without the Azul Zulu Prime System Tools (ZST) component.

false

‑XX:NonZSTModePreferenceLevel=<value>

Sets the preference selection for launching Azul Zulu Prime JVM with ZST. The selection choices are as follows:

  • 0 - Never select the non-ZST mode. Azul Zulu Prime JVM will error out if ZST is not installed, configured, or enabled.

  • 1 - Select the non-ZST mode only if ZST is not installed properly.

    Note, if ZST is installed but misconfigured in this mode, Azul Zulu Prime JVM will error out.

  • 2 - Select the non-ZST mode if ZST is not installed, configured, or enabled.

    Note, when enabled, -XX:+UseZST overrides the ‑X:NonZSTModePreferenceLevel command-line option with its value.

1

-XX:GPGCDynamicGCThreadCountPolicy=<value>

Enable dynamic garbage collection thread count policy.

  • 0 - Disable dynamic handling. Set a static garbage collector thread count that is fixed to the -XX:GPGCThreads value.

  • 1 - The garbage collector thread count is managed automatically and will dynamically increase but never decrease. The thread count is limited by -XX:GPGCThreads=N.

  • 2 - The garbage collector thread count is managed automatically and will be increased and decreased dynamically. The thread count is limited by -XX:GPGCThreads=N.

0

‑XX:GenPauselessNewThreads=<value>

Specifies the number of garbage collection worker threads for the new generation. Setting default value is based off of Xmx: If Xmx is more than 2 GB, the default value is 45% of the number of logical cores available to the process. If Xmx is less than or equal to 2 GB, the default value is either Xmx divided by 128 MB or 45% of the number of logical cores available to the process, whichever is smaller. If -XX:+UseSTW is specified, the default value is the number of logical cores. available to the process. The minimum value supported is 1.

8

‑XX:GenPauselessOldThreads=<value>

Specifies the number of garbage collection worker threads for the old generation. Setting default value is based off of Xmx:

  • If Xmx is more than 2 GB, the default value is 30% of the number of logical cores available to the process.

  • If Xmx is less than or equal to 2 GB, the default value is either 66% (two thirds) of the value of GenPauselessNewThreads, or 30% of the number of logical cores available to the process, whichever is smaller.

  • When -XX:+UseSTW is specified, the default value is the same as the number of logical cores available to the process. The minimum value supported is 1.

5

‑XX:GPGCThreads=<value>

Specifies the total number of garbage collection worker threads This is an alternative way to specify GenPauselessNewThreads and GenPauselessOldThreads When used, GenPauselessOldThreads is derived as 40% of GPGCThreads. GenPauselessNewThreads is then derived as GPGCThreadsGenPauselessOldThreads. The default value is the sum of the default values of GenPauselessNewThreads and GenPauselessOldThreads. The minimum value supported is 2.

13

Intrinsic Options

Intrinsics are hand-tuned machine code integrated into the JVM for some numeric algorithms like BigInteger, AES encryption, CRC checksum calculations, and SSE/AVM opcodes. Most are turned on by default. To see a list of all adjustable intrinsic options of the current Azul Zulu Prime JVM and their default values, run the following command:

 
$ /opt/zing/zing-jdk1.8.0-<version>/bin/java -XX:+PrintFlagsFinal -version 2>&1 | grep Intrinsic
Command-Line Option Description Default

-XX:[+/-]UseMultiplyToLenIntrinsic

Disables intrinsic for BigInteger::multiplyToLen()

true

-XX:[+/-]UseSquareToLenIntrinsic

Disables intrinsic for BigInteger::squareToLen()

true

-XX:[+/-]UseMulAddIntrinsic

Disables intrinsic for BigInteger::mulAdd()

true

-XX:[+/-]UseMontgomeryMultiplyIntrinsic

Implements BigInteger.montgomeryMultiply intrinsic.

true

-XX:[+/-]UseMontgomerySquareIntrinsic

Implements BigInteger.squareMultiply intrinsic.

true

-XX:[+/-]UseLog4jGetCallerClassIntrinsic

Enables intrinsic for log4j StackLocator.getCallerClass().

false

Native Memory Tracking Options

These options are useful to analyze usage of memory outside the Java heap and ZST memory for NIO, thread stacks.

Command-Line Option Description Default

-XX:[+/-]PrintNMTStatistics

Enables output of the Native Memory Tracking statistics.

false

-XX:NativeMemoryTracking=<tracking level>

Specifies the level of tracking output. In Azul Zulu Prime JVM 16.01.0.0 and later releases, only summary level is supported.

off

Code Cache Use Optimization Options

Command-Line Option Description Default

-XX:[+/-]UseEmergencyCodeCacheFlushing

Disables emergency code cache flushing. Emergency flushing starts removing unused blobs only when more than 85% of code cache space is consumed. Before that it "sleeps" and does nothing. This option is enabled by default.

true

-XX:[+/-]UseIncrementalCodeCacheFlushing

Enables regular code cache flushing. Unlike emergency flushing, regular flushing triggers unused blobs removal during the whole lifetime of the Azul Zulu Prime JVM, i.e., it never waits for reaching 85% of code cache utilization. This option can be helpful when the code cache memory is being exhausted despite UseEmergencyCodeCacheFlushing was enabled. This option is disabled by default.

false

-XX:[+/-]EnableC1Flushing

Turns off flushing of unused code blobs generated by the Tier 1 compiler. This option takes effect only if either the UseIncrementalCodeCacheFlushing or UseEmergencyCodeCacheFlushing option is set to true.

true

‑XX:CodeCacheMinimumFreeSpace=<value>

Reserves the specified amount of space for code other than code compiled methods.

5369856

‑XX:CodeCacheOopTableSize=<value>

Sets the initial size of the elastic table used internally by the VM to store information about object references that reside in the code cache. The maximum value is 64 MB.

25% of InitialCodeCacheSize

‑XX:ReservedCodeCacheSize=<value>

Specifies the maximum size of the code cache. The minimum value is a minimum of 6% of Xmx and 256 MB. The maximum value is 1280 MB.

10% of Xmx

‑XX:InitialCodeCacheSize=<value>

Specifies the initial size of the code cache. The minimum value is a minimum of 3% of Xmx and 64 MB The maximum value is the value of ReservedCodeCacheSize.

Minimum of 2% of Xmx and 10% of ReservedCodeCacheSize

-XX:[+/-]MlockCodeCache

Locks code cache in memory, preventing it from being paged out or swapped out. The option is not applicable to the ZST mode.

true for non-ZST mode

-XX:[+/-]AllocCodeCacheInCHeap

Decides whether code cache is accounted under C heap or under Java heap.

true for non-ZST mode false for ZST mode

Monitor Cache Use Optimization Options

Command-Line Option Description Default

-XX:InitialMonitorCacheSize=<value>

Specifies the initial size of the monitor cache.

0

-XX:ReservedMonitorCacheSize=<value>

Specifies the maximum size of the monitor cache.

512*M

-XX:[+/-]AllocMonitorCacheInCHeap

Allows choosing between C heap and Java heap memory for MonitorCache. Using monitor cache elasticity is not recommended when monitors are in Java heap and, by default, InitialCodeCacheSize is set to ReservedCodeCacheSize when the flag is disabled.

true

-XX:[+/-]MlockMonitorCache

Locks memory (mlock) to prevent monitor cache pages from being swapped out.

true

Thread Local Allocation Buffer (TLAB) Use Optimization Options

Command-Line Option Description Default

-XX:MinTLABSize

Minimum allowed size of the thread local allocation buffer (in bytes).

32768

-XX:[+/-]GPGCUseFullPageTLABs

When true, uses a single 2 MB page as a fixed size TLAB.

false

-XX:TLABRefillWasteFraction

Specifies maximum TLAB waste at a refill (internal fragmentation).

64

‑XX:TLABSize

Sets the size of the thread local allocation buffer.

2031616

‑XX:TLABResizeStepPercent

25

‑XX:TLABWasteTargetPercent

Determines the percentage of the threshold of the TLAB when the object size is larger than a threshold, the TLAB is retired, and the object is allocated inside a new TLAB.

25

Azul Zulu Prime JVM in the Non-ZST Mode Options (available since Azul Zulu Prime JVM 19.06.0.0)

Command-Line Option Description Default

‑XX:[+/-]UseLargePages

Enables Azul Zulu Prime JVM to use large (2M pages) if the system is properly configured. Before trying to use large pages, read Using Huge Pages with Azul Zulu Prime JVM for system configuration steps. The default value for Azul Zulu Prime JVM with ZST mode is true, for Azul Zulu Prime JVM mode - false.

true for Azul Zulu Prime JVM with ZST, false for Azul Zulu Prime JVM

‑XX:[+/-]UseTransparentHugePages

Enables Azul Zulu Prime JVM to use Transparent Huge Pages (THP) in shared memory madvise mode if the system is properly configured. Before trying to use large pages, read Using Huge Pages with Azul Zulu Prime JVM for system configuration steps. To disable, use ‑XX:-UseTransparentHugePages. Transparent Huge Pages (THP) in shared memory madvise mode is available in Linux kernel version 4.12.10 and above.

true

‑XX:[+/-]UseTransparentHugePagesForCodeCache

Use Transparent Huge Pages (THP) for code cache provided that (a) it is allocated in C heap memory and (b) it is safe to use THP without incurring defragmentation stall.

true

‑XX:[+/-]UseTransparentHugePagesForMonitorCache

Use Transparent Huge Pages (THP) for monitor cache provided that (a) it is allocated in C heap memory and (b) it is safe to use THP without incurring defragmentation stall.

true

‑XX:[+/-]UseTransparentHugePagesForSideBand

Use Transparent Huge Pages (THP) for sideband forwarding table provided that (a) it is allocated in C heap memory and (b) it is safe to use THP without incurring defragmentation stall.

true

‑XX:GPGCNoZSTBackingStoragePath

Points to the mount point for managing large pages when configuring static Large pages. Used in conjunction with -XX:UseLargePages on Linux kernel versions prior to 4.14. Before trying to use large pages, read Using Huge Pages with Azul Zulu Prime JVM for system configuration steps.

‑XX:[+/-]GPGCNoZSTUseNUMAInterleaving

Enables non-uniform memory access (NUMA) interleaving when libnuma library is present.

false if either libnuma (API version 2) is not present on the system or if the process has been already memory-bound to specified nodes using the numactl —membind option; true otherwise.

‑XX:[+/-]GPGCNoZSTWorkaroundRSSInaccuracy

Report more accurate resident set size (RSS) value for off heap memory in the GC log file. In the non-ZST mode, Azul Zulu Prime JVM uses the shared memory multimapping facility provided by Linux. However, the RSS reported by Linux is known to be inaccurate when the process does multimapping. When the flag is turned on Azul Zulu Prime JVM tries to compute a more accurate value for RSS which is then reported in the GC log.

true

‑XX:[+/-]AlwaysPreTouch

Acquires all of Xmx upfront before starting the application. If the option is not specified, a JVM internal thread acquires the memory in the background after an application is started.

false

‑XX:[+/-]GPGCNoZSTUseOptimizedMlockAll

Optimizes mlockall(2) behavior to significantly reduce application exit times.

true

Garbage Collector Options

Command-Line Option Description Default

-XX:GPGCActiveObjectPaddingSize=<n>

Number of cache lines of padding to insert after mutator relocated objects during relocation.

0

-XX:[+/-]GPGCRetainActiveObjectPadding

When true, retain any previously allocated active object padding during GC relocation. When false, any previously allocated active object padding is removed during GC relocation and will not be re-added until the object is mutator relocated again.

false

-XX:GPGCTimeStampPromotionThresholdMS=<n>

Time, in milliseconds, that an object page stays in the new generation before getting promoted to the old generation.

2000 for Xmx > 2 GB, 500 for Xmx ⇐ 2 GB

-XX:GPGCNewGenConcurrentMarkFlushRetryLimit= <upper limit of retries>

Limits the number of mutator NMT reference buffer flushes performed during concurrent marking. The default value of the retry limit is 3. To return to the old behavior of looping in concurrent marking until no more mutator references are flushed, change the default value to -1.

3

-XX:GPGCNewGenConcurrentMarkFlushRetryLimitAction=<upper limit of iterations>

Controls the behavior of the new garbage collector when the number of iterations of the concurrent marking mutator NMT flush loop exceeds the specified retry limit. The default action is to perform reference strengthening followed by iterating the limit of retries more times before exiting out of the loop and heading toward the safepoint.

2

-XX:GPGCPausePreventionMemory

Allocates the limit from the pause fund to restrict pause prevention memory.

-1

-XX:GPGCHeuristicCheckIntervalMS = <time interval>

Controls the time interval between consecutive heuristic evaluations when Azul Zulu Prime JVM runs heuristics to determine the time to trigger a garbage collection. The default is 20 milliseconds starting with Azul Zulu Prime JVM 20.03.0.0. Before Azul Zulu Prime JVM 20.03.0.0, it was 50 milliseconds.

20

-XX:[+/-]UseEpsilonGC

Implements a no-op garbage collector. When enabled, Azul Zulu Prime JVM neither triggers any GC cycles nor generates GC barriers. Being an experimental option, it needs to be unlocked by preceding -XX:+UnlockExperimentalVMOptions.

false

-XX:GPGCHeuristicHalfLifeMS

Specifies the half-life, in milliseconds, for exponential decay of heuristic models that drive triggering of garbage collection cycles.

60000

-XX:GPGCNewGCMaxIntervalMS

Specifies the maximum interval between new generation garbage collection cycles triggered by GC heuristics. The interval is calculated from the start of the previous new generation collection.

0

-XX:GPGCOldGCMaxIntervalMS

Specifies the maximum interval between old generation garbage collection cycles triggered by GC heuristics. The interval is calculated from the start of the previous old generation collection.

0

-XX:GPGCMaxOldGCInterval

Specifies the maximum number of new GC cycles that can be run before triggering the next full (Old) GC cycle.

-1

-XX:[+/-]UseGCUnifiedLogging

Enables unified GC logging in Azul Zulu Prime JVM 8, 11, and 13.

true

-XX:GPGCTargetPeakNewGenOccupancyBytes

Specifies the soft limit for java heap usage by the new generation, in bytes, that GC heuristics target to achieve.

0

-XX:GPGCTargetPeakNewGenOccupancyPercent

Specifies the soft limit for java heap usage by the new generation, as a percentage of the maximum heap size, that GC heuristics target to achieve.

0

-XX:GPGCTargetPeakHeapOccupancyPercent

Specifies the soft limit for overall java heap usage, as a percentage of the maximum heap size, that GC heuristics target to achieve.

100 for ZST reserve-at-config, 95 for ZST reserve-at-launch, 90 for non-ZST mode

Advanced Miscellaneous Options

Command-Line Option Description Default

-XX:[+/-]PrintGCHSLines

Enables writing system information headers (GCHS) in the garbage collection log file.

true if GC logging is enabled, false if GC logging is disabled

-XX:[+/-]PrintGCExtraDetails

Enables a new Garbage Collector logging level used wherever the data collection or reporting has a noticeable overhead. This flag also enables PrintGCDetails which is the next lower logging level.

false

-XX:+PromoteCheckpoints

Lets tardy threads complete the checkpoint process by pausing active threads. See Troubleshooting Guide for suggestions on when to use this option.

false

-XX:CheckpointPromotionDelay=<time in ms>

Defines the threshold for triggering the promotion timeout. This flag has an effect when -XX:+PromoteCheckpoints is specified.

850

uintx ProfileStartupLimitInSeconds

Sets time limit for ReadyNow! to wait for compilations to finish at startup as specified in seconds.

60

-XX:ActiveProcessorCount=<number of CPUs>

Allows for specifying explicitly the number of CPUs available for the Azul Zulu Prime JVM JVM. Works only with the container support (i.e., if -XX:-UseContainerSupport is not specified) and overrides the automatic CPU detection logic in the JVM.

-1

-XX:[+/-]UseContainerSupport

Turns off using container-specific information about available CPUs instead of using the information about the whole system. Enabled by default.

true

-XX:[+/-]DashVersionSilenceLicenseErrors

Starting with Azul Zulu Prime JVM 18.07.0.0, the Azul Zulu Prime JVM JVM diagnoses licensing problems if run with -version option: it prints a warning and exits with an error code. If this option is specified together with -version, the JVM ignores licensing problems (specifically the warning is not printed) and exits with 0. Setting the ZING_DASH_VERSION_SILENCE_LICENSE_ERRORS environment variable has the same effect.

false

-XX:[+/-]PreserveFramePointer

(Available since Azul Zulu Prime JVM 17.03.0.0; requires ZST 5.18.0 or later) The flag is needed for producing flame graphs with the Linux perf utility and for similar performance analysis tools which rely on stackwalking to record Java method invocations, the time percentage spent in them, and their use of Linux system function calls.

false

-XX:[+/-]UseLLVMBasedDisassembler

Turns the LLVM-based disassembler off. Starting with Azul Zulu Prime JVM 18.07.0.0, the default disassembler is changed from Azul Zulu Prime JVM internal to LLVM-based.

true

-XX:PrintAssemblyOptions=intel <diagnostic>

Changes disassembly syntax from AT&T to intel. This flag is diagnostic and must be preceded by -XX:+UnlockDiagnosticVMOptions.

-XX:[+/-]UseModifiedThreadLocal

Internally polls on a ReferenceQueue to determine if a key object has been garbage collected rather than polling by checking for NULL through the Reference.get() API, that can unintentionally prevent the weakly reachable key from being garbage collected. The flag is more friendly to garbage collectors that perform marking concurrently.

true

-XX:[+/-]UseSpecialArrayCopy

Indicates which version of arraycopy of objects intrinsic works with. When set to true, it stands for a new vectorized intrinsic version. When set to false, it stands for the old scalar version.

true

-Xnativevmflags:[ignore|error|warn]

If -Xnativevmflags:error is specified and the Azul Zulu Prime JVM detects an option that it does not support, it does not launch and generates the following type of message:

HotSpot™ 64-Bit Tiered VM error: Unsupported native VM option ‘+UseParNewGC’

If -Xnativevmflags:warn is specified as a last option in the command line, it enables a warning message for each OpenJDK JVM option ignored by Azul Zulu Prime JVM. It prints a warning message while your application starts normally, for example:

$ /opt/zing/zing-jdk8/bin/java -XX:+UseParallelGC -Xnativevmflags:warn -version

Zing 64-Bit Tiered VM warning: Ignoring unsupported native VM option '+UseParallelGC'

java version "1.8.0-zing_18.12.0.0"

Zing Runtime Environment for Java Applications (build 1.8.0-zing_18.12.0.0-b4)

Zing 64-Bit Tiered VM (build 1.8.0-zing_18.12.0.0-b9-product-azlinuxM-X86_64, mixed mode)

ignore

-XX:[+/-]ResetSignalMaskAtLaunch

Clears the signal mask to enable SIGQUITs when set to true.

true

-XX:ProfilePreMainTier2ExtraCompilerThreads

Enables the use of extra threads for compilations for C2 and Falcon during the pre-main phase when ReadyNow triggers and executes different activities.

This option is complementary to CIMaxCompilerThreads.

In pre-main phase when your code is not yet being executed and GC is silent, the total amount of C2/Falcon compiler threads is equal to the sum of CIMaxCompilerThreads and ProfilePreMainTier2ExtraCompilerThreads. Note that the sum is capped to match the number of CPUs available for Azul Zulu Prime JVM on a machine.

When the pre-main phase is done (i.e., ProfileStartupLimitInSeconds is exhausted) and your main is started, the total amount of compiler thread goes back to standard CIMaxCompilerThreads.

2

-XX:ProfileWorkerThreads

When this option value is greater than 0, it allows ReadyNow! to use multiple concurrent background threads to asynchronously trigger and execute different ReadyNow!-related activities such as early class loading, class initializations, or trigger compilations.When the flag value is set to 0, old synchronous event’s triggering and/or processing is used.

The default value is equal to the minimum number of CPUs available for Azul Zulu Prime JVM on a machine.

4

-XX:[+/-]RunVMErrorOnUnhandledSignals

Does error reporting for SIGABRT, SIGFPE, and SIGTRAP signals if there are no user defined handlers installed.

true

-XX:[+/-]SafelyTrustEffectivelyFinalFields

Enables effectively final optimizations for private fields which are initialized inside a constructor or class initializer, but are otherwise read only. The effectively final family of optimizations allows the VM to perform compiler optimization as if the fields were constants, but deoptimize if a later write is detected at runtime.

true

-XX:[+/-]UseOpenJSSE

Enables the OpenJSSE provider that supports TLS 1.3, see https://github.com/openjsse/openjsse for details.

false

-XX:[+/-]UseLegacy8uJSSE

Enables the Legacy8uJSSE provider that includes the 8u252 JSSE provider implementation without TLS 1.3 support as a fallback measure, and the non-default OpenJSSE provider previously included in Azul Zulu Prime JVM 8 distributions for non-default support for TLS 1.3. See Using Version 1.3 of Transport Layer Security (TLS) Protocol for details.

false

-XX:MaxRAMPercentage=<percentage of the memory limit>

Adjusts the maximum heap size (if not explicitly specified) based on the configured cgroup memory limit. If Xmx is not specified, the VM heap size limit is calculated as (MaxRAMPercentage / 100) * cgroups_limit.

25

-XX:[+/-]AlignArrayStart

Enables 64-bit alignment of the starting point of any array in the heap memory.

true

-XX:HserrRawCodeWindowSize=<size in bytes>

Specifies the size of raw x86 instructions to dump into hs_err file.

512

-XX:MlockLevel

Selects the memory locking strategy during JVM initialization:

  • 0 - Do not attempt any mlock in the JVM.

  • 1 - Lock only libjvm.so text region (can mlock up to 20 MB).

  • 2 - Lock all existing memory regions before JVM initialization (can mlock up to 150MB).

  • 3 - Lock all existing memory regions at the end of JVM initialization (can mlock up to 500 MB with ZST mode, additionally locks the complete Xmx with non-ZST mode).

Note that for the mlock operation to succeed the user should have permission to lock the required amount of memory in RAM. Check the ulimit l setting before starting the JVM with the MlockLevel option. Only a privileged user can increase this limit.

By default, no error message is printed if the mlock operation fails. Adding 1000 to the values above results in the same operation performed with errors, if any, printed to stderr. For example, specifying -XX:MlockLevel=1001 will print a warning if locking libjvm.so text region fails but -XX:MlockLevel=1 will not.

1

-XX:[+/-]KeepCodeEntrantOnAsyncExceptions

Keeps code of the compiled method entrant for further utilization (instead of making it non-entrant) in the case when an asynchronous exception (OutOfMemoryError, StackOverflowError) occurs during the execution of the JIT-compiled version of the method.

false

-XX:[+/-]ProfileExitOnInputError

Exits when an input profile is specified but cannot be found or is malformed. The option is applicable when file_name is missing for -XX:ProfileLogIn=file_name.

false

-XX:[+/-]UseFastJNIAccessors

Enables JNI Get<type>Field function optimization. When the optimization is enabled, the function tries to quickly access the field value first. If it is not possible (e.g., garbage collection is in progress), the value is retrieved with the standard procedure.

true

-XX:[+/-]UseSpecialHashSet

Enables optimization for a special HashSet filling pattern when elements of the input collection are frequently added into an empty HashSet.

false

-XX:[+/-]UseThreadStateNativeWrapperProtocol

Enables lock-less JNI transitions.

This flag needs a minimum of 4K available lockable memory to be enabled. Otherwise, the flag ergonomically resets to false.

true

-XX:[+/-]UseKestrelC2

Enables a newer C2 implementation introduced to Azul Zulu Prime JVM in 2020. It is based on a lightweight use of the LLVM backend, and typically produces faster code than UseSeaOfNodesC2 while keeping compilation effort at similar levels. UseKestrelC2 generally exhibits a significantly lower compilation-time CPU consumption compared to Falcon.

This option is complementary to UseC2.

true

-XX:[+/-]UseSeaOfNodesC2

Enables the traditional C2 implementation that has been part of Azul Zulu Prime JVM since 2010.

This option is complementary to UseC2.

false

-XX:ZingTestingGracePeriodSec=<value>

Specifies the number of Azul Zulu Prime JVM testing grace period seconds (up to 3600).

0

-XX:[+/-]UseFastJNIExceptionCheck

Enables the JNI ExceptionCheck function optimization. When the optimization is enabled, the function tries to quickly check for a synchronous pending exception. If an async exception is set, the exception check happens with the standard procedure.

true

-XX:[+/-]MaxFDLimit

Enables the attempt to set the soft limit for the number of open file descriptors to the hard limit.

true

-XX:[+/-]UseLegacyJNINameEscaping

Enables skipping the extra mapping check to avoid compatibility issues due to new mapping rules for JNI methods introduced in JDK-8233624. See New mapping rules from a Java native method name to a C native library implementation function name for more information about new mapping rules.

false

-XX:[+/-]GPGCReportJavaHeapPoolMXBean

Exposes the total sum of memory usage of all MemoryPoolMXBean memory pools to the java.lang.management interface.

false

-XX:GPGCHeapJavaPoolMXBeanName=<value>

Specifies the name of the total java heap pool only when GPGCShowJavaHeapPoolMXBean is enabled.

0

-XX:GPGCNewGenPoolMXBeanName=<value>

Specifies the name of the new generation in the java heap pool.

0

-XX:GPGCOldGenPoolMXBeanName=<value>

Specifies the name of the old generation in the java heap pool.

0

-XX:GPGCPermGenPoolMXBeanName=<value>

Specifies the name of the permanent generation in the java heap pool.

0

Garbage Collector Options to Control ZVision Output

These Azul Zulu Prime JVM command-line options control the output of garbage collector information when using ZVision.

Command-Line Option Description

-Xloggc:[filename]

Enables verbose GC logging and directs it to a file. It is recommended to add a timestamp and a PID to get a unique log name:

-Xloggc:gc_%t_%p.log

-XX:+PrintGCDetails

Enables the detailed logging output.

-XX:PrintSYSINFOAtIntervalSec=<time interval>

Writes the SYSINFO line (CPU load, memory usage, paging info) at fixed intervals in seconds.

As of Azul Zulu Prime JVM release 5.10.0, the default value the Azul Zulu Prime JVM flag DisableExplicitGC is off. Prior to release 5.10.0, calls to System.gc() were ignored and no garbage collection was initiated unless -XX:-DisableExplicitGC was set. From 5.10.0 this is no longer the case and System.gc() calls may initiate a full GC cycle depending on the value of the GPGCOptimisticExplicitGC flag. If a System.gc() call initiates a garbage collection, the calling thread may or may not be blocked for the duration of the GC depending on the value of the SynchronousExplicitGC flag. The previous behavior is achieved by turning on the DisableExplicitGC flag, using -XX:+DisableExplicitGC.

  • -XX:{+/-}GPGCOptimisticExplicitGC

    When enabled, a thread calling System.gc() initiates a new garbage collection if and only if one is not already in progress or one is pending. This flag is enabled by default.

  • -XX::{+/-}SynchronousExplicitGC

    When enabled, a thread that initiates a garbage collection by calling System.gc() is blocked for the entire garbage collection cycle and resumes when the GC completes. Otherwise a concurrent garbage collection is initiated and the calling thread continues to execute. This flag is enabled by default.

Reserved Memory Command

When a Java application starts, heap memory is Reserved according to the value specified using the -Xmx command-line option. If not specified, the value is 1 GB.

There is no specific ulimit pertaining to -Xmx for Azul Zulu Prime JVM. Such memory is configured for use during the system’s configuration using ZST. Configuration of the system using ZST requires root level permissions (superuser).

If -Xmx is less than 1 GB, Azul Zulu Prime JVM automatically increases it to 1 GB and writes a warning to stderr.

If you are running on a SUSE Linux Enterprise Server (SLES) system, prior to launching a Azul Zulu Prime JVM for the first time, set the amount of virtual memory available to the shell using ulimit. At the command line, type:

ulimit -v unlimited

Collecting JVM Behavior Data by Using jstat

To collect information about the Azul Zulu Prime JVM’s garbage collectors' behavior, use Azul Zulu Prime JVM’s monitoring tool (jstat) with the -gpgc command-line option . Use the jstat distributed with Azul Zulu Prime JVM, not the jstat distributed with Oracle’s JVM.

Usage Syntax

 
jstat -gpgc [-t == show timestamps] pid [msec between samples [# samples]]

Samples

Sample -gpgc, -t, samples, #samples options

 
jstat -gpgc -t 6549 10 5 Timestamp NGU OGU PGU JHMX NGC NGCT OGC OGCT GCT 172.0 419840.0 2048.0 6144.0 1036288.0 276 170.689 123 94.579 265.268 172.1 419840.0 2048.0 6144.0 1036288.0 276 170.689 123 94.579 265.268 172.1 419840.0 2048.0 6144.0 1036288.0 276 170.689 123 94.579 265.268 172.1 419840.0 2048.0 6144.0 1036288.0 276 170.689 123 94.579 265.268 172.1 419840.0 2048.0 6144.0 1036288.0 276 170.689 123 94.579 265.268

Sample -gpgc option

 
jstat -gpgc 44265 NGU OGU PGU JHMX NGC NGCT OGC OGCT GCT 36864.0 73728.0 36864.0 1036288.0 742 186.860 221 147.621 334.481

Sample -class option

 
jstat -class 44265 Loaded Bytes Unloaded Bytes Time 3063 7777.3 1 0.0 1.14

Sample -gc option

 
jstat -gc 44265 NGU OGU PGU JHMX NGC NGCT OGC OGCT GCT 36864.0 73728.0 36864.0 1036288.0 742 186.860 221 147.621 334.481

Sample -gccause option

 
jstat -gccause 44265 JavaHeapPercentUsed NGU OGU PGU JHMX NGC NGCT OGC OGCT LGCC GCC 14.23 36864.0 73728.0 36864.0 1036288.0 742 186.860 221 147.621 No GC No GC

Sample -gcnew option

 
jstat -gcnew 44265 NGU JHMX NGC OGC NGCT 36864.0 1036288.0 742 221 186.860

Sample -gcold option

 
jstat -gcold 44265 PGU OGU JHMX NGC OGC OGCT GCT 36864.0 73728.0 1036288.0 742 221 147.621 334.481

Sample -gcutil option

 
jstat -gcutil 44265 JavaHeapPercentUsed JHMX NGC NGCT OGC OGCT GCT 14.23 1036288.0 742 186.860 221 147.621 334.481

Sample -stats option

 
jstat -stats 44265 Loaded classInitTime classLinkedTime classVerifyTime sun.cls.time applicationTime safepointSyncTime safepointTime vmOperationTime NGC NGCT OGC OGCT 3063 0.759357 0.121911 0.250850 1.140906 1996.780026 0.450701 1.511731 1.663066 742 186.860000 221 147.621000

Sample -profile option

 
jstat -profile 44265 Loaders IDedLoaders Class SpecLoad SpecInit Loaded Inited Developed Method T1E T1C T2E T2C Profiled ProfUsed Warn Error 21 2 3065 2947 1697 2927 2274 1445 1407 230 220 221 831 797 261 0 [source, shell,opts="user,check"]

Sample -profileerrors option

 
jstat -profile 44265 Warn ColClass SpecLoadFail UnmatchLoad RepLoad OverDeveloped Error ColLoader UnresLoaders UnresClass SpecInitFail UnresMthod ColMathod 18 1 0 15 0 2 0 0 0 0 0 0 0 [source, shell,opts="user,check"]

Sample -deopt option

 
jstat -deopt 44265 CHA UnreachedIf UnreachedCall Unloaded Uninit Unexpected Null StuckInLoop NotEntrant Cast Range Throw Div0 UncountedLoops Jvmti Other 13 6 13 0 0 2 1 0 0 3 0 0 0 0 0 0 [source, shell,opts="user,check"]

See also Using jstat with ReadyNow! Profile.

Output Header Descriptions

Header Description

applicationTime

Time called

Bytes

Bytes consumed

classInitTime

Time called

classLinkedTime

Time called

classVerifyTime

Time called

GCC

GC cause

GCT

Both generation collectors total GC time

JavaHeapPercentUsed

Percent of memory used by Java heap

JHMX

Java heap Xmx value

Loaded

Processes loaded

LGCC

Last GC cause

NGC

New generation GC count

NGCT

New generation GC time (concurrent time the collector is running)

OGC

Old generation GC count (at that instant)

OGCT

Old generation GC time (concurrent time the collector is running)

NGU

New generation use (at that instant)

OGU

Old generation use (at that instant)

PGU

Permanent generation use

safepointSyncTime

Time called

safepointTime

Time called

sun.cls.time

Time called

Time

Elapsed time

Unloaded

Processes unloaded

vmOperationTime

Time called

Azul Zulu Prime JVM Mini-Core File Option

There is an option, -XX:+DumpMiniCore, that creates significantly smaller Azul Zulu Prime JVM core files. This option is specified through the Java application launch command and applied to the runtime Java application. It is not applied to the Azul Zulu Prime JVM host machine. When you use this option:

  • Generated Azul Zulu Prime JVM core files do not include application objects stored in the Java heap.

  • Time required to produce a Azul Zulu Prime JVM core file or core file bundle is reduced.

Azul Zulu Prime JVM Mini-Core File Requirements

The mini-core file option requires ZST 5.7.5 or later and Azul Zulu Prime JVM 5.10.x or later.

If the option is specified and either the ZST version or Azul Zulu Prime JVM version is not compatible, a message is issued.

  • If the ZST version supports the -XX:+DumpMiniCore option, but the Azul Zulu Prime JVM version does not, an Unrecognized VM option warning is printed to STDERR. For example:

     
    <my dir>/jdk6/x86_64/product/bin/java -XX:+DumpMiniCore -version Zing 64-Bit Tiered VM error: Unrecognized VM option '+DumpMiniCore' Could not create the Java virtual machine.
  • If the Azul Zulu Prime JVM version supports the -XX:+DumpMiniCore option, but the ZST version does not, a warning message is issued. For example:

     
    /bin/java -jar -XX:+DumpMiniCore -version Zing VM Warning: -XX:+DumpMiniCore is not supported by this ZST (found API version 0x5e, requires API version >= 0x5f) java version "1.7.0-internal-zing_99.99.99.99.dev" Zing Runtime Environment for Java Applications (build 1.7.0-internal-zing_99.99.99.99.dev-b25) Zing 64-Bit Tiered VM (build 1.7.0-zing_99.99.99.99.dev-b501-product-azlinuxM-X86_64, mixed mode)

Setting the Azul Zulu Prime JVM Mini-Core File Option

Include the option -XX:+DumpMiniCore with your Java launch command.

Some failures cannot be effectively diagnosed with a mini-core file. In this case, Azul support may request that you try to reproduce the failure and produce a full-sized core file, by removing -XX:+DumpMiniCore from your Java launch command.

  • When -XX:+DumpMiniCore option is not specified, a full core file, including the application objects stored in the Java heap, is created if Azul Zulu Prime JVM crashes.

  • When -XX:+DumpMiniCore option is specified, a core file, that does not include the application objects stored in the Java heap, is created if Azul Zulu Prime JVM crashes.

Speculative Locking Options

Speculative Locking in the Azul Zulu Prime JVM leverages the Intel® Transactional Synchronization Extensions (Intel® TSX) instruction set, to take advantage of the situation where there is lock contention between threads, but no data contention inside the locked region. If a multithreaded program can concurrently modify shared data, a synchronized block or method is usually necessary to ensure correctness. This causes lock contention. The synchronization is not necessary if the concurrent accesses are to different parts of the shared data. In other words, a lock is not necessary when there is no data contention inside the locked region. For example, two different threads can modify a hash table concurrently without taking a lock, if they change values in different buckets of the hash table. Speculative Locking elides locks by speculating that there is no data contention. It does so by starting a transaction using Intel TSX instructions. If the speculation turns out to be wrong, the Intel TSX enabled CPU will detect it, abort the transaction and roll back execution to the start of lock. If a transaction gets aborted, the VM, using certain heuristics, either retries speculation or just acquires the lock as usual. The heuristic maintains aborted or attempted transactions for every speculated lock and disables speculation on that lock if it detects a high aborted or attempted value.

The following table summarizes the command-line options that control the use of speculative locking in Azul Zulu Prime JVM. The command lines options are case sensitive.

Command-Line Option Description Default

-XX:[+/-]UseRTMLocking

Enables speculative locking.

false

-XX:[+/-]RTMHeuristic

Enables (Restricted Transactional Memory) RTM heuristics.

true

-XX:RTMAbortRatio=<threshold value>

Threshold value for RTM heuristics. If aborted or attempted transactions ratio goes beyond this limit for a monitor then speculation is disabled for that monitor.

50

-XX:RTMRetryCount=<attempts>

Number of times speculation is attempted on a monitor, per lock acquisition. Fewer, or no attempts will be made if internal heuristic disables speculation on the monitor.

5

Note that RTMHeuristic, RTMAbortRatio, and RTMRetryCount options are meaningful if the UseRTMLocking option is true.

Falcon Compiler Options

The Falcon compiler is an optimizing JIT (Just-In-Time) compiler that is the default Azul Zulu Prime JVM compiler starting from the Azul Zulu Prime JVM release 17.03.0.0. Below are the Falcon-specifc command-line options:

Option Description

-XX:+UseFalcon

Specifies which Tier 2 compiler should be used. The default Tier 2 compiler is Falcon. To use the C2 JIT instead of the Falcon JIT, run the following command:

$JAVA_HOME/bin/java -XX:-UseFalcon –cp . myprog

-Xcompilerflags:ignore|warn|error

Controls the handling of a C2 or Falcon specific flag used when the other compiler is active. The default value is "warn".

-XX:+UseFalconOSR

Controls the On Stack Replacement (OSR) functionality. OSR is enabled by default. It is not recommended to disable this option. If needed, disable it for only diagnostics purposes.

-XX:Tier2OSRThreshold=<threshold value>

Changes the threshold at which the OSR is triggered – that is loop compilation by C2 or Falcon compiler. The default value is 14000.

The value might be decreased to improve warm-up characteristics.

-XX:FalconCompileThreshold=<threshold value>

Threshold value for the Falcon JIT compiler. Replaces the similar option of the C2 compiler (-XX:C2CompileThreshold). The default value is 50000.

-XX:+UseC2

Disables Falcon and switches to the C2 compiler.

-XX:FalconUseAVX

Specifies the highest supported AVX instructions set on x86/x64 CPUs. The default value is 2.

-XX:[+/-]FalconUseLegacyInliner

This option is deprecated with no replacement starting with the release of Azul Zulu Prime JVM 20.02.0.0.

Switches back to the old implementation of the LLVM inliner instead of using a highly customized integrated inliner to perform inlining optimizations in Falcon compiles.

The default value is false.

-XX:FalconOptimizationLevel=int

Controls the level of compiling optimization. The default value is 2.

Suggested use: the default value is expected to fit most cases. However, if the CPU load at warmup is too high or warmup takes too long, there is a reason to try 1. The downside is that peak performance might be lower with that setting.

Accepts values from 0 to 3:

0 - minimal optimizations, lowest CPU consumption by Falcon (not recommended for production)

1 - reasonable optimizations and CPU time/warmup (good for production)

2 - aggressive optimizations, might expose high CPU utilization in some cases (default)

3 - turns on very aggressive optimizations known to cause long compilations and high CPU load at warmup (not recommended for production)

-XX:[+/-]FalconPreserveBoxingIdentity

Disables aggressive optimization of boxing types (integer, double, etc.). Should only be used for applications which are found to rely on implementation defined behavior as opposed to the specified behavior of boxing routines.

The default value is false.

-XX:FalconGenerateProfilerInfo=int

Specifies the method inlining detail level for performance profiling output of compiled code. Setting a lower level may help to reduce compiled code size by a few percent.

Accepts values from 0 to 2:

0 - no method inlining information is generated

1 - stack of inlined methods is generated only (default)

2 - stack of inlined methods with bytecode indices (bci) is generated

-XX:[+/-]FalconCompensateForIntelMCUForErratumSKX102

Introduces a nop padding based mitigation for performance regressions seen on some systems following Intel’s micro code updates in response to errata SKX102.

This option is expected to become the default in a future Azul Zulu Prime JVM release.

If enabled, nop padding is used to align affected branches on systems with the micro code update applied.

The default value is false.

-XX:[+/-]ForceFalconCompensateForIntelMCUForErratumSKX102

Forces generation of nop padded code on unaffected systems for performance validation.

The default value is false.

-XX:[+/-]FalconOptBoxing

Enables the optimization to eliminate redundant boxing conversions.

The default value is true.

-XX:[+/-]FalconLockCoarsenOverLoop

Enables a lock coarsening optimization for loops where the lock over a loop is coarsened. This is done by chunking the loop and coarsening the lock over the chunked loop. The default value is true.

-XX:[+/-]FalconEnableAggressiveLockOpt

Enables loop chunking by chunk size of 32 and performs lock coarsening over the loop. Additionally enables lock coarsening over memory operations with monitor exit when valid to do so. The default value is true.

NOTE: The Falcon compiler is available for Java 7, Java 8, Java 11, Java 13, and Java 15. An attempt to use the -XX:+UseFalcon option for Java 6 will cause a failure.

ReadyNow! Options

Below are the ReadyNow!-specifc command-line options:

Option Description Default

uintx ProfileLogMaxSize

Specifies the maximum size that a ReadyNow! profile log is allowed to reach. Profiles will be truncated at this size, regardless of whether the application has actually been completely warmed up. It is recommended to either not set this size explicitly, or set it generously if required, for example:

-XX:ProfileLogMaxSize=1G

0

uintx ProfileLogTimeLimitSeconds

Instructs ReadyNow! to stop adding to the profile log after a period of N seconds regardless of where the application has been completely warmed up. It is recommended to either not set this size explicitly, or set it generously if required.

0

Tick Profiler Options

The Tick Profiler provides information to allow calculation of how processor resources are used for an interval of recorded time. Below is the Tick Profiler-specifc command-line option:

Option Description Default

-XX:[+/-]UseTickProfiler

Enables and disables profiling of processor core time spent between various software execution units (for example, threads, methods, and run-time tasks).

Due to known issues with version 3.10 and earlier Linux kernels, including those used in RHEL 7.x and CentOS 7.x, using +UseTickProfiler in production should be done with caution, as potential hangs may result under heavy loads.

false

Out-of-Memory Options

Out-of-Memory command-line options let the JVM handle out-of-memory occurrences:

Option Description Default

-XX:[+/-]ExitOnOutOfMemoryError

Enables the JVM exit on the first occurrence of an out-of-memory error. Useful if you prefer restarting an instance of the JVM to handling out of memory errors.

false

-XX:[+/-]CrashOnOutOfMemoryError

Enables the JVM crash and produce text and binary crash files when an out-of-memory error occurs.

false

Flight Recorder Options

Flight Recorder command-line options gather and register events that help to understand the behavior of a Java Application and Azul Zulu Prime JVM:

Option Description Default

-XX:[+/-]FlightRecorder

The Java Flight Recorder (JFR) is always available in Azul Zulu Prime JVM, this flag is not needed to use JFR.

This flag is useful only to prevent JFR from being activated by users or from within an application. That can be achieved by adding -XX:-FlightRecorder to the command line. It gives no performance benefit.

See Using Java Flight Recorder for details.

false

JFR remains available until -XX:-FlightRecorder is set

-XX:StartFlightRecording

Starts a flight recording from the command line with recording parameters provided as a value for this option.

For example, -XX:StartFlightRecording=filename=myrecording.jfr starts a recording in the file system while -XX:StartFlightRecording=disk=false,filename=myrecording.jfr starts an in-memory recording. In both cases the result is written to the myrecording.jfr file at the end of the JVM session. For the description of additional Java Flight Recording (JFR) parameters refer to JFR resources available in the Internet.

null

-XX:FlightRecorderOptions

Specifes additional parameters to configure Java Flight Recorder (JFR). For the description of additional JFR parameters refer to JFR resources available in the Internet.

null

-XX:JFRDescribeLiveSetPercentage

Specifies the percentage amount of a live set to be described by recorded JFR events. To omit some minor events from the recording, change the value of this option to a smaller number, e.g., 90.

99

-XX:[+/-]UseTickProfilerAsJFRThreadSampler

Enables the Azul Zulu Prime JVM to use the Tick Profiler instead of the JFR Thread Sampler. When set to true, EventExecutionSample JFR events are generated from data provided by the Tick Profiler.

true

-XX:TickProfilerNotifierIntervalMillis

Controls the interval between consecutive polls for the new Tick Profiler samples to pass them to the JFR in-memory buffer. This option has an effect only when -XX:+UseTickProfilerAsJFRThreadSampler is specified.

200

Azul Zulu Prime JVM MXBean Options

Azul Zulu Prime JVM MXBean command-line options help monitor the Azul Zulu Prime JVM heap utilization:

Option Description Default

-XX:[+/-]ReportUsedAsCommitted

The MemoryMXBean.getHeapMemoryUsage() method of MXBeans API returns the value of the Committed memory equal to the amount of JVM heap memory guaranteed as available for running an application (see Understanding Heap Memory Management for details). To switch to the old behavior of the MXBeans interface that returned the value of the Committed memory equal to Used memory, change the value of this option to true.

false

-XX:[+/-]MimicG1GCMemoryManagerNames

Changes garbage collector names returned by GarbageCollectorMXBean from GPGC to G1. To define exact New and Old GC names use -XX:GPGCNewGCMemoryManagerName="GPGC New" and -XX:GPGCOldGCMemoryManagerName="GPGC Old" respectively. This option provides a workaround for applications that do not recognize GPGC names such as Logstash.

false

-XX:GPGCNewGCMemoryManagerName= <New collector name>

Sets the name returned by GarbageCollectorMXBean for the New generation collector.

GPGC New

-XX:GPGCOldGCMemoryManagerName= <Old collector name>

Sets the name returned by GarbageCollectorMXBean for the Old generation collector.

GPGC Old

-XX:[+/-]IncludeNonObjectHeapInReportedJavaHeap

Makes Java heap reporting APIs and Tools include "non-object" use.

false

-XX:[+/-]ReportConstantMaxPossibleHeapAsMaxJavaHeap

Lets APIs which report max heap capacity be aware of elasticity.

false