Full GC again...

Hi,

I can not figure out what makes VM to run Full GC from time to time like in the listing below...

Any ideas ?

thanks,

Alex

JRE 1.5.0_06, Linux 2.6.9

java -Xms300M -Xmx300M -XX:ThreadStackSize=100 -Xss100K -server -XX:NewSize=80M -XX:MaxNewSize=80M -XX:SurvivorRatio=2 -XX:TargetSurvivorRatio=80 -XX:PermSize=8M -XX:+DisableExplicitGC -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC

2069.493: [Full GC {Heap before gc invocations=79:

def new generationtotal 61440K, used 59230K [0x9be40000, 0xa0e40000, 0xa0e40000)

eden space 40960K, 99% used [0x9be40000, 0x9e637258, 0x9e640000)

from space 20480K, 89% used [0x9fa40000, 0xa0c20618, 0xa0e40000)

tospace 20480K,0% used [0x9e640000, 0x9e640000, 0x9fa40000)

tenured generationtotal 225280K, used 26314K [0xa0e40000, 0xaea40000, 0xaea40000)

the space 225280K, 11% used [0xa0e40000, 0xa27f2a10, 0xa27f2c00, 0xaea40000)

compacting perm gen total 8192K, used 5258K [0xaea40000, 0xaf240000, 0xb2a40000)

the space 8192K, 64% used [0xaea40000, 0xaef62bb0, 0xaef62c00, 0xaf240000)

No shared spaces configured.

2069.493: [DefNew: 59230K->13381K(61440K), 0.0525370 secs] 85544K->44677K(286720K)Heap after gc invocations=80:

def new generationtotal 61440K, used 13381K [0x9be40000, 0xa0e40000, 0xa0e40000)

eden space 40960K,0% used [0x9be40000, 0x9be40000, 0x9e640000)

from space 20480K, 65% used [0x9e640000, 0x9f351700, 0x9fa40000)

tospace 20480K,0% used [0x9fa40000, 0x9fa40000, 0xa0e40000)

tenured generationtotal 225280K, used 31295K [0xa0e40000, 0xaea40000, 0xaea40000)

the space 225280K, 13% used [0xa0e40000, 0xa2ccfe90, 0xa2cd0000, 0xaea40000)

compacting perm gen total 8192K, used 5258K [0xaea40000, 0xaf240000, 0xb2a40000)

the space 8192K, 64% used [0xaea40000, 0xaef62bb0, 0xaef62c00, 0xaf240000)

No shared spaces configured.

}

, 0.0530170 secs]

2469.687: [Full GC {Heap before gc invocations=106:

def new generationtotal 61440K, used 55607K [0x9be40000, 0xa0e40000, 0xa0e40000)

eden space 40960K, 99% used [0x9be40000, 0x9e63d9c8, 0x9e640000)

from space 20480K, 71% used [0x9e640000, 0x9f4903f0, 0x9fa40000)

tospace 20480K,0% used [0x9fa40000, 0x9fa40000, 0xa0e40000)

tenured generationtotal 225280K, used 37794K [0xa0e40000, 0xaea40000, 0xaea40000)

the space 225280K, 16% used [0xa0e40000, 0xa3328868, 0xa3328a00, 0xaea40000)

compacting perm gen total 8192K, used 5269K [0xaea40000, 0xaf240000, 0xb2a40000)

the space 8192K, 64% used [0xaea40000, 0xaef657c0, 0xaef65800, 0xaf240000)

No shared spaces configured.

2469.687: [DefNew: 55607K->17641K(61440K), 0.0471880 secs] 93401K->55435K(286720K)Heap after gc invocations=107:

def new generationtotal 61440K, used 17641K [0x9be40000, 0xa0e40000, 0xa0e40000)

eden space 40960K,0% used [0x9be40000, 0x9be40000, 0x9e640000)

from space 20480K, 86% used [0x9fa40000, 0xa0b7a748, 0xa0e40000)

tospace 20480K,0% used [0x9e640000, 0x9e640000, 0x9fa40000)

tenured generationtotal 225280K, used 37794K [0xa0e40000, 0xaea40000, 0xaea40000)

the space 225280K, 16% used [0xa0e40000, 0xa3328868, 0xa3328a00, 0xaea40000)

compacting perm gen total 8192K, used 5269K [0xaea40000, 0xaf240000, 0xb2a40000)

the space 8192K, 64% used [0xaea40000, 0xaef657c0, 0xaef65800, 0xaf240000)

No shared spaces configured.

}

, 0.0476750 secs]

[3673 byte] By [alexmma] at [2007-10-3 8:22:19]
# 1
Can you please also post the logs generated with -XX:+PrintGCDetails.
poonambajaja at 2007-7-15 3:28:14 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2

Is it significant that the two otherwise unexplained full collections are exactly 400 seconds apart? You only show two collections, so it's hard to generalize about the intervals between these collections. You are already running with -XX:+DisableExplicitGC, so those collections shouldn't be from calls to System.gc().

(Do you know why you are running with "No shared spaces configured."? The JVM will run perfectly well that way, but you would get better startup times if you built the shared archive with "java -Xshare:dump".)

PeterKesslera at 2007-7-15 3:28:14 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 3

These are actually not whole heap gc's, just "delayed scavenges" (as a

result of JNI critical sections being exited with Eden full) being

misreported as full gc's. The misreporting bug is fixed in a later release

(i'll dig up the bug id).

The important thing though is that there is a time window before these

scavenges when your application may be allocating somewhat slowly

because Eden has filled up but a GC cannot happen because of

a JNI critical section being held. During that time window allocation

may be done out of the old generation (which a fuller log with +PrintGCDetails

would show).

ramki_at_jdca at 2007-7-15 3:28:14 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 4

The misreporting/mislabelling bug above is CR 6432427, fixed in JDK 6.0 (beta).

See also, Jon's blog that gives a catalogue of causes of "Full GC" events

including the one I described above; see:

http://blogs.sun.com/jonthecollector/

(in particular the entry of "Thursday Oct 26, 2006").

ramki_at_jdca at 2007-7-15 3:28:14 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 5
Specifically, the blog http://blogs.sun.com/jonthecollector/entry/why_now
jon999a at 2007-7-15 3:28:14 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 6

Hi,

it seems that I hit the bug mentioned above. I was wondering where the bug was - in printing wrong string "Full GC" or reporting wrong time taken (too small) ..

just in case, here is the log (I have decreased NewGen to 64M, this is not relevant):

2396.504: [GC 2396.504: [DefNew: 47224K->9605K(49152K), 0.0400940 secs] 112418K->78033K(290816K), 0.0404530 secs]

2402.309: [GC 2402.309: [DefNew: 41801K->13500K(49152K), 0.0457490 secs] 110229K->81928K(290816K), 0.0461060 secs]

2406.942: [GC 2406.942: [DefNew: 45077K->9378K(49152K), 0.0394620 secs] 113505K->80513K(290816K), 0.0398060 secs]

2411.607: [Full GC 2411.607: [DefNew: 42146K->11418K(49152K), 0.0349480 secs] 113344K->82616K(290816K), 0.0352890 secs]

2416.128: [GC 2416.128: [DefNew: 44158K->9744K(49152K), 0.0317540 secs] 115356K->80942K(290816K), 0.0321090 secs]

2431.779: [GC 2431.779: [DefNew: 42468K->9302K(49152K), 0.0271300 secs] 113666K->80501K(290816K), 0.0274990 secs]

2460.115: [GC 2460.115: [DefNew: 42032K->11956K(49152K), 0.0336600 secs] 113230K->83154K(290816K), 0.0340210 secs]

3092.676: [GC 3092.676: [DefNew: 39567K->8249K(49152K), 0.0244080 secs] 120895K->89577K(290816K), 0.0248020 secs]

3124.416: [GC 3124.416: [DefNew: 41017K->5334K(49152K), 0.0171250 secs] 122345K->86662K(290816K), 0.0174840 secs]

3142.484: [GC 3142.484: [DefNew: 38076K->5809K(49152K), 0.0190090 secs] 119404K->87137K(290816K), 0.0193580 secs]

3180.263: [Full GC 3180.263: [DefNew: 37247K->11496K(49152K), 0.0325830 secs] 120244K->94493K(290816K), 0.0329220 secs]

3195.934: [GC 3195.935: [DefNew: 44261K->8529K(49152K), 0.0259260 secs] 127258K->91525K(290816K), 0.0262790 secs]

3215.063: [GC 3215.063: [DefNew: 41285K->9952K(49152K), 0.0305630 secs] 124282K->92949K(290816K), 0.0309070 secs]

3240.325: [GC 3240.325: [DefNew: 42681K->10632K(49152K), 0.0302890 secs] 125678K->93629K(290816K), 0.0306430 secs]

5162.202: [GC 5162.202: [DefNew: 40081K->10374K(49152K), 0.0303690 secs] 142830K->113123K(290816K), 0.0307280 secs]

5204.101: [GC 5204.101: [DefNew: 43142K->8355K(49152K), 0.0247200 secs] 145891K->111104K(290816K), 0.0251820 secs]

5249.579: [GC 5249.580: [DefNew: 41070K->10846K(49152K), 0.0303930 secs] 143820K->113596K(290816K), 0.0307730 secs]

5297.293: [Full GC 5297.293: [DefNew: 43613K->9367K(49152K), 0.0268350 secs] 146506K->112260K(290816K), 0.0272170 secs]

5339.380: [GC 5339.381: [DefNew: 42126K->9040K(49152K), 0.0257950 secs] 145019K->111934K(290816K), 0.0262130 secs]

-

6547.097: [GC 6547.097: [DefNew: 41793K->12224K(49152K), 0.0351110 secs] 160746K->131177K(290816K), 0.0354630 secs]

6565.279: [GC 6565.279: [DefNew: 44990K->13642K(49152K), 0.0392770 secs] 163943K->132595K(290816K), 0.0396340 secs]

6592.978: [GC 6592.978: [DefNew: 46399K->9603K(49152K), 0.0341560 secs] 165352K->130663K(290816K), 0.0345430 secs]

6604.130: [GC 6604.130: [DefNew: 42357K->11840K(49152K), 0.0339120 secs] 163417K->132900K(290816K), 0.0342860 secs]

6614.478: [Full GC 6614.478: [DefNew: 44559K->11806K(49152K), 0.0341900 secs] 165938K->133185K(290816K), 0.0345730 secs]

6632.990: [GC 6632.990: [DefNew: 44553K->10977K(49152K), 0.0304230 secs] 165932K->132356K(290816K), 0.0308000 secs]

6672.913: [GC 6672.913: [DefNew: 43745K->11242K(49152K), 0.0333820 secs] 165124K->133029K(290816K), 0.0337680 secs]

10494.398: [GC 10494.398: [DefNew: 42791K->16384K(49152K), 0.0704750 secs] 238852K->214976K(290816K), 0.0710270 secs]

10500.641: [GC 10500.641: [DefNew: 49132K->49132K(49152K), 0.0000380 secs]10500.641: [Tenured: 198592K->67274K(241664K), 0.2976110 secs] 247724K->67274K(290816K), 0.2982150 secs]

10520.521: [GC 10520.522: [DefNew: 32265K->5236K(49152K), 0.0251580 secs] 99539K->72511K(290816K), 0.0256880 secs]

10537.788: [GC 10537.788: [DefNew: 37999K->8494K(49152K), 0.0326010 secs] 105273K->75768K(290816K), 0.0331660 secs]

11226.210: [GC 11226.211: [DefNew: 44215K->12969K(49152K), 0.0404320 secs] 140029K->108783K(290816K), 0.0409650 secs]

11247.099: [GC 11247.100: [DefNew: 45685K->12518K(49152K), 0.0393710 secs] 141499K->108332K(290816K), 0.0398880 secs]

11276.615: [Full GC 11276.616: [DefNew: 45286K->12032K(49152K), 0.0401870 secs] 141190K->107936K(290816K), 0.0406980 secs]

11294.301: [GC 11294.302: [DefNew: 44798K->11197K(49152K), 0.0378100 secs] 140702K->107102K(290816K), 0.0383170 secs]

11307.024: [GC 11307.024: [DefNew: 43926K->9435K(49152K), 0.0340290 secs] 139830K->106229K(290816K), 0.0345590 secs]

thanx a lot everyone, case is closed!

;-)

alexmma at 2007-7-15 3:28:14 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 7
<deleted>Message was edited by: alexmm
alexmma at 2007-7-15 3:28:14 > top of Java-index,Java HotSpot Virtual Machine,Specifications...