This discussion is archived
0 Replies Latest reply: Dec 25, 2009 5:27 AM by 843798 RSS

VisualVM / Garbage Collector

843798 Newbie
Currently Being Moderated
Hi everybody,

I need some help with the garbage collector and VisualVM. I have a problem with a web application. While monitoring tomcat's performance (especially garbage collections using Visual GC) I see that Old Generation Collections occure twice as often as Eden Space Collections (which is not good). But! I never see Old Generation to get full, so I have a doubt that Visual GC shows the right number of collections. To be concrete: I use Java HotSpot(TM) 64-Bit Server VM (14.1-b02, mixed mode), -XX:+UseConcMarkSweepGC. I log the collections using -verbose:gc. Let's say I restart Tomcat and after a few seconds I the Visual GC says:

Eden Space: 1 collections
Old Gen: 2 collections

At the same time I see in the gc log:

21.421: [GC 21.421: [ParNew: 1906560K->95296K(2001856K), 2.2834250 secs] 1906560K->534065K(4000704K), 2.2835150 secs] [Times: user=2.20 sys=0.19, real=2.28 secs]
61.088: [GC [1 CMS-initial-mark: 438769K(1998848K)] 1203686K(4000704K), 0.5620070 secs] [Times: user=0.29 sys=0.01, real=0.57 secs]
61.651: [CMS-concurrent-mark-start]
64.200: [CMS-concurrent-mark: 2.542/2.550 secs] [Times: user=1.83 sys=0.06, real=2.55 secs]
64.200: [CMS-concurrent-preclean-start]
64.263: [CMS-concurrent-preclean: 0.062/0.063 secs] [Times: user=0.03 sys=0.00, real=0.06 secs]
64.263: [CMS-concurrent-abortable-preclean-start]
CMS: abort preclean due to time
69.468: [CMS-concurrent-abortable-preclean: 3.045/5.205 secs] [Times: user=1.80 sys=0.00, real=5.20 secs]
69.471: [GC[YG occupancy: 803049 K (2001856 K)]
69.471: [Rescan (parallel) , 0.5799110 secs]70.051: [weak refs processing, 0.0016400 secs] [1 CMS-remark: 438769K(1998848K)] 1241818K(4000704K), 0.5816910 secs]

So, I really see one minor collection (1st line) but the remaining stuff concerns only one tenured (old) gen collection IMO, why does Visual GC say there are two?? Do I interpret anything wrong?

Thanks for any advice!

Svetlana