Java OpenJDK 11
This page describes the Optimization Pack for Java OpenJDK 11 JVM.
Metrics
Memory
Metric | Unit | Description |
---|---|---|
mem_used | bytes | The total amount of memory used |
requests_throughput | requests/s | The number of requests performed per second |
requests_response_time | milliseconds | The average request response time |
jvm_heap_size | bytes | The size of the JVM heap memory |
jvm_heap_used | bytes | The amount of heap memory used |
jvm_heap_util | percent | The utilization % of heap memory |
jvm_memory_used | bytes | The total amount of memory used across all the JVM memory pools |
jvm_memory_used_details | bytes | The total amount of memory used broken down by pool (e.g., code-cache, compressed-class-space) |
jvm_memory_buffer_pool_used | bytes | The total amount bytes used by buffers within the JVM buffer memory pool |
CPU
Metric | Unit | Description |
---|---|---|
cpu_util | percent | The average CPU utilization % across all the CPUs (i.e., how much time on average the CPUs are busy doing work) |
cpu_used | CPUs | The total amount of CPUs used |
Garbage Collection
Metric | Unit | Description |
---|---|---|
jvm_gc_time | percent | The % of wall clock time the JVM spent doing stop the world garbage collection activities |
jvm_gc_time_details | percent | The % of wall clock time the JVM spent doing stop the world garbage collection activities broken down by type of garbage collection algorithm (e.g., ParNew) |
jvm_gc_count | collections/s | The total number of stop the world JVM garbage collections that have occurred per second |
jvm_gc_count_details | collections/s | The total number of stop the world JVM garbage collections that have occurred per second, broken down by type of garbage collection algorithm (e.g., G1, CMS) |
jvm_gc_duration | seconds | The average duration of a stop the world JVM garbage collection |
jvm_gc_duration_details | seconds | The average duration of a stop the world JVM garbage collection broken down by type of garbage collection algorithm (e.g., G1, CMS) |
Other metrics
Metric | Unit | Description |
---|---|---|
jvm_threads_current | threads | The total number of active threads within the JVM |
jvm_threads_deadlocked | threads | The total number of deadlocked threads within the JVM |
jvm_compilation_time | milliseconds | The total time spent by the JVM JIT compiler compiling bytecode |
Parameters
Memory
Name | Type | Unit | Dafault | Domain | Restart | Description |
---|---|---|---|---|---|---|
jvm_minHeapSize | integer | megabytes | You should select your own default value. | You should select your own domain. | yes | The inimum heap size. |
jvm_maxHeapSize | integer | megabytes | You should select your own default value. | You should select your own domain. | yes | The maximum heap size. |
jvm_maxRAM | integer | megabytes | You should select your own default value. | You should select your own domain. | yes | The maximum amount of memory used by the JVM. |
jvm_initialRAMPercentage | real | percent |
|
| yes | The initial percentage of memory used by the JVM. |
jvm_maxRAMPercentage | real | percent |
|
| yes | The percentage of memory used for maximum heap size. Requires Java 10, Java 8 Update 191 or later. |
jvm_alwaysPreTouch | categorical |
|
|
| yes | Pretouch pages during initialization. |
jvm_metaspaceSize | integer | megabytes |
| You should select your own domain. | yes | The initial size of the allocated class metadata space. |
jvm_maxMetaspaceSize | integer | megabytes |
| You should select your own domain. | yes | The maximum size of the allocated class metadata space. |
jvm_useTransparentHugePages | categorical |
|
|
| yes | Enables the use of large pages that can dynamically grow or shrink. |
jvm_allocatePrefetchInstr | integer |
|
|
| yes | Prefetch ahead of the allocation pointer. |
jvm_allocatePrefetchDistance | integer | bytes |
|
| yes | Distance to prefetch ahead of allocation pointer. -1 use system-specific value (automatically determined). |
jvm_allocatePrefetchLines | integer | lines |
|
| yes | The number of lines to prefetch ahead of array allocation pointer. |
jvm_allocatePrefetchStyle | integer |
|
|
| yes | Selects the prefetch instruction to generate. |
jvm_useLargePages | categorical |
|
|
| yes | Enable the use of large page memory. |
jvm_aggressiveHeap | categorical |
|
| yes | Optimize heap options for long-running memory intensive apps. |
Garbage Collection
Name | Type | Unit | Default | Domain | Restart | Description |
---|---|---|---|---|---|---|
jvm_newSize | integer | megabytes | You should select your own default value. | You should select your own domain. | yes | Sets the initial and maximum size of the heap for the young generation (nursery). |
jvm_maxNewSize | integer | megabytes | You should select your own default value. | You should select your own domain. | yes | Specifies the upper bound for the young generation size. |
jvm_survivorRatio | integer |
|
|
| yes | The ratio between the Eden and each Survivor-space within the JVM. For example, a jvm_survivorRatio would mean that the Eden-space is 6 times one Survivor-space. |
jvm_useAdaptiveSizePolicy | categorical |
|
|
| yes | Enable adaptive generation sizing. Disable coupled with jvm_targetSurvivorRatio. |
jvm_adaptiveSizePolicyWeight | integer | percent |
|
| yes | The weighting given to the current Garbage Collection time versus previous GC times when checking the timing goal. |
jvm_targetSurvivorRatio | integer |
|
|
| yes | The desired percentage of Survivor-space used after young garbage collection. |
jvm_minHeapFreeRatio | integer | percent |
|
| yes | The minimum percentage of heap free after garbage collection to avoid shrinking. |
jvm_maxHeapFreeRatio | integer | percent |
|
| yes | The maximum percentage of heap free after garbage collection to avoid shrinking. |
jvm_maxTenuringThreshold | integer |
|
|
| yes | The maximum value for the tenuring threshold. |
jvm_gcType | categorical |
|
|
| yes | Type of the garbage collection algorithm. |
jvm_useParallelOldGC | categorical |
|
|
| yes | Enables Parallel Mark and Compact Garbage Collection in Old/Tenured generations. |
jvm_concurrentGCThreads | integer | threads | You should select your own default value. | You should select your own domain. | yes | The number of threads concurrent garbage collection will use. |
jvm_parallelGCThreads | integer | threads | You should select your own default value. | You should select your own domain. | yes | The number of threads garbage collection will use for parallel phases. |
jvm_maxGCPauseMillis | integer | milliseconds |
|
| yes | Adaptive size policy maximum GC pause time goal in millisecond. |
jvm_resizePLAB | categorical |
|
|
| yes | Enables the dynamic resizing of promotion LABs. |
jvm_GCTimeRatio | integer |
|
|
| yes | The target fraction of time that can be spent in garbage collection before increasing the heap, computet as 1 / (1 + GCTimeRatio). |
jvm_initiatingHeapOccupancyPercent | integer |
|
|
| yes | Sets the percentage of the heap occupancy at which to start a concurrent GC cycle. |
jvm_youngGenerationSizeIncrement | integer | percent |
|
| yes | The increment size for Young Generation adaptive resizing. |
jvm_tenuredGenerationSizeIncrement | integer | percent |
|
| yes | The increment size for Old/Tenured Generation adaptive resizing. |
jvm_adaptiveSizeDecrementScaleFactor | integer | percent |
|
| yes | Specifies the scale factor for goal-driven generation resizing. |
jvm_CMSTriggerRatio | integer |
|
|
| yes | The percentage of MinHeapFreeRatio allocated before CMS GC starts |
jvm_CMSInitiatingOccupancyFraction | integer |
|
|
| yes | Configure oldgen occupancy fraction threshold for CMS GC. Negative values default to CMSTriggerRatio. |
jvm_CMSClassUnloadingEnabled | categorical |
|
|
| yes | Enables class unloading when using CMS. |
jvm_useCMSInitiatingOccupancyOnly | categorical |
|
|
| yes | Use of the occupancy value as the only criterion for initiating the CMS collector. |
jvm_G1HeapRegionSize | integer | megabytes |
|
| yes | Sets the size of the regions for G1. |
jvm_G1ReservePercent | integer |
|
|
| yes | Sets the percentage of the heap that is reserved as a false ceiling to reduce the possibility of promotion failure for the G1 collector. |
jvm_G1NewSizePercent | integer |
|
|
| yes | Sets the percentage of the heap to use as the minimum for the young generation size. |
jvm_G1MaxNewSizePercent | integer |
|
|
| yes | Sets the percentage of the heap size to use as the maximum for young generation size. |
jvm_G1MixedGCLiveThresholdPercent | integer |
|
|
| yes | Sets the occupancy threshold for an old region to be included in a mixed garbage collection cycle. |
jvm_G1HeapWastePercent | integer |
|
|
| yes | The maximum percentage of the reclaimable heap before starting mixed GC. |
jvm_G1MixedGCCountTarget | integer | collections |
|
| yes | Sets the target number of mixed garbage collections after a marking cycle to collect old regions with at most |
jvm_G1OldCSetRegionThresholdPercent | integer |
|
|
| yes | The upper limit on the number of old regions to be collected during mixed GC. |
jvm_G1AdaptiveIHOPNumInitialSamples | integer |
|
| yes | The number of completed time periods from initial mark to first mixed GC required to use the input values for prediction of the optimal occupancy to start marking. | |
jvm_G1UseAdaptiveIHOP | categorical |
|
| yes | Adaptively adjust the initiating heap occupancy from the initial value of |
Compilation
Name | Type | Unit | Default | Domain | Restart | Description |
---|---|---|---|---|---|---|
jvm_reservedCodeCacheSize | integer | megabytes |
|
| yes | The maximum size of the compiled code cache pool. |
jvm_tieredCompilation | categorical |
|
|
| yes | The type of the garbage collection algorithm. |
jvm_tieredCompilationStopAtLevel | integer |
|
|
| yes | Overrides the number of detected CPUs that the VM will use to calculate the size of thread pools. |
jvm_compilationThreads | integer | threads | You should select your own default value. | You should select your own domain. | yes | The number of compilation threads. |
jvm_backgroundCompilation | categorical |
|
|
| yes | Allow async interpreted execution of a method while it is being compiled. |
jvm_inline | categorical |
|
|
| yes | Enable inlining. |
jvm_maxInlineSize | integer | bytes |
|
| yes | The bytecode size limit (in bytes) of the inlined methods. |
jvm_inlineSmallCode | integer | bytes |
|
| yes | The maximum compiled code size limit (in bytes) of the inlined methods. |
Other parameters
Name | Type | Unit | Default | Domain | Restart | Description |
---|---|---|---|---|---|---|
jvm_aggressiveOpts | categorical |
|
|
| yes | Turn on point performance compiler optimizations. |
jvm_usePerfData | categorical |
|
|
| yes | Enable monitoring of performance data. |
jvm_useNUMA | categorical |
|
|
| yes | Enable NUMA. |
jvm_useBiasedLocking | categorical |
|
|
| yes | Manage the use of biased locking. |
jvm_activeProcessorCount | integer | CPUs |
|
| yes | Overrides the number of detected CPUs that the VM will use to calculate the size of thread pools. |
Domains
The following parameters require their ranges or default values to be updated according to the described rules:
Parameter | Default value | Domain |
jvm_minHeapSize |
| Depends on the instance available memory |
jvm_maxHeapSize |
| Depends on the instance available memory |
jvm_newSize |
| Depends on the configured heap |
jvm_maxNewSize |
| Depends on the configured heap |
jvm_concurrentGCThreads | Depends on the available CPU cores | Depends on the available CPU cores |
jvm_parallelGCThreads | Depends on the available CPU cores | Depends on the available CPU cores |
jvm_compilation_threads | Depends on the available CPU cores | Depends on the available CPU cores |
Constraints
The following tables show a list of constraints that may be required in the definition of the study, depending on the tuned parameters:
Formula | Notes |
---|---|
jvm.jvm_minHeapSize <= jvm.jvm_maxHeapSize |
|
jvm.jvm_minHeapFreeRatio <= jvm.jvm_maxHeapFreeRatio |
|
jvm.jvm_maxNewSize < jvm.jvm_maxHeapSize * 0.8 |
|
jvm.jvm_concurrentGCThreads <= jvm.jvm_parallelGCThreads | |
jvm_activeProcessorCount < container.cpu_limits + 1 |
Last updated