[jboss-user] [Performance Tuning] - Memory consumption 1h after JBoss start

Peter Johnson do-not-reply at jboss.com
Fri Jul 23 14:13:50 EDT 2010


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/554214#554214

--------------------------------------------------------------
I ageee that your explanation of setting MaxTenuringThreshold to 0 is the commonly accepted advice. But of course, I disagree  :D 

The problem with setting MaxTenuringThreshold to 0 is that at the time the minor GC takes place you will have a lot of temporary objects that are still in use being promoted to the tenured generation. Then the tenured generation fills up quicker and you end up doing major CMS collections more often. It is usually better to let objects bounce around a few times between the survivor spaces in order to sift out objects that survive only a few collections and are then discarded, thus ensuring that only object that plan to stay around for a while get tenured.Tenuring temporary object is much more expensive than not tenuring long-lived objects.

Test I have done show that the minor collection time, even with MaxTenuringThreshold not set to 0, is consistently less that the two pauses times caused by the CMS collectior for a major collection. In addtion, having MaxTenuringThreshold set to a non-zero value has, in my tests, always outperfomed setting MaxTenuringThreshold to 0 (higher throughput, lower response times). At least, that is what I have observed in the many load tests that I have performed.

Of course, all apps are different - the reader is urged to perform his or her own load tests to see how their apps respond.

And Ruchir, I agree with you that discussions like this are benefitial to the community. :)  Hopefully the readers can take our two views into consideration and find what works best for their apps.

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

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

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100723/5f4432b1/attachment.html 


More information about the jboss-user mailing list