16.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.

Table 16-11 Java HotSpot VM options that can be specified when add.jvm.arg is specified

Option nameContentsSpecifiable valueVR
-DpropertySpecifies 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-typeOutputs the information specified in information-type. The following values can be specified in information-type:
class:
Outputs the class-related information whenever a class is loaded.
gc:
Reports whenever a garbage collection event occurs.
jni:
Reports the information related to usage of the native method and other Java Native Interface (JNI) activities.
The following strings can be specified:
  • class
  • gc
  • jni
05-00
-Xloggc:fileAlike -verbose:gc, the garbage collection 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 garbage collection event is added at the beginning of each reported event.The input is not limited.05-00
-XmssizeSets up the initial size of Java heap.Specify a natural number using the following units:
  • Kilo "k"
  • Mega "m"
  • Giga "g"
  • Tera "t"
Note that the value is not case sensitive.
05-00
-XmxsizeSets up the maximum size of the Java heap.Specify a natural number using the following units:
  • Kilo "k"
  • Mega "m"
  • Giga "g"
  • Tera "t"
Note that the value is not case sensitive.
05-00
-XmnsizeSets up the initial value and maximum value of the New area.Specify a natural number using the following units:
  • Kilo "k"
  • Mega "m"
  • Giga "g"
  • Tera "t"
Note that the value is not case sensitive.
05-00
-XsssizeSets up the maximum size of one stack area.Specify a natural number using the following units:
  • Kilo "k"
  • Mega "m"
  • Giga "g"
  • Tera "t"
Note that the value is not case sensitive.
05-00
-XprofWhen 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
-XrunlibraryNameSpecifies the library containing agents such as JVMPI and JVMDI, and the option strings passed at start up.The input is not limited.05-00
-XdebugWhen 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=valueSpecifies 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 [Figure] size-of-Tenured-free-area, the full garbage collection occurs. Note that the full garbage collection occurs frequently if 1 is specified for this option.
Specify a natural number value.05-00
-XX:PermSize=sizeSpecifies the initial size of Permanent area.Specify a natural number using the following units:
  • Kilo "k"
  • Mega "m"
  • Giga "g"
  • Tera "t"
Note that the value is not case sensitive.
05-00
-XX:MaxPermSize=sizeSpecifies the maximum size for the Permanent area.Specify a natural number using the following units:
  • Kilo "k"
  • Mega "m"
  • Giga "g"
  • Tera "t"
Note that the value is not case sensitive.
05-00
-XX:SurvivorRatio=valueSpecifies 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:[+|-]PrintTenuringDistribution
-XX:+PrintTenuringDistribution
Outputs the age distribution for the objects in Survivor area when copy garbage collection is executed.
-XX:-PrintTenuringDistribution
Does not output the age distribution for the objects in Survivor area when copy garbage collection is executed.
The following characters can be specified:
  • Plus '+'
  • Minus '-'
05-00
-XX:TargetSurvivorRatio=valueSpecifies the target value (0 to 100 (unit: %)) for the ratio occupied by the Java objects in New::Survivor area after garbage collection is executed.Specify a natural number value.05-00
-XX:MaxTenuringThreshold=valueSpecifies the threshold value for the number of times a Java object is replaced in the From space and To space when copy garbage collection 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
-XrunhndlwrapSpecifies 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:hndlwrap2Specifies 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#1
-XX:+UseSerialGC
Serial copy garbage collection is executed.
-XX:-UseSerialGC
Serial copy garbage collection is not executed.
The following characters can be specified:
  • Plus '+'
  • Minus '-'
08-70
-XX:[+|-]UseParNewGC#1
-XX:+UseParNewGC
Parallel copy garbage collection is executed.
-XX:-UseParNewGC
Parallel copy garbage collection is not executed.
However, when both the following conditions are satisfied, the specified -XX:+UseParNewGC option is disabled, and the processing is handled in the same manner as when the -XX:+UseSerialGC option is specified:
  • The -XX:ParallelGCThreads option is not explicitly specified.
  • The number of CPUs in the execution environment is 1.
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:
  • Plus '+'
  • Minus '-'
08-70#2
-XX:ParallelGCThreadsSpecifies the number of threads that will execute copy garbage collection in parallel. This option is enabled when -XX:+UseParNewGC 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 JavaVM starts, the number of garbage collection threads specified in this option are created and the processing is executed.
The default values used when this option is omitted are as follows:
  • If the logical CPU count in the execution environment is 8 or less, the CPU count becomes the default value.
  • If the logical CPU count in the execution environment is 9 or more, the default value is "8+(CPU-count-8) (58)" (rounded off after the decimal point).
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 you specify 0 in this option, a serial copy garbage collection is executed.
Note the following when you specify a value:
  • If you specify 1, parallel execution is performed in one thread, so the execution performance declines.
  • If you specify a value exceeding the number of threads that can be created in the execution environment, JavaVM cannot start because the creation of garbage collection threads fail when JavaVM starts.
  • If you specify a value outside the valid range, a message is output to the standard output and JavaVM terminates with the return code 1.
Specify a natural number value.08-70
Legend:
-: Not applicable.
#1
If both the -XX:+UseSerialGC and the -XX:+UseParNewGC options are specified, the process fails to start.
#2
You can specify the -XX:+UseParNewGC option only in the JDK version 6.

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 garbage collector
    You can select the serial garbage collector (UseSerialGC) and the parallel garbage collector (UseParNewGC) as the Application Server garbage collectors. Do not specify both the garbage collectors concurrently. The Java processes cannot start if both the garbage collectors are specified concurrently.
  • Parallelism of the parallel garbage collector
    With the parallel garbage collector, you can specify the garbage collector parallelism in the ParallelGCThreads option. Do not specify 0 or 1 in this option. If you specify 0, the garbage collector automatically changes to the serial garbage collector. If you specify 1, the parallel garbage collector operates, but parallel execution is performed with one thread, so performance improvement cannot be expected.
  • Consumption of Java heap by the parallel garbage collector
    To execute the parallel processing for a copy garbage collection at a high speed, the parallel garbage collector creates a thread-specific heap area in the Java heap. Therefore, more Java heap is consumed as compared to a serial garbage collection. As a result, the transfer of an object to the Tenured area and the occurrence of a full garbage collection might be accelerated. Note that the amount of Java heap consumed depends on the processing of the Java application.
Hint
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 16-12 References for the default values of the Java HotSpot VM options for each server and application

Server and application usedReference
J2EE server2.3 usrconf.cfg (Option definition file for J2EE servers)
Batch server3.2 usrconf.cfg (Option definition file for batch servers)
Web Container Server (Compatibility function)3.11.2 usrconf.cfg (Option definition file for Web Container Server) in the manual Cosminexus Application Server Function Guide - Compatibility.
Java applications started with the cjclstartap command14.2 usrconf.cfg (Option definition file for Java applications)
Other Java applications16.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'.