简体   繁体   English

如何确定要为8GB RAM上的JVM分配多少内存?

[英]How to decide how much memory to allocate to JVM on 8GB RAM?

May be I can provide more information, but I'm not sure what would help? 也许我可以提供更多信息,但是我不确定会有什么帮助?

It's a spring/hibernate app with calls going back to the database on another server, or service calls to other server where more java classes reside (another 8gb RAM box like the one I'm configuring right now). 这是一个Spring / Hibernate应用程序,其调用返回到另一台服务器上的数据库,或者服务调用到驻留更多Java类的另一台服务器(另一个8gb RAM盒,例如我现在正在配置的RAM盒)。

How can I decide what is a good size to allocate for properties such as -xms, -xms, -maxPermSize etc. App consumes on 40% of real memory and less than 10% swap space when configured to use -XMs=512m -Mmx=1024m -XX:MaxPermSize=256m 我如何确定为-xms,-xms,-maxPermSize等属性分配的合适大小是多少。当配置为使用-XMs = 512m -Mmx时,应用程序消耗的真实内存为40%,交换空间少于10% = 1024m -XX:MaxPermSize = 256m

How is the performance affected when I allot a lot more minimum heapSize than it runs comfortably on? 当我分配的最小堆大小比运行时舒服得多时,性能如何受到影响?

I'd suggest you keep the app running for some time and then use jconsole utility to check the memory usage stats. 我建议您将应用程序保持运行一段时间,然后使用jconsole实用工具检查内存使用情况统计信息。 It will provide you with all the information you need about memory usage so you can modify the settings accordingly. 它将为您提供有关内存使用情况所需的所有信息,以便您可以相应地修改设置。 jconsole comes bundled with Sun/Oracle JDK. jconsole与Sun / Oracle JDK捆绑在一起。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM