This discussion is archived
3 Replies Latest reply: Dec 30, 2008 9:20 AM by 843829 RSS

gc problem (urgent, please help me)

843829 Newbie
Currently Being Moderated
Hi all,

I'm trying to optimize garbage collector for my application running on a Linux box (2.6.18-92.1.13.el5 x86_64) but I have a very strange problem.

I'm using jdk 1.5.0_16 and my options are:

-XX:PermSize=192m -XX:MaxPermSize=192m
-XX:NewSize=768m -XX:MaxNewSize=768m -XX:SurvivorRatio=65536 -XX:MaxTenuringThreshold=0
-server -Xss128k -Xms2g -Xmx2g -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -Xnoclassgc -XX:+UseTLAB
-XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycleMin=0
-XX:CMSIncrementalDutyCycle=10 -XX:CMSInitiatingOccupancyFraction=60

During startup my application allocate a big data structure (of about 300-400mb) and after some second the jvm start a minor collection lasting about 500 seconds.
During this collection the jvm is completely blocked.

Using jstat (with 1 second interval) I can see that the time is spent on copying young objects to the tenured generation:

S0C S1C S0U S1U EC EU OC OU PC PU YGC YGCT FGC FGCT GCT
64,0 64,0 0,0 0,0 786304,0 782293,1 1310720,0 42634,5 196608,0 50424,2 1 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 42634,5 196608,0 50468,4 1 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 116528,1 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 185834,0 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 250929,8 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 289602,9 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 289608,4 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 289620,9 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 289640,8 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 289652,9 196608,0 50468,4 2 0,943 3 0,974 1,917
S0C S1C S0U S1U EC EU OC OU PC PU YGC YGCT FGC FGCT GCT
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 289679,4 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 289727,9 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 289760,7 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 289794,3 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 289810,7 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 289822,8 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 289850,9 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 289875,9 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 289899,8 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 289915,4 196608,0 50468,4 2 0,943 3 0,974 1,917
S0C S1C S0U S1U EC EU OC OU PC PU YGC YGCT FGC FGCT GCT
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 289930,6 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 289950,1 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 289958,0 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 289977,9 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 289984,5 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 290001,7 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 290018,5 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 290041,9 196608,0 50468,4 2 0,943 3 0,974 1,917
64,0 64,0 0,0 0,0 786304,0 786304,0 1310720,0 290050,9 196608,0 50468,4 2 0,943 3 0,974 1,917

As you can see the old generation usage slowly grow. In this fragment (about 30 second) the collector moved only 200mb.

Anyone can help me to solve the problem?

Thank you very much
Paolo