[jboss-user] [Performance Tuning] - Re: Not specifying an -Xms value

Peter Johnson do-not-reply at jboss.com
Wed Jun 20 16:16:57 EDT 2012


Peter Johnson [https://community.jboss.org/people/peterj] created the discussion

"Re: Not specifying an -Xms value"

To view the discussion, visit: https://community.jboss.org/message/743191#743191

--------------------------------------------------------------
My recommendation is to not set -Xms the same as -Xmx on a development machine. Why? On such a machine you run numerous things, not just JBoss AS. In that event you want to use a little of your available memory as possible - most likely you won't be running the app server long enough for it to want to grab the rest of the memory for the heap.

On a production machine, always set -Xms to the same as -Xmx. Why? Because a production machine is tpyically a one-use machine (that is, other than the OS, only the app server will be running). And after runnign a while the app server will have grabbed all of the heap memory, and won't let it go. So you might as well give it all the heap memeory to start with. (There is also a small performance penalty for making the JVM continually ask the OS for more heap space, and also for causing the JVM to determine whether it needs nor space or can give space away. Setting -Xms and -Xmx to the same value avoids performing those calculations. But the performance difference on modern processors and RAM configurations is negligible.)
--------------------------------------------------------------

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

Start a new discussion in Performance Tuning at Community
[https://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/20120620/17e0fec2/attachment.html 


More information about the jboss-user mailing list