views:

74

answers:

3

I have an instance of Tomcat 6.0.18 running on Sun's Java HotSpot(TM) Server VM build 1.6.0_14-b08. Is there any way for me to find out what garbage collection algorithm the JVM is using to run my web application?

A: 

You can print out JVM garbage collection information by using the -verbose:gc VM argument. This will at least let you know when . You can use jstat to get detailed information as shown here http://www.herongyang.com/Java-Tools/jstat-gcutil-Garbage-Collection-Statistics.html. This Sun (or Oracle) page has a whole bunch of garbage collection info http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html.

Jeff Storey
+1  A: 

Hi You can find the best document here http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html

giri
A: 

Use the JDK's JVisualVM it lists the GC algo.

Shimi Bandiel