在JVM中优化Xms / Xmx / XX:MaxPermSize [英] Optimizing Xms/Xmx/XX:MaxPermSize in JVM
问题描述
获得 Xms / Xmx / XX优化值的必要步骤:MaxPermSize
?
当然,我可以设置一个很大的值,但正如你所知道的GC需要大量的时间。什么是一般建议,当我可以腾出时间进行测试并找到这些值时?
Definitely I can set a large value but as you know GC take time in large memory. What are the general recommendation when I can spare the time in testing and finding these value?
例如,以下数字有帮助吗?
For example, is the following figures help?
Eden Space heap usage - 42MB / 62MB (used / committed)
Survivor Space heap usage - 8.5MB / 8.5MB (used / committed)
CMS Old Gen heap usage - 100MB / 217MB (used / committed)
Non-heap memory pool usage - 36MB
推荐答案
一般规则是,在发现需要解决的问题之前,不应更改JVM内存设置。 JVM在调整运行时的大多数参数方面做得非常好,以适应您的应用程序。
The general rule is that you should not change the JVM memory settings before you have discovered a problem that need to be solved. The JVM does a pretty good job in tuning most parameters in runtime to suit your application.
如果您发现需要优化内存参数,则取决于您需要的内容进行优化。您将使用的设置会有很大差异,具体取决于您需要优化哪个方面(例如,最大限度减少暂停的设置与最大化吞吐量的设置有很大不同)。
If you have discovered a need to optimize the memory parameters it depends on what you need to optimize. The settings you would use would vary greatly depending on which aspect you need to optimize (for example settings for minimizing pauses are very different from settings that maximize throughput).
如果您确实需要优化,请提供更多信息,说明您需要优化哪些方面。
If you really do need to optimize, please provide more information on what aspect you need to optimize.
这篇关于在JVM中优化Xms / Xmx / XX:MaxPermSize的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!