什么影响了JVM内存分配超过-Xmx?

huangapple 未分类评论49阅读模式
英文:

What is affecting the JVM memory allocation to go beyond -Xmx?

问题

我们正在配置一个JVM以使用Java 11部署服务器应用程序。事实证明,我们的虚拟机RAM限制为1.3G,我们为JVM分配了以下配置:

-Xms512m 
-Xmx1024m

结果发现,当我们启动虚拟机时,它显示没有足够的内存来启动应用程序(由于安全原因,我不能在这里放置错误消息 -_-)。

我们尝试在本地机器上运行该应用程序,并借助VisualVM发现其消耗的内存比预期多。
检查最大值,超过了1GB

我们发现JVM能够添加比预期更多的内存,我们的问题是:哪些内存影响了这种“额外”的内存分配?当然,我们尝试了Perm(已弃用),但我们不知道哪些特定的标志可能会影响差异。

英文:

We're configuring a JVM to deploy a server application with Java 11. Turns out our VM has a limit of 1.3G of RAM and we assigned the JVM the following config:

-Xms512m
-Xmx1024m

Turns out that when we start the VM it says that there is not enough memory for the application to start. (Due to security reasons I cannot place the error message here -_-).

We tried to run the app on a local machine and found out it is consuming more memory than intended with the help of VisualVM.
Check the Max Value, is beyond 1GB

We found that the JVM is capable of adding more memory than intended, our question is: Which memories affect this "extra" allocation of memory? We tried with Perm (deprecated) of course but we don't have an idea about which specific flags might affect the difference

huangapple
  • 本文由 发表于 2020年4月7日 07:14:23
  • 转载请务必保留本文链接:https://java.coder-hub.com/61070393.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定