頻繁 full gc 處理方式

原文地址
線上服務 full gc 時,使用下面方式查詢問題

  1. jmap -dump:live,format=b,file=dump.hprof XXXX 其中 XXX 爲進程號

  2. wget http://ftp.jaist.ac.jp/pub/eclipse/mat/1.9.1/rcp/MemoryAnalyzer-1.9.1.20190826-linux.gtk.x86_64.zip

    1. 修改配置參數,按需要修改使用內存大小
    -startup
        plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
        --launcher.library
        plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.v20110505
        -vmargs
        -Xms16g
        -Xmx16g
    
  3. ./ParseHeapDump.sh ../today_heap_dump/dump.hprof org.eclipse.mat.api:suspects

    1. 還可以使用另外兩個 參數
    2. org.eclipse.mat.api:overview
    3. org.eclipse.mat.api:top_components
  4. 最後,命令執行的結果裏面,會有一個壓縮文件,down 下來,就可以分析問題原因了

發佈了106 篇原創文章 · 獲贊 49 · 訪問量 33萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章