Re: [jboss-user] [Performance Tuning] - Memory consumption 1h after JBoss start
by Peter Johnson
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&cont...]
15 years, 9 months
Re: [jboss-user] [Beginner's Corner] - JBoss Supported Java Standards
by Peter Johnson
Peter Johnson [http://community.jboss.org/people/peterj] replied to the discussion
"JBoss Supported Java Standards"
To view the discussion, visit: http://community.jboss.org/message/554195#554195
--------------------------------------------------------------
1) Yes, and no. It means that the App Server must provide that functionality, whther it does so as part of the JVM or not is up to the App Server vendor. Example: Java EE 5 requires Java Util Logging; this logging is part of the JVM, whether the App Server provides funcionality around this or not is up to the vendor; JBoss AS 5.x recognizes Java Util Logging and redirects it to Log4J which performs the actual logging.
2) Yes the App Server must obey the JNDI SPI specifications. Typically, for this type of functionality, the JVM provides a rudimentary implementation that works just fine for a stand-alone app. The App Server will implement more robust funtionlaity to support multiple deployed apps and remote apps. So JBoss AS does not reply just on the JVM's JNDI implementation but rather provides its own (at least, that is my understanding- I haven't researched the JNDI code specifically, but I know, for instance, that my statements apply to RMI).
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/554195#554195]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 9 months