[jboss-user] [Performance Tuning] - Variation in Max Heap size

Peter Johnson do-not-reply at jboss.com
Tue Jul 27 10:59:32 EDT 2010


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

"Variation in Max Heap size"

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

--------------------------------------------------------------
An appplication server will always have remote objects, whether you use them directly or not. By default, the RMI code will perform a major collection every minute. The settings in the run scripts change this to every hour. Why every hour? Why not every 30 minutes, or every 24 hours or every week? Where did the recommendation of one hour come from, and what is it based on?

At the very first JBoss World in 2005 I presented a talk on JBoss AS performance tuning, using the SpecJAppServer benchmark to do the analysis. A typical benchmark run included starting the app server, trying a web page or two to make certain things were running correctly, running the benchmark, and then shutting the app server down. The benchmark runs for about 20 minutes. We didn't want the RMI collector to fire off a major collection during the benchmark so we changed the delay to be long enough that it would not interfere with the benchmark - 60 minutes. After that talk, the 60 minute RMI setting appreared in the run scripts.

The 60 minutes suited out benchmark run - it practically guaranteed that there would be no RMI collection during the time the app server was running. So how long do you typically run the app server before restarting it? A week? A month? Longer? Well, that is what you should base the RMI GC settings on, not an arbitrary recommendation of 60 minutes.

Moral of the story: find out why someone recommends a certain setting, then adjust the setting based on your environment and circumstances.

Oh, and by the way, the RMI thread that handles the GC uses System.gc(), so setting DisableExplicitGC will prevent the RMI GC from taking place. However, it is still a good idea to set sun.rmi.dgc.client.gcInterval and sun.rmi.dgc.server.gcInterval to a high value to prevent the RMI thread (the one that sleeps for the time interval and then calls Syste,.gc()) from running.

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

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

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/20100727/9e72946a/attachment-0001.html 


More information about the jboss-user mailing list