IBM Support

Verbose Garbage Collection default setting changes after 9.0.0.3

Flash (Alert)


Abstract

Starting with WebSphere Application Server 9.0.0.3 (Distributed) and 9.0.0.4 (z/OS), VerboseGC will be enabled by default for Deployment Managers, Node Agents, and Application Servers.

Content

Changes to the default Verbose Garbage Collection (verboseGC) settings were introduced in WebSphere Application Server fix packs 9.0.0.3 for the Distributed and 9.0.0.4 for z/OS platforms.

For Distributed: Starting in 9.0.0.3 verboseGC is enabled by default on Deployment Managers, Node Agents, and Application Servers. When enabled, verboseGC output will collect up to 10 sequential, rotating (i.e. rolling) "verbosegc" logs which cumulatively consume about 100M (or more) of file space per server process.

For z/OS: Starting in 9.0.0.4 verboseGC is enabled by default on Deployment Managers, Node Agents, and Application Servers. When enabled, verboseGC output will collect in the JES job logs in the same manner as previous releases.

Differences from previous releases:

  • Verbose GC was disabled by default for all server types.
  • On distributed platforms, when verboseGC was enabled the output went to the native process logs. Now it will go to separate log files.

Note: If you want to disable verboseGC or override the default verboseGC logging behavior, jump to section Changing verboseGC settings.



Verbose Garbage Collection: Background Information

Verbose garbage collection (verboseGC) is a setting in the Java Virtual Machine configuration of a WebSphere server type, such as a Deployment Manager or Application Server, which controls whether a server JVM will log Garbage Collector diagnostic data in a manner specific to WebSphere Application Server.

Garbage Collector diagnostic data is critical to troubleshooting memory and performance problems, and the overhead is generally very low. In fix packs 9.0.0.3 (Distributed) and 9.0.0.4 (z/OS) WebSphere Application Server enables verboseGC by default to ensure diagnostic data is available whenever such problems occur. On 9.0.0.3 (Distributed) it redirects diagnostic data to rolling logs to reduce the risk that native process logs exhaust the available file space.

Java Garbage Collector diagnostics are ultimately controlled by Garbage Collector command-line options and dump agent tokens:

When launching a server JVM for which verboseGC is enabled, WebSphere Application Server supplies the following Java command-line options to control Garbage Collector diagnostics.

For Distributed pre-9.0.0.3:

-verbose:gc

For Distributed 9.0.0.3 and beyond:


On Windows, Linux, AIX:

-verbose:gc
-Xverbosegclog:${SERVER_LOG_ROOT}\verbosegc.%seq.log,10,7000

On Solaris, HP-UX:

-verbose:gc
-Xloggc:${SERVER_LOG_ROOT}/verbosegc.log
-XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=10
-XX:GCLogFileSize=10M
-XX:+PrintGCDateStamps
-XX:+PrintGCDetails

These options direct the JVM to write Garbage Collector diagnostic data to no more than 10 sequential, rotating "verbosegc" log files, each of which consumes about 10M (or more) of file space. The verbosegc logs are created in the ${SERVER_LOG_ROOT} directory along with the server’s system, native process, and trace logs. Notice the options specify 7000 garbage collection events per file on Windows, Linux, and AIX. Because the size of the events will vary, the amount of file space consumed on these operating systems will also vary.

For z/OS pre-9.0.0.4:

-verbose:gc

For z/OS 9.0.0.4 and beyond:

-verbose:gc

This option directs the JVM to write verbose garbage collection diagnostic data to the native process stream, which collects in the JES job logs by default.


Changing verboseGC settings

The new default enablement or logging behavior of verboseGC may be unsuitable for some deployments. The following sections describe how to disable verboseGC and how to override the default verboseGC logging behavior, including how to revert to the pre-9.0.0.3 verboseGC logging behavior on Distributed platforms.


Disabling verboseGC
Enabling pre-9.0 verboseGC logging
Enabling custom verboseGC logging


Disabling verboseGC
Perform the following tasks to disable verboseGC.

  1. In the Administrative Console, select the target server to configure.

    For Application Servers

    Servers > Server Types > WebSphere application servers
    Select the server you want to work with, e.g. server1

    For Node Agents

    System Administration > Node Agents
    Select the Node agent you want to work with

    For Deployment Managers

    System Administration > Deployment Manager

  2. On the Configuration tab, under Server Infrastructure, expand Java and Process Management, and click Process Definition.

  3. For z/OS: The following tasks must be performed for each of the regions (Control, Servant, and Adjunct) as applicable to each Application Server, Node Agent, and Deployment Manager.

  4. Under the Additional Properties section, click Java Virtual Machine.

  5. Uncheck the Verbose garbage collection check box.

  6. Ensure the Generic JVM Arguments field does not contain any JVM options that control Garbage Collector diagnostics.

  7. Apply and Save the changes.

    VerboseGC is now disabled in the target server configuration.

  8. Restart the target servers for the changes to take effect.


Enabling pre-9.0 verboseGC logging
Perform the following tasks to enable pre-9.0 verboseGC logging.

For z/OS: The procedure to enable pre-9.0 verboseGC logging behavior does not apply. Version 9.0 does not introduce a change in verboseGC logging behavior.

  1. In the Administrative Console, select the target server to configure.

    For Application Servers

    Servers > Server Types > WebSphere application servers
    Select the server you want to work with, e.g. server1

    For Node Agents

    System Administration > Node Agents
    Select the Node agent you want to work with

    For Deployment Managers

    System Administration > Deployment Manager

  2. On the Configuration tab, under Server Infrastructure, expand Java and Process Management, and click Process Definition.

  3. Under the Additional Properties section, click Java Virtual Machine.

  4. Uncheck the Verbose garbage collection check box.

  5. In the Generic JVM Arguments field, add the standard JVM option -verbose:gc.

  6. Ensure the Generic JVM Arguments field does not contain any JVM options that control Garbage Collector diagnostics.

  7. Apply and Save the changes.

    The default VerboseGC configuration is now overridden to write Garbage Collector diagnostic data to the native process streams in the same manner as releases prior to 9.0.0.3.

  8. Restart the target server for the changes to take effect.


Enabling custom verboseGC logging
Perform the following tasks to enable custom verboseGC logging.

  1. In the Administrative Console, select the target server to configure.

    For Application Servers

    Servers > Server Types > WebSphere application servers
    Select the server you want to work with, e.g. server1

    For Node Agents

    System Administration > Node Agents
    Select the Node agent you want to work with

    For Deployment Managers

    System Administration > Deployment Manager

  2. On the Configuration tab, under Server Infrastructure, expand Java and Process Management, and click Process Definition.

  3. For z/OS: The following tasks must be performed for each of the regions (Control, Servant, and Adjunct) as applicable to each Application Server, Node Agent, and Deployment Manager.

  4. Under the Additional Properties section, click Java Virtual Machine.

  5. Uncheck the Verbose garbage collection check box.

  6. In the Generic JVM Arguments field, enter the non-standard JVM command-line options that enable the desired Garbage Collector data logging behavior.

    For z/OS: For example, enter the following string to enable Garbage Collector data to write to 10 sequential, rotating "verbosegc" log files, each of which consumes about 10M (or more) of file space on the Configuration File System.

    -Xverbosegclog:${SERVER_LOG_ROOT}/verbosegc.%job.%jobid.%seq.log,10,7000

    Notice the dump agent tokens %job and %jobid. These tokens resolve to the z/OS job name and job ID, which add context to the file names necessary to identify the server process. Here’s an example of a log name when the above option is configured on a Deployment Manager.

    WAS_HOME/profiles/default/logs/dmgr/verbosegc.BBODMGRS.STC00114.001.log

  7. Apply and Save the changes.

    The default verboseGC configuration is now overridden to log Garbage Collector diagnostics according to the non-standard JVM options.

  8. Restart the target server for the changes to take effect.


References
  1. Enabling verbose garbage collection (verboseGC) in WebSphere Application Server (Distributed platforms)
  2. Writing Verbose GC to a Specified Log -Xverbosegclog in AIX, Linux and Windows
  3. Writing Verbose GC to a Specified Log in Solaris and HP-UX
  4. IBM SDK Java Technology Edition, Version 8 - Summary of diagnostic information
  5. IBM SDK Java Technology Edition, Version 8 - Garbage Collector diagnostic data
  6. IBM SDK Java Technology Edition, Version 8 - Verbose garbage collection logging
  7. IBM SDK Java Technology Edition, Version 8 – Garbage Collector command-line options
  8. IBM SDK Java Technology Edition, Version 8 - Dump agent tokens
  9. IV74107: Java TDUMPS on z/OS are not uniquely named

Related information

A Japanese translation is available

Document information

More support for: WebSphere Application Server

Software version: 9.0

Operating system(s): Platform Independent

Reference #: 1998741

Modified date: 24 July 2017


Translate this page: