开发者

Jvm settings on the server side

开发者 https://www.devze.com 2023-01-17 11:21 出处:网络
About to choose hosting service for a website written in GWT with Java on the server side. Does anyone have some good guidelines for JVM mem settings. Some hosting services are limiting JVM memory. I

About to choose hosting service for a website written in GWT with Java on the server side. Does anyone have some good guidelines for JVM mem settings. Some hosting services are limiting JVM memory. I was told one JVM 开发者_开发百科per CPU core but what about mem settings?

Best regards,

Niclas Lindberg


Multiple JVM will increase the memory footprint. We used to run single JVM even for 64 core machines. You need to tune your JVM parameters accordingly. Please see the following links

http://docs.sun.com/source/817-2180-10/pt_chap5.html http://javahowto.blogspot.com/2006/06/6-common-errors-in-setting-java-heap.html


It depends on the requirements of your app. You can start with a certain size, e.g:

 -Xms512m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m

You need to monitor the JVM with JConsole and see if it is good enough. You can adjust the parameters according to your monitor result. Basically, -Xms should be equals with -Xmx which can reduce the CPU overhead for increasing heap size.

0

精彩评论

暂无评论...
验证码 换一张
取 消