Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

FULL GC is triggered almost everytime.

allboryFeb 21 2012 — edited Feb 27 2012
Hi.

I use tomcat server (ver6.0.35).
I've learned my tomcat server is suffering poor memory control from GC log.
GC log said that there's only full GC is triggered. No minor GC.

Back ground infor.
Windows server 2003 R2 x64 edition
8G RAM
java 1.6.0

Here's catalina option
-Xloggc:gc.txt -XX:+PrintGCTimeStamps -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./java.hprof -XX:MaxTenuringThreshold=128
-Xmn512M -Xms1024M -Xmx1024M

Here's GC log
577208.794: [Full GC 917504K->820157K(983040K), 2.8304534 secs]
577320.217: [Full GC 917504K->823077K(983040K), 2.8086173 secs]
577444.837: [Full GC 917504K->823036K(983040K), 2.8255810 secs]
577553.258: [Full GC 917504K->803602K(983040K), 2.8666142 secs]
577689.493: [Full GC 917504K->823041K(983040K), 2.8355752 secs]
577785.868: [Full GC 917504K->823082K(983040K), 2.8279698 secs]

To find out what's the main cause of full GC. I dumped heap with visualVM.
As a result of heapdump. I've learned those things.
java.lang.String has 32.6% instances
char[] has 32.6% instances
java.util.HashMap$Entry has 25.8% instances
Others are less 1%.

Now I'm co-work with my teammate to release memory after using HashMap and collection objects sort of Vector Arraylist and so on.
But I'm not sure what I'm doing is helpful or not.

Please guide me what things should be done to solve this problem?
Thanks in advance.
Dan
This post has been answered by unknown-7404 on Feb 21 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 26 2012
Added on Feb 21 2012
27 comments
636 views