tags:

views:

30

answers:

1

In JDK 1.5.0.22 : I see that full GC has been run but the old generation and perm gen space is not used completely - question is as per my understanding FGC only runs when old gen or perm gen is full - I am not able to understand why it has run even though usage % is low?.

See output of jstat -gcutil below:

  S0     S1     E      O      P     YGC     YGCT    FGC    FGCT     GCT
 0.00  82.14  51.17  13.78  26.43    219   19.347     1    0.131   19.479

  S0     S1     E      O      P     YGC     YGCT    FGC    FGCT     GCT
 82.14   0.00   9.12  13.92  26.66    222   19.771     1    0.131   19.902

  S0     S1     E      O      P     YGC     YGCT    FGC    FGCT     GCT
 82.14   0.00  11.07   9.07  24.15    230   20.166     2    1.851   22.017

My min/max heap is 1024M and min and max permGen space is defined as 768M.

A: 

FGC only runs when old gen or perm gen is full

It's not true. Read this http://java.sun.com/j2se/reference/whitepapers/memorymanagement_whitepaper.pdf

Memory management in Java may surprise everyone. It takes many years to learn how to set JVM parameters for non-trivial applications.

permGen space is defined as 768M.

Decrease it to 128M

iddqd
Cannot decrease perm gen space - as our application consumes it heavily... are there any disadvantage to using a high value for it?
Anna
Why does you application consume perm gen heavily ? Do You use dom xml parser or compare many strings an call intern ?
iddqd
From the pdf link you have quoted: "When the young generation fills up, a young generation collection (sometimes referred to as a minor collection) of just that generation is performed. When the old or permanent generation fills up, what is known as a fullcollection (sometimes referred to as a major collection) is typically done" . What are those cases when the old/perm gen are not full and yet GC is done??.
Anna
Too many JSP's are loaded - which increases the usage of permgen space...
Anna
Which app server do You use ?
iddqd
Apache Tomcat 5.5.9/ jdk 1.5 update 22
Anna
You have problem with YG not PG or OG. Which collector do you use ? Tomcat in this version is a museum.leaks. First of all decrease PG (it use only 25%) or increase heap.
iddqd