Kbase 20383: Use of the -verbosegc Option
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  1/23/2010 |
|
Status: Unverified
GOAL:
How to troubleshoot performance-related problems in Java
FIX:
The -verbosegc option prints a message when Java garbage collection occurs. Garbage collection frees the Java programmer from the requirement to explicitly track and free memory.
Garbage collection must take place some time, but the default scheduling algorithms can play havoc with application performance. First, a period of time elapses while the application works, then garbage collection occurs.
Between these two events, all user threads are stopped and states are saved. After the garbage collection ends, all threads are started back up. This start-stop time becomes expensive, and it must be minimized in order to maximize total work done.
The -verbosegc command is used to analyze whether or not the application is getting work done effectively, or is thrashing while it is in garbage collection mode. Verbosegc is a powerful tool because it allows you to follow the program as it actually executes. It displays the time in milliseconds since the last collection.
This switch can be seen as an option to the JRE if you use the -option flag on the command line. The output of -verbosegc is written to the stdout or stderr of the broker process. In versions prior to 9.1D, this is logged in the AdminServerSystemOut.log file; in version 9.1D and later, this is logged in the admserv.log file.
The switch can be activated as follows in the ubroker.properties file:
[UBroker.AS.sometest]
jvmArgs=-verbosegc