JVM调优心得

jps -l 查看java进程
 
jstat 统计信息  类装载、垃圾收集统计信息、JIT    -----   jstat -gc   jstat -compliler   jstat -class
 
非堆:mataspace(方法区) , codecache
 
内存溢出自动导出 -XX:+HeapDumpOutOfMemoryError
手动导出: jmap -dump:format=b,file=1.bin
jmap -heap 内存使用
 
top -p xxx -H / top -Hp xx 查看进程内CPU占用最高的线程
 
MAT 分析 堆转储,histogram 定位代码。
 
jmap -histo xxx 可以命令行查看对象占用排名。
原文地址:https://www.cnblogs.com/hansc-blog/p/9425154.html