GC工具

  1. jstat -gc
    S0CS1CS0US1UECEUOCOUPCPUYGCYGCTFGCFGCTGCT
    43136.043648.033153.90.043776.021516.2230208.0159622.8167296.097949.0540.74361.8182.561

  2. jstat -gcutil
    S0S1EOPYGCYGCTFGCFGCTGCT
    76.860.0049.1569.3458.55540.74361.8182.561
  3. jstat -gccause
    S0S1EOPYGCYGCTFGCFGCTGCTLGCCGCC
    4.360.0024.8283.7759.00560.77861.8182.597unknown GCCauseNo GC
  4. jmap -heap
    Attaching to process ID 6313 , please wait...
    Debugger attached successfully.
    Server compiler detected.
    JVM version is 20.6 -b01
     
    using thread-local object allocation.
    Parallel GC with 8 thread(s)
     
    Heap Configuration:
        MinHeapFreeRatio = 40
        MaxHeapFreeRatio = 70
        MaxHeapSize      = 402653184 ( 384 .0MB)
        NewSize          = 1310720 ( 1 .25MB)
        MaxNewSize       = 17592186044415 MB
        OldSize          = 5439488 ( 5 .1875MB)
        NewRatio         = 2
        SurvivorRatio    = 8
        PermSize         = 21757952 ( 20 .75MB)
        MaxPermSize      = 268435456 ( 256 .0MB)
     
    Heap Usage:
    PS Young Generation
    Eden Space:
        capacity = 44826624 ( 42 .75MB)
        used     = 22032640 ( 21 .011962890625MB)
        free     = 22793984 ( 21 .738037109375MB)
        49.1507903874269 % used
    From Space:
        capacity = 44171264 ( 42 .125MB)
        used     = 33949608 ( 32 .376869201660156MB)
        free     = 10221656 ( 9 .748130798339844MB)
        76.85903668049889 % used
    To Space:
        capacity = 44695552 ( 42 .625MB)
        used     = 0 ( 0 .0MB)
        free     = 44695552 ( 42 .625MB)
        0.0 % used
    PS Old Generation
        capacity = 235732992 ( 224 .8125MB)
        used     = 163453776 ( 155 .8816680908203MB)
        free     = 72279216 ( 68 .93083190917969MB)
        69.33852347659509 % used
    PS Perm Generation
        capacity = 171311104 ( 163 .375MB)
        used     = 100301240 ( 95 .65471649169922MB)
        free     = 71009864 ( 67 .72028350830078MB)
        58.549176123457826 % used
  5. jmap -histo
    num     #instances         #bytes  class name
    ----------------------------------------------
        1 :        750317       56395560  [C
        2 :        129895       21499600  <constMethodKlass>
        3 :         83179       21015088  [I
        4 :        129895       17699800  <methodKlass>
        5 :         12505       15631136  <constantPoolKlass>
        6 :        459347       14699104  java.lang.String
        7 :        224473       12661344  <symbolKlass>
        8 :        382084       12226688  java.util.HashMap$Entry
        9 :         18654       10661752  [B
       10 :         12505       10024032  <instanceKlassKlass>
        .            .            .         .
        .            .            .         .
        .            .            .         .
    Total       4315507      315914176
  6. jmap -dump:live,file=dump.bin,format=b,生成一个二进制文件,使用MemoryAnalyzer打开进行分析
解释
  1. 缩写解释
    S0C当前survivor space 0 的容量 (KB).
    S1C当前survivor space 1 的容量 (KB).
    S0Usurvivor space 0 使用量 (KB).
    S1Usurvivor space 1 使用量 (KB).
    EC当前eden space 的容量 (KB).
    EUeden space 使用量 (KB).
    OC当前old space 的容量 (KB).
    OUold space 使用量 (KB).
    PC当前permanent space 的容量 (KB).
    PUpermanent space 使用量 (KB).
    YGCyoung generation gc 事件的次数
    YGCTyoung generation gc 事件的时间
    FGCfull gc 事件的次数
    FGCTfull gc事件的时间
    GCT整个gc事件的时间
  2. 缩写解释
    S0survivor space 0 使用的比例
    S1survivor space 1 使用的比例
    EEden space使用的比例
    OOld space 使用的比例
    PPermanent space使用的比例
    LGCC上次gc的原因
    GCC当前gc的原因

转载于:https://www.cnblogs.com/excite/p/4745090.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值