获取当前的 Payara 最大堆大小(MaxHeapSize)和元空间大小(MetaspaceSize)。

huangapple go评论95阅读模式
英文:

Get current Payara MaxHeapSize and MetaspaceSize

问题

我有一个正在运行的Payara 4实例,我已经按照这里描述的方式设置了MaxHeapSizeMetaspaceSize以准备投入生产。我该如何检查这些值是否已正确设置?

英文:

I have a running Payara 4 instance which I set the MaxHeapSize and MetaspaceSize as described here to be production ready. How can I check those values were correctly set?

答案1

得分: 1

你可以使用 jmap -heap <pid> 命令来检查 Payara 进程的堆内存信息。jmap 工具位于 JDK 的 bin 目录中。

在 JDK9+ 中,你需要使用 jhsdb jmap --heap --pid <PID> 命令来获取所需的信息。

输出应包含所需信息,例如:

堆配置:
   最小堆空闲比率         = 0
   最大堆空闲比率         = 100
   最大堆大小              = 268435456 (256.0MB)
   新生代大小                  = 89128960 (85.0MB)
   最大新生代大小               = 89128960 (85.0MB)
   老年代大小                  = 179306496 (171.0MB)
   新生代比率                 = 2
   存活区比率            = 8
   元空间大小            = 21807104 (20.796875MB)
   压缩类空间大小 = 1073741824 (1024.0MB)
   最大元空间大小         = 17592186044415 MB
   G1 堆区大小         = 0 (0.0MB)
英文:

You could check this using jmap -heap &lt;pid&gt; on the PID of the Payara process. jmap is contained in the JDK bin directory.

On JDK9+ you need to use jhsdb jmap --heap --pid &lt;PID&gt; to get the needed information.

The output should contain the needed information, e.g:

Heap Configuration:
   MinHeapFreeRatio         = 0
   MaxHeapFreeRatio         = 100
   MaxHeapSize              = 268435456 (256.0MB)
   NewSize                  = 89128960 (85.0MB)
   MaxNewSize               = 89128960 (85.0MB)
   OldSize                  = 179306496 (171.0MB)
   NewRatio                 = 2
   SurvivorRatio            = 8
   MetaspaceSize            = 21807104 (20.796875MB)
   CompressedClassSpaceSize = 1073741824 (1024.0MB)
   MaxMetaspaceSize         = 17592186044415 MB
   G1HeapRegionSize         = 0 (0.0MB)

huangapple
  • 本文由 发表于 2020年1月6日 23:44:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/59615000.html
匿名

发表评论

匿名网友

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

确定