JVM性能调优3:JVM_堆溢出分析过程和命令
2016-05-31 13:39
531 查看
本系列包括:
JVM性能调优1:JVM性能调优理论及实践(收集整理)
JVM性能调优2:JVM性能调优参数整理
JVM性能调优3:JVM_堆溢出分析过程和命令
JVm性能调优4:GC日志分析
JVM性能调优5:Heap堆分析方法
1 查看JVM状态信息jstat命令格式
jstat-option -t -h num pid interval count
-option:参数
-t打印收集信息的时间
-h每num行打印一个head
pid监控的进程号
interval间隔多少毫秒采集一次信息
count一共采集多少次信息。
2 分析过程命令
(1)查看JVM启动参数和进程号
jps -mlvV
(2)看堆内存分配情况
jstat -gccapacity -t -h 5 2808
100 10
(3)看垃圾回收情况
jstat -gcutil -t -h 5 2808
100 10
jstat -gccause -t -h 5 2808
100 10
-gcutil:查看堆内存占用和回收情况。
-gccause:查看最近一次垃圾回收原因。
(4)如果堆内存持续占用率很高,查看堆内存内对象情况
jmap-histo pid
(5)如果向查看更多信息,在cmd里运行jstat查看jstat的其他参数。
(6)更多的资料信息,请上网查询查找。
3 附录
(1)jstat
–gccapacity 输出结果
(2)jstat
–util 输出结果
(3)jstat
–gccause
(4)jstat
–gc
本系列包括:
JVM性能调优1:JVM性能调优理论及实践(收集整理)
JVM性能调优2:JVM性能调优参数整理
JVM性能调优3:JVM_堆溢出分析过程和命令
JVm性能调优4:GC日志分析
JVM性能调优5:Heap堆分析方法
1 查看JVM状态信息jstat命令格式
jstat-option -t -h num pid interval count
-option:参数
-t打印收集信息的时间
-h每num行打印一个head
pid监控的进程号
interval间隔多少毫秒采集一次信息
count一共采集多少次信息。
2 分析过程命令
(1)查看JVM启动参数和进程号
jps -mlvV
(2)看堆内存分配情况
jstat -gccapacity -t -h 5 2808
100 10
(3)看垃圾回收情况
jstat -gcutil -t -h 5 2808
100 10
jstat -gccause -t -h 5 2808
100 10
-gcutil:查看堆内存占用和回收情况。
-gccause:查看最近一次垃圾回收原因。
(4)如果堆内存持续占用率很高,查看堆内存内对象情况
jmap-histo pid
(5)如果向查看更多信息,在cmd里运行jstat查看jstat的其他参数。
(6)更多的资料信息,请上网查询查找。
3 附录
(1)jstat
–gccapacity 输出结果
Column | Description |
NGCMN | Minimum new generation capacity (KB). |
NGCMX | Maximum new generation capacity (KB). |
NGC | Current new generation capacity (KB). |
S0C | Current survivor space 0 capacity (KB). |
S1C | Current survivor space 1 capacity (KB). |
EC | Current eden space capacity (KB). |
OGCMN | Minimum old generation capacity (KB). |
OGCMX | Maximum old generation capacity (KB). |
OGC | Current old generation capacity (KB). |
OC | Current old space capacity (KB). |
PGCMN | Minimum permanent generation capacity (KB). |
PGCMX | Maximum Permanent generation capacity (KB). |
PGC | Current Permanent generation capacity (KB). |
PC | Current Permanent space capacity (KB). |
YGC | Number of Young generation GC Events. |
FGC | Number of Full GC Events. |
–util 输出结果
Column | Description |
S0 | Survivor space 0 utilization as a percentage of the space's current capacity. |
S1 | Survivor space 1 utilization as a percentage of the space's current capacity. |
E | Eden space utilization as a percentage of the space's current capacity. |
O | Old space utilization as a percentage of the space's current capacity. |
P | Permanent space utilization as a percentage of the space's current capacity. |
YGC | Number of young generation GC events. |
YGCT | Young generation garbage collection time. |
FGC | Number of full GC events. |
FGCT | Full garbage collection time. |
GCT | Total garbage collection time. |
–gccause
Column | Description |
LGCC | Cause of last Garbage Collection. |
GCC | Cause of current Garbage Collection. |
–gc
Column | Description |
S0C | Current survivor space 0 capacity (KB). |
S1C | Current survivor space 1 capacity (KB). |
S0U | Survivor space 0 utilization (KB). |
S1U | Survivor space 1 utilization (KB). |
EC | Current eden space capacity (KB). |
EU | Eden space utilization (KB). |
OC | Current old space capacity (KB). |
OU | Old space utilization (KB). |
PC | Current permanent space capacity (KB). |
PU | Permanent space utilization (KB). |
YGC | Number of young generation GC Events. |
YGCT | Young generation garbage collection time. |
FGC | Number of full GC events. |
FGCT | Full garbage collection time. |
GCT | Total garbage collection time. |
相关文章推荐
- LoadRunner 使用过程中问题及解决办法记录
- [Android算法] bitmap 将图片压缩到指定的大小
- STL--set
- 程序员装逼利器之impress.js
- Logos语法解析
- 翼龙贷——优化经验分享
- [老文章搬家] 插件化软件设计的头疼问题以及可能的解决思路
- DOS批处理中%cd%和%~dp0的区别
- 开源学习地址
- Maven项目启动报错
- python官方文档
- python官方文档
- 排序
- OC语言8-点语法和变量作用域
- ios开发中的常见问题和解决以及总结
- logistic回归和Python实现
- JavaScript 回调函数
- Vim编辑器基本操作命令
- java的对象-》jason-》String-》byte数组的转化方法。
- Hibernate关联映射基于注解