Peter Johnson [http://community.jboss.org/people/peterj] replied to the 
discussion

"Memory consumption 1h after JBoss start"

To view the discussion, visit: http://community.jboss.org/message/553989#553989

--------------------------------------------------------------
Ruchir, your suggested newsize is too small for the heap size specified - the 
newsize should be 1/3 - 1/4 the size of the heap. By the way, based on my 
tests, if you do not specify a newsize, JDK 6 eventually adjusts it to about 
1/3 - 1/4 the heap size (just realized that was with the standard collection, 
not the CMS collector, but I suspect that letting the ).

Setting MaxTenuringThreshold to 0 is a bad idea - I puts a larger strain on the 
CMS collector and degrades overall applicaiton performance. It is much better 
ot let needed objects survive a few minor collections before being tenured, and 
thus let the minor collector gather all the garbage, than requiring the CMS 
collector to collect objects that die soon. Besides, setting the 
UseConcMarkSweepGC sets MaxTenuringThreshold to 0 by default (and also sets the 
survivor spaces to a really small value.

It is not always advisable to set UseConcMarkSweepGC. You must test your 
application both with and without it to determine hte best performance. Also, 
with UseConcMarkSweepGC, during a major collection, one of your CPUs will be 
dedicated to garbage collection. If you have only 2 CPUs, then you will reduce 
the amount of load your app can handle by 50%.


For suggestions on how to gather GC data and analyze it, see these white papers:
Java Garbage Collection Statistical Analysis 101
Java Garbage Collection Performance Analysis 201 (this white paper discusses 
the CMS collector and its gotchas)
at  http://www.cmg.org/cgi-bin/search.cgi?q=java+peter+johnson&x=30&y=10 
http://www.cmg.org/cgi-bin/search.cgi?q=java+peter+johnson&x=30&y=10
h2. 

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/553989#553989]

Start a new discussion in Performance Tuning at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2078]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to