[jboss-user] [Performance Tuning] - Re: JBoss- How to big /incrase Heap size?
PeterJ
do-not-reply at jboss.com
Thu Feb 22 10:36:57 EST 2007
I would advise against setting the heap to 5GB (or 10GB), because when you hit your first major garbage collection, you will find that it will take several minutes during which time all of the application processing will be suspended. (If you have multiple CPUs, you could look into the mostly-concurrent garbage collector, which would reduce the delay for garbage collection, and thus might allow a fairly large heap to be used. Note that this collector will slow down the overall throughput for the application.)
The best setting is to make the heap as large as you need it, but not any larger. The only way to find out what this ideal heap size is is to perform load testing on your application. I usually recommend the following setting to start your testing with, and then to adjust the setting based on usage:
-Xms1200M -Xmx1200m -XX:NewSize=300M -XX:MaxNewSize=300M
To analyze the heap usage, use the -verbose:gc or -XX:PrintHeapAtGC command line options, plotting the data that they give. That will tell you if you need to adjust the young generation or whole heap sizes.
Reference: http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4020635#4020635
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4020635
More information about the jboss-user
mailing list