Garbage Collection - Full collection doesn't do more then Minor collection
I've been logging some GC information of my webapp since it's having some memory issues.
The webapplication uses sessions to store a lot of data across pages, it's a medium-high load service used in our company internally as an interface for our ERP.
I've noticed that memory usage goes up a lot, but doesn't really come down again, even when java does a full gc, It doesn't actually go down more then a normal minor collection. You wouldn't think it was a full collection if you'd see the graphs.
Are there specific gc settings I should alter so that this performance improves?
It's running on a HP unix, dev/test serv has 2GB ram, prod has 4 GB.
Since other services run on the server, we can say that the tomcat java has about 0.5GB and 1GB to use on respectively test and production server.
Thanks in advance for any suggestions you might have!
[900 byte] By [
Barttha] at [2007-10-3 1:33:41]

Hi,
the minor collections only removes garbage from the young generation. The full gc removes the garbage from the old generation. If your heap usage doesn't descrease with the full gc, this means, you have no garbage in your old generation.
Or in other words: You have many very long-living objects that reside in the old generation that never become garbage. During runtime you create short-lived objects in the young generation, that are garbage collected at your minor gcs and never tenure into the old generation.
Nick.
A brief verbose:gc snippet (please include -XX:+PrintGCDetails and
-XX:+PrintGCTimeStamps for best results) illustrating the problem
would be most helpful.
Refer also to the GC tuning guide:
http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html
Some further general and specific performance tuning tips are available at:
http://java.sun.com/docs/hotspot/index.html
and at:
http://java.sun.com/javase/technologies/hotspot.jsp
The GC guide above and the GC white paper below should also answer
V_Vishal's questions above:
http://java.sun.com/j2se/reference/whitepapers/[memorymanagement_whitepaper.pdf]