英文:
Get current Payara MaxHeapSize and MetaspaceSize
问题
我有一个正在运行的Payara 4实例,我已经按照这里描述的方式设置了MaxHeapSize和MetaspaceSize以准备投入生产。我该如何检查这些值是否已正确设置?
英文:
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 <pid>
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 <PID>
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)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论