性能调优-内存泄露的排查方法
source link: https://mikeygithub.github.io/2022/09/01/yuque/qmcirn/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
性能调优-内存泄露的排查方法 - 麦奇
272 字
3 分钟
4 次
image.png
内存泄露的定义
内存泄漏(Memory Leak)是指程序中已动态分配的堆内存由于某种原因程序未释放或无法释放,造成系统内存的浪费,导致程序运行速度减慢甚至系统崩溃等严重后果。
top 命令查看服务器负载
jstack
利用 jstack -l 查看那些 cpu 使用率过高的线程,看是否大多数是 gc 线程,如果是说明 gc 过于频繁,而且耗时过长,导致应用线程被挂起,无法响应客户端发来的请求,这种情况就应该是内存泄露的问题了。
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK