java实战 jvm调优
Last updated on November 22, 2024 pm
🧙 Questions
对java虚拟机调优和优化
☄️ Ideas
运行参数说明
参数名 | 描述 | 配置 |
---|---|---|
-Xmx | 最大可使用内存 | 2048m 或者 1664299798 |
-Xms | 项目运行初始化使用内存 | 512m 或者 1664299798 |
jvm常用命令
# 查看java进程,只看进程的文件名和pid
jps
# 查看进程的文件全路径和pid
jps -l
# 查看进程的详细执行命令
jps -lv
# 查看进程内存使用详情
# jmap -heap ${pid}
Debugger attached successfully.
Server compiler detected.
JVM version is 25.292-b10
using thread-local object allocation.
Parallel GC with 8 thread(s)
Heap Configuration:
MinHeapFreeRatio = 0
MaxHeapFreeRatio = 100
MaxHeapSize = 2147483648 (2048.0MB)
NewSize = 346030080 (330.0MB)
MaxNewSize = 715653120 (682.5MB)
OldSize = 692060160 (660.0MB)
NewRatio = 2
SurvivorRatio = 8
MetaspaceSize = 21807104 (20.796875MB)
CompressedClassSpaceSize = 1073741824 (1024.0MB)
MaxMetaspaceSize = 17592186044415 MB
G1HeapRegionSize = 0 (0.0MB)
Heap Usage:
PS Young Generation
Eden Space:
capacity = 620232704 (591.5MB)
used = 3022304 (2.882293701171875MB)
free = 617210400 (588.6177062988281MB)
0.4872854947036137% used
From Space:
capacity = 48234496 (46.0MB)
used = 0 (0.0MB)
free = 48234496 (46.0MB)
0.0% used
To Space:
capacity = 47185920 (45.0MB)
used = 0 (0.0MB)
free = 47185920 (45.0MB)
0.0% used
PS Old Generation
capacity = 1419771904 (1354.0MB)
used = 96972344 (92.48003387451172MB)
free = 1322799560 (1261.5199661254883MB)
6.830135441249019% used
🔗 Links
java实战 jvm调优
https://ispong.isxcode.com/spring/java/java实战 jvm调优/