'Specific meanings of jstat parameters : YGCT FGCT GCT

I need to use jstat to measure some GC parameters of a program. Jstat provides set of parameters ( S0C S1C S0U S1U EC EU OC OU MC MU CCSC CCSU YGC YGCT FGC FGCT GCT) From those I am bit confused with the descriptions for YGCT, FGCT and GCT.

(YGCT Young generation garbage collection time.
FGCT Full garbage collection time.
GCT Total garbage collection time.)

I have 2 questions.

1) What does these three parameters (YGCT, FGCT and GCT) actually measure? A small comparison would be very helpful

2) I how can I know the unit of time that they are mentioning? (milliseconds/ seconds/.... )

I referred many documentations including

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
But these does not answer my real question.
Could anyone how has experienced with jstat help me with this?

Thank you.



Solution 1:[1]

  • YGCT - Seconds spent in young generation collections since the JVM started
  • FGCT - Seconds spent doing full garbage collections since the JVM started
  • GCT - the sum of the above two values

This knowledge comes from experience and testing - I have not found a good reference defining the time unit and exact meaning.

Solution 2:[2]

    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

these are useful whenyou are dealing with GC stats.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Sithija Piyuman Thewa Hettige