Flashes (Alerts)
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:
- The standard Java command-line option -verbose:gc enables the JVM to write diagnostic data to stderr on z/OS, Windows, Linux, and AIX; and to stdout on Solaris and HP-UX.
- Non-standard (-X, -XX) Java command-line options, like -Xverbosegclog, enable custom logging behaviors, such as redirecting diagnostic data to log files.
- Dump agent tokens, like %seq, specified along with the non-standard options add contextual information to the log file names.
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,7000On 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
Perform the following tasks to disable verboseGC.
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
On the Configuration tab, under Server Infrastructure, expand Java and Process Management, and click Process Definition.
Under the Additional Properties section, click Java Virtual Machine.
Uncheck the Verbose garbage collection check box.
Ensure the Generic JVM Arguments field does not contain any JVM options that control Garbage Collector diagnostics.
Apply and Save the changes.
VerboseGC is now disabled in the target server configuration.
- Restart the target servers for the changes to take effect.
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.
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.
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
On the Configuration tab, under Server Infrastructure, expand Java and Process Management, and click Process Definition.
Under the Additional Properties section, click Java Virtual Machine.
Uncheck the Verbose garbage collection check box.
In the Generic JVM Arguments field, add the standard JVM option -verbose:gc.
Ensure the Generic JVM Arguments field does not contain any JVM options that control Garbage Collector diagnostics.
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.
- Restart the target server for the changes to take effect.
Enabling custom verboseGC logging
Perform the following tasks to enable custom verboseGC logging.
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
On the Configuration tab, under Server Infrastructure, expand Java and Process Management, and click Process Definition.
Under the Additional Properties section, click Java Virtual Machine.
Uncheck the Verbose garbage collection check box.
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,7000Notice 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.logApply and Save the changes.
The default verboseGC configuration is now overridden to log Garbage Collector diagnostics according to the non-standard JVM options.
- Restart the target server for the changes to take effect.
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.
| References |
- Enabling verbose garbage collection (verboseGC) in WebSphere Application Server (Distributed platforms)
- Writing Verbose GC to a Specified Log -Xverbosegclog in AIX, Linux and Windows
- Writing Verbose GC to a Specified Log in Solaris and HP-UX
- IBM SDK Java Technology Edition, Version 8 - Summary of diagnostic information
- IBM SDK Java Technology Edition, Version 8 - Garbage Collector diagnostic data
- IBM SDK Java Technology Edition, Version 8 - Verbose garbage collection logging
- IBM SDK Java Technology Edition, Version 8 – Garbage Collector command-line options
- IBM SDK Java Technology Edition, Version 8 - Dump agent tokens
- IV74107: Java TDUMPS on z/OS are not uniquely named
Was this topic helpful?
Document Information
Modified date:
25 September 2022
UID
swg21998741