Hitachi

Hitachi Application Server V10 User's Guide (For Windows® Systems)


4.6.5 Changing Java VM options by using the create-jvm-options subcommand

Java VM options can be specified for a server instance and for the domain administration server (DAS). To change a Java VM option, which has already been specified, use the delete-jvm-options subcommand of the asadmin utility command to delete the existing Java VM option, and then use the create-jvm-options subcommand to specify a new Java VM option.

Prerequisites

Intended users

Procedure

  1. To display a list of Java VM options for all server instances in the cluster, run the list-jvm-options subcommand of the asadmin utility command.

    asadmin list-jvm-options --target server_instance_name_cluster_name
    • In a configuration where only one Java EE server is deployed, specify the server instance name for the --target option.

    • In a cluster configuration where more than one Java EE server is deployed, specify the cluster name for the --target option.

  2. When you change a Java VM option from the options listed in step 1, to delete the earlier option, run the delete-jvm-options subcommand of the asadmin utility command.

    asadmin delete-jvm-options --target server_instance_name_or_cluster_name 
    [option_name[=value][:option_name[=value]]...]
    • In a configuration where only one Java EE server is deployed, specify the server instance name for the --target option.

      In a cluster configuration where more than one Java EE server is deployed, specify the cluster name for the --target option.

    • When you specify multiple options, separate them with a colon (:).

    Important note

    If an option name or value contains symbols, the backslash (\) must be used as an escape character for the symbols in the name or value.

    For example, to specify -XX:MaxMetaspaceSize=192m, insert an escape character before the colon (:) by using a backslash (\), and specify the text as -XX\:MaxMetaspaceSize=192m.

    When this command is run, the result is displayed as follows:

    Deleted n option(s)
    Command delete-jvm-options executed successfully.

    n indicates the number of options that are specified.

  3. To specify a value for the Java memory, such as the Java heap for all the server instances, run the create-jvm-options subcommand of the asadmin utility command.

    asadmin create-jvm-options --target server_instance_name_cluster_name 
    [option_name[=value][:option_name[=value]]...]
    • In a configuration where only one Java EE server is deployed, specify the server instance name for the --target option.

      In a cluster configuration where more than one Java EE server is deployed, specify the cluster name for the --target option.

    • Some default values of the Java VM options differ from the values that are set for Java EE Server. The following table displays the difference between these values.

    Table 4‒1: Options for which the default Java VM values differ from the values set for the server instance

    Option name

    Values set for Java EE Server

    -XX:HitachiExplicitHeapMaxSize

    For Windows x86:

    Same as the default value of the option (-XX:HitachiExplicitHeapMaxSize).

    For Windows x64:

    -XX:HitachiExplicitHeapMaxSize=512m

    -XX:[+|-]HitachiUseExplicitMemory

    -XX:+HitachiUseExplicitMemory

    -XX:MaxMetaspaceSize

    For Windows x86:

    -XX:MaxMetaspaceSize=128m

    For Windows x64:

    -XX:MaxMetaspaceSize=256m

    -XX:MetaspaceSize

    For Windows x86:

    -XX:MetaspaceSize=128m

    For Windows x64:

    -XX:MetaspaceSize=256m

    -Xms

    For Windows x86:

    -Xms512m

    For Windows x64:

    -Xms1536m

    -Xmx

    For Windows x86:

    -Xmx512m

    For Windows x64:

    -Xmx1536m

    Important note
    • When you change the value of an option that has already been specified, use the delete-jvm-options subcommand to delete the earlier option. If the specified option is not deleted, then a warning is displayed informing you that the same option is registered multiple times. When this warning is displayed, verify the specified option using the list-jvm-options subcommand and then delete the options that are not required.

    • The DAS runs SystemGC every hour and a server instance runs SystemGC every 24 hours. Use the sun.rmi.dgc.server.gcInterval and sun.rmi.dgc.client.gcInterval system properties settings to change the execution-interval of the SystemGC process. If the occurrence of the GC processes do not reduce even when you extend the occurrence interval of FullGC by changing the values of these system properties, then the Java heap might be insufficient. In this case, you might be able to improve the occurrence interval of FullGC by tuning the Java heap.

    When this command is run, the result is displayed as follows:

    Created n option(s)
    Command create-jvm-options executed successfully.

    n indicates the number of options that are specified.

  4. To display a list of Java VM options for all server instances, run the list-jvm-options subcommand of the asadmin utility command.

    asadmin list-jvm-options --target server_instance_name_or_cluster_name
    • In a configuration where only one Java EE server is deployed, specify the server instance name for the --target option.

    • In a cluster configuration where more than one Java EE server is deployed, specify the cluster name for the --target option.

    Verify and confirm that the value of the option specified in step 3 has changed.

  5. To display a list of Java VM options for the domain administration server, run the list-jvm-options subcommand of the asadmin utility command.

    asadmin list-jvm-options
  6. When you change a Java VM option from the options listed in step 5, to delete the earlier option, run the delete-jvm-options subcommand of the asadmin utility command.

    asadmin delete-jvm-options [option_name[=value]
    [:option_name[=value]]...]

    When this command is run, the result is displayed as follows:

    Deleted n option(s)
    Command delete-jvm-options executed successfully.

    n indicates the number of options that are specified.

  7. To specify a value for the Java memory, such as the Java heap for the DAS, run the create-jvm-options subcommand of the asadmin utility command.

    asadmin create-jvm-options [option_name[=value]
    [:option_name[=value]]...]

    You can specify the value for option_name[= value], such as -Xms1024m -Xmx1024m.

    Some of the default values of the Java VM options, which differ from the values set for Java EE Server. The following table displays the difference between these values.

    Table 4‒2: Options for which the default Java VM values differ from the values set for the DAS

    Option name

    Values set for Java EE Server

    -XX:MaxMetaspaceSize

    -XX:MaxMetaspaceSize=192m

    -XX:MetaspaceSize

    -XX:MetaspaceSize=192m

    -Xms

    -Xms512m

    -Xmx

    -Xmx512m

    Important note

    Adjust the Java heap size of the DAS, based on the archive file size of the application that is deployed. Depending on the archive file size, the Java heap size of the DAS may be full and this may lead to insufficient memory.

    Additionally, when an inappropriate value (an extremely small or large value) is specified for the Java heap size of the DAS, then the DAS might not start and you might have to reconfigure the domain.

    To prevent a case where memory might be insufficient, it is recommended that you run the backup-domain command in advance to back up the domain.

    When this command is run, the result is displayed as follows:

    Created n option(s)
    Command create-jvm-options executed successfully.

    n indicates the number of options that are specified.

  8. To list the options of the Java VM options for DAS, run the list-jvm-options subcommand of the asadmin utility command.

    asadmin list-jvm-options

    Verify that the value of the option specified in step 7 has changed.

  9. To specify the options (except Java memory-related options) for the server instance and DAS, repeat steps 1 to 8.

    Some of the default values of the Java VM options, which differ from the values set for Java EE Server. The following table displays the difference between these values.

    Table 4‒3: Options for which the default Java VM values differ from the set values

    Classification

    Option name

    Values set for Java EE Server

    For the server instance

    -XX:HitachiExplicitMemoryJavaLog

    -XX:HitachiExplicitMemoryJavaLog:installation_directory_for_Java_EE Server\logs\nodes\node_name\server_instance_name\je_eheap_event

    -XX:HitachiExplicitMemoryLogLevel

    -XX:HitachiExplicitMemoryLogLevel:normal

    -XX:HitachiJavaLog

    -XX:HitachiJavaLog:installation_directory_for_Java_EE Server\logs\nodes\node_name\server_instance_name\je_javavm

    -XX:[+|-]HitachiOutOfMemoryCause

    -XX:+HitachiOutOfMemoryCause

    -XX:[+|-]HitachiOutOfMemorySize

    -XX:+HitachiOutOfMemorySize

    -XX:[+|-]HitachiTrueTypeInLocals

    -XX:+HitachiTrueTypeInLocals

    -Xhras

    -Xhras

    For the DAS

    -XX:HitachiJavaLog

    -XX:HitachiJavaLog:installation_directory_for_Java_EE Server\logs\domains\domain_name\das_javavm

    -XX:[+|-]HitachiOutOfMemoryCause

    -XX:+HitachiOutOfMemoryCause

    -XX:[+|-]HitachiOutOfMemorySize

    -XX:+HitachiOutOfMemorySize

    -XX:[+|-]HitachiTrueTypeInLocals

    -XX:+HitachiTrueTypeInLocals

    -Xhras

    -Xhras