Hitachi

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


9.2.3 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. If you are using a hardware load balancer, then block it.

    For more information about blocking, refer to the hardware load balancer manual.

    If the performance tracer, server instance, and web server are not stopped, go to step 2.

    If the performance tracer, server instance, and web server are already stopped, omit steps 1 to 5.

  2. To stop all performance tracers, server instances, and web servers at the same time, execute the stop-servers subcommand of the asadmin utility command.

    asadmin stop-servers

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

    Command stop-servers executed successfully.
  3. To display a list of performance tracers, run the list-prfs subcommand of the asadmin utility command.

    asadmin list-prfs

    When this command is run, the result is displayed as follows. Ensure that the statuses of the performance tracers are not running.

    performance_tracer_name not running
    Command list-prfs executed successfully.
  4. To display a list of server instances, run the list-instances subcommand of the asadmin utility command with the --long option specified.

    asadmin list-instances --long=true

    When this command is run, the result is displayed as follows. Ensure that the statuses of the server instances are not running.

    server_instance_name host_name port_number process_ID cluster_name not running
    Command list-instances executed successfully.
    
    • cluster_name is displayed only for cluster configurations that contain multiple Java EE servers.

  5. To display a list of web servers, run the list-webservers subcommand of the asadmin utility command.

    asadmin list-webservers

    When this command is run, the result is displayed as follows. Ensure that the statuses of the web servers are not running.

    web_server_name not running
    Command list-webservers executed successfully.
  6. To display a list of 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_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.

  7. When you change a Java VM option from the options listed in step 6, 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.

  8. 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_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.

    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.

  9. 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 8 has changed.

  10. 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
  11. When you change a Java VM option from the options listed in step 10, 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.

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

    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.

  13. 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 12 has changed.

  14. To specify the options (except Java memory-related options) for the server instance and DAS, repeat steps 6 to 13.

    If you are finished making changes, go to step 15.

    If you want to change the following environment definitions, define each environment setting without starting the servers that configure Application Server.

    • Application Server settings

    • Web server settings

    • Environment variables to be applied to the processing of the asadmin utility command

  15. To start Application Server at once, run the start-servers subcommand of the asadmin utility command.

    asadmin start-servers

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

    Command start-servers executed successfully.
  16. To display a list of performance tracers, run the list-prfs subcommand of the asadmin utility command.

    asadmin list-prfs

    When this command is run, the result is displayed as follows. Ensure that the statuses of the performance tracers are running.

    performance_tracer_name running
    Command list-prfs executed successfully.
  17. To display a list of server instances, run the list-instances subcommand of the asadmin utility command with the --long option specified.

    asadmin list-instances --long=true

    When this command is run, the result is displayed as follows. Ensure that the statuses of the server instances are running.

    server_instance_name host_name port_number process_ID cluster_name running
    Command list-instances executed successfully.
    
    • cluster_name is displayed only for cluster configurations that contain multiple Java EE servers.

  18. To display a list of web servers, run the list-webservers subcommand of the asadmin utility command.

    asadmin list-webservers

    When this command is run, the result is displayed as follows. Ensure that the statuses of the web servers are running.

    web_server_name   running
    Command list-webservers executed successfully.
  19. If you are using a hardware load balancer, unblock it.

    For more information about unblocking, refer to the hardware load balancer manual.