jstat参数的具体含义: YGCT FGCT GCT

Specific meanings of jstat parameters : YGCT FGCT GCT

我需要使用jstat 来测量程序的一些GC 参数。 Jstat提供了一组参数(S0C S1C S0U S1U EC EU OC OU MC MU CCSC CCSU YGC YGCT FGC FGCT GCT) 我对 YGCT、FGCT 和 GCT 的描述有些困惑。

(YGCT年轻代垃圾回收时间。
FGCT 完整垃圾收集时间。
GCT 总垃圾收集时间。)

我有 2 个问题。

1) 这三个参数(YGCT、FGCT和GCT)实际测量的是什么?一个小的比较会很有帮助

2) 我怎么知道他们提到的时间单位? (毫秒/秒/....)

我参考了许多文档,包括

Interpreting jstat results
http://www.cubrid.org/blog/dev-platform/how-to-monitor-java-garbage-collection/
http://docs.oracle.com/javase/6/docs/technotes/tools/share/jstat.html#output_options
但是这些并没有回答我真正的问题。
任何有 jstat 经验的人都可以帮我解决这个问题吗?

谢谢。

  • YGCT - 自 JVM 以来在年轻代集合中花费的秒数 开始
  • FGCT - 自 JVM 已启动
  • GCT - 上述两个值之和

这些知识来自经验和测试 - 我没有找到定义时间单位和确切含义的好参考。

    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.

FGCT +YGCT = GCT
FGCT /FGC = avg time taken per full gc cycle 
YGCT / YGC = avg time taken per each young GC

这些在处理 GC 统计信息时很有用。