how to enable and analyze verbose garbage collection

August 27th, 2009 § 1 Comment

In Web applications, memory utilization can impact system performance significantly. One of the most common memory problems is memory leak, which causes severe performance degradation. In theory, memory leaks should not happen in Java™ because it has Garbage Collection (GC). However, GC only cleans up unused objects that are not referenced anymore. Therefore, if an object is not used, but is still referenced, GC does not remove it, which leads to memory leaks. Beside memory leaks, other memory problems that you might encounter are memory fragmentation, large objects, and tuning problems. In many cases, these memory problems can cause the application server to crash. Many users first notice that application server performance gradually declines, and eventually crashes with OutOfMemory exceptions.

Enabling verbose Garbage Collection for WebSphere based Application servers, is simple (see image). After a restart garbage collection is logged in native_stderr.log:

There are many tools for verbose GC log analysis, these tools can abstract useful information, and illustrate the trend of JVM heap size usage over time as the following.

IBM Pattern Modeling and Analysis Tool for Java Garbage Collector (PMAT) parses the IBM verbose GC trace and provides a comprehensive analysis of the Java heap usage. It then recommends key configurations by first executing a diagnosis engine and then employing a pattern modeling algorithm in order to make recommendations to optimize the Java heap usage for a given JVM cycle.

source for this article
PMAT
JDK Diagnosis

see also here

Advertisement

§ One Response to how to enable and analyze verbose garbage collection

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

What’s this?

You are currently reading how to enable and analyze verbose garbage collection at Bernhard Hensler.

meta

Follow

Get every new post delivered to your Inbox.