14.5 Java HotSpot VM options that can be specified in Cosminexus
This section describes the Java HotSpot VM options that can be specified in add.jvm.arg and the precautions to be taken when you specify the options.
The following table describes the Java HotSpot VM options that can be specified in add.jvm.arg. Note that VR is the version of the Application Server in which parameters are introduced or changed.
Option name |
Contents |
Specifiable value |
VR |
---|---|---|---|
-Dproperty |
Specifies the JavaVM system properties. |
The input is not limited. |
05-00 |
-agentlib:libname[=options] |
Loads the native agent library libname. |
The input is not limited. |
08-00 |
-verbose:information-type |
Outputs the information specified in information-type. The following values can be specified in information-type:
|
The following strings can be specified:
|
05-00 |
-Xloggc:file |
Alike -verbose:gc, the GC event is reported whenever the event occurs; however, that data is recorded in the file. Apart from the information reported when -verbose:gc is specified, the time (unit: seconds) elapsed from the first GC event is added at the beginning of each reported event. |
The input is not limited. |
05-00 |
-Xmssize |
Sets up the initial size of Java heap. |
Specify a natural number using the following units:
Note that the value is not case sensitive. |
05-00 |
-Xmxsize |
Sets up the maximum size of the Java heap. |
Specify a natural number using the following units:
Note that the value is not case sensitive. |
05-00 |
-Xmnsize |
Sets up the initial value and maximum value of the New area. |
Specify a natural number using the following units:
Note that the value is not case sensitive. |
05-00 |
-Xsssize |
Sets up the maximum size of one stack area. |
Specify a natural number using the following units:
Note that the value is not case sensitive. |
05-00 |
-Xprof |
When this option is specified, a profile of the running program is generated and the profiling data is output in standard output. This option is provided as the utility for developing programs. This option is not intended for use in a real system. |
-- |
05-00 |
-Xrunhprof[:suboption=value,...] |
Enables the profiling of the CPU, heap, or monitor. Specify a colon ':' behind -Xrunhprof and code '<suboption>=<value>'. You can specify multiple '<suboption>=<value>' separated with comma ','. To acquire the list of sub options and their default values, execute the command java-Xrunhprof:help. |
Specify any string. You cannot specify '=' and ',' in <suboption>. Also, you cannot specify ',' in <value>. |
05-00 |
-XrunlibraryName |
Specifies the library containing agents such as JVMPI and JVMDI, and the option strings passed at start up. |
The input is not limited. |
05-00 |
-Xdebug |
When this option is specified, JVMDI support is enabled and started. Hitachi does not recommend JVMDI. Also, this option is not used for debugging in J2SE 5.0. Therefore, this option is not required for debugging in J2SE 5.0. |
-- |
05-00 |
-XX:NewRatio=value |
Specifies the ratio of Tenured area to New area. If value is 2, the ratio of the New area and the Tenured area is 1:2. If size-of-New-area-being-used ≥ size-of-Tenured-free-area, the Full GC occurs. Note that the Full GC occurs frequently if 1 is specified for this option. |
Specify a natural number value. |
05-00 |
-XX:MetaspaceSize=size |
Specifies the initial size of Metaspace area. |
Specify a natural number using the following units:
Note that the value is not case sensitive. |
09-70 |
-XX:MaxMetaspaceSize=size |
Specifies the maximum size for the Metaspace area. |
Specify a natural number using the following units:
Note that the value is not case sensitive. |
09-70 |
-XX:CompressedClassSpaceSize |
Specifies the maximum size of the compressed class space. |
Specify a natural number using the following units:
Note that the value is not case sensitive. |
09-70 |
-XX:SurvivorRatio=value |
Specifies the ratio of New::Eden area to the From space and To space of New::Survivor area. If 8 is set in value, the ratio of the New::Eden area, From space and To space is 8:1:1. |
Specify a natural number value. |
05-00 |
-XX:TargetSurvivorRatio=value |
Specifies the target value (0 to 100 (unit: %)) for the ratio occupied by the Java objects in New::Survivor area after GC is executed. |
Specify a natural number value. |
05-00 |
-XX:MaxTenuringThreshold=value |
Specifies the threshold value for the number of times a Java object is replaced in the From space and To space when copy GC is executed. The Java objects to be replaced after the specified count is exceeded are moved to Tenured area. The valid range of this option is from 0 to the default value. If a value outside the range is specified, the function for moving to the Tenured area is disabled if exceeds the threshold value. |
Specify a natural number value. |
05-00 |
-Xrunhndlwrap |
Specifies whether to continue an execution of JavaVM, if you log off the Windows in an environment earlier than the JDK version 5. If -XX:+EagerXrunInit is specified, specification of this option is invalid or -agentlib:hndlwrap2. If -agentlib:hndlwrap2 is set, do not set this option. This option cannot be used concurrently with another JVMTI version program. If you log off Windows when a Java program using this option is being executed at the command prompt, an error popup stating 'Program is not responding' appears and you cannot log off. |
-- |
05-01 |
-agentlib:hndlwrap2 |
Specifies whether to continue an execution of JavaVM, if you log off the Windows is in an environment with JDK version 6. If -Xrunhndlwrap is set, do not set this option. This option cannot be used concurrently with other JVMTI version programs. If you log off Windows when a Java program using this option is being executed at the command prompt, an error popup stating 'Program is not responding' appears and you cannot log off. |
-- |
08-50 |
-XX:[+|-]UseSerialGC# |
|
The following characters can be specified:
|
08-70 |
-XX:[+|-]UseG1GC |
This option cannot be specified concurrently with the -XX:+HitachiUseExplicitMemory option. If specified, a message is output to the standard output and JavaVM terminates with the return code 1. |
The following characters can be specified:
|
09-60 |
-XX:ParallelGCThreads |
Specifies the number of threads with which to execute evacuation of G1 GC in parallel. This option is enabled when -XX:+UseG1GC is specified. Also, we recommend that you use the default value for this option. If you want to change the value, calculate the optimum value based on the value measured by actually operating JavaVM, and then change the value. When a Java VM starts, as many threads as the value specified for this option are created to perform evacuation processing. The default values used when this option is omitted are as follows:
For example, for 4 CPUs, the default value is 4 with ParallelGCThreads=4. Also, for 72 CPUs, the default value is 48 with ParallelGCThreads=8 + (72-8) × (5÷8)=48. If 0 is specified for this option, the default value is applied. Note the following when you specify a value:
|
Specify a natural number value. |
08-70 |
-XX:ConcGCThreads |
Specifies the number of threads that performs concurrent marking (CM) processing for G1 GC in parallel. This option takes effect if -XX:+UseG1GC is specified. We recommend that you use this option without changing the default value. When changing the value, calculate the optimal value based on measurement in actual Java VM operation. When a Java VM starts, as many threads as the value specified for this option are created to perform CM processing. The default value applied if this option is omitted is as follows:
Max(A,B) means whichever is larger, A or B. ParallelGCThreads indicates the value of -XX:ParallelGCThreads. If you specify 0 for this option, the default value is applied. When you specify this option, note the following points:
|
Specify a natural number value. |
09-60 |
-XX:MaxGCPauseMillis |
Specifies the target value of the time for which the application will stop during G1 GC. You can specify the value in milliseconds. This option takes effect if -XX:+UseG1GC is specified. If you specify 0 for this option, a message is output to the standard output and the Java VM fails to start. If you specify 100 or a smaller value for this option, we recommend that you use the asynchronous log file output functionality (by specifying -XX: +JavaLogAsynchronous). |
Specify a natural number value. |
09-60 |
-XX:ReservedCodeCacheSize |
Specifies the maximum size of the code cache area. |
Specify a natural number using the following units:
Note that the value is not case sensitive. |
09-50 |
Specification of the -XX:[+|-]UseSerialGC option |
Specification of the -XX:[+|-]UseG1GC option |
Processing performed |
---|---|---|
Not specified |
Not specified |
Serial GC is performed. |
-XX:+UseSerialGC |
-XX:+UseG1GC |
Process startup fails. |
-XX:+UseSerialGC |
-XX:-UseG1GC |
Serial GC is performed. (Same as the default behavior.) |
-XX:-UseSerialGC |
-XX:-UseG1GC |
|
-XX:-UseSerialGC |
-XX:+UseG1GC |
G1 GC is performed. |
- Important note
-
-
Debug or profiling option
The JavaVM options -Xprof and -Xdebug, and the JVMTI agents hprof and jdwp (specified using -agentlib:<libname>) are provided as the program development utilities. Do not specify these options with system operations.
-
Specifying the GC
For the type of GC that can be performed on application servers, you can select serial GC (UseSerialGC) or G1 GC (UseG1GC). Do not specify both these types of GC. If you specify both types, no Java process can start.
-
- Tip
-
The references for the default values of the Java HotSpot VM options differ for each server. The following table describes the references for the default values of the Java HotSpot VM options for each server and application:
Table 14‒13: References for the default values of the Java HotSpot VM options for each server and application Server and application used
Reference
J2EE server
Batch server
3.2.1 usrconf.cfg (Option definition file for batch servers)
Java applications started with the cjclstartap command
12.2.1 usrconf.cfg (Option definition file for Java applications)
Other Java applications
14.4 Default values of the Java HotSpot VM options that can be specified in Cosminexus
To specify Java HotSpot VM options in the Easy Setup definition file, you specify Java HotSpot VM options in 'Contents specified in param-value' that can be specified when add.jvm.arg is specified in 'Value specified in param-name'.