dzcxzl created HADOOP-20092:
-------------------------------

             Summary: GcTimeMonitor and JvmPauseMonitor should skip ZGC 
concurrent cycle beans
                 Key: HADOOP-20092
                 URL: https://issues.apache.org/jira/browse/HADOOP-20092
             Project: Hadoop Common
          Issue Type: Improvement
            Reporter: dzcxzl


HADOOP-19371 made JvmMetrics skip the ZGC "Cycles" GarbageCollectorMXBeans
("ZGC Cycles", and "ZGC Minor Cycles" / "ZGC Major Cycles" with generational
ZGC). These beans report the duration of concurrent GC cycles, not
stop-the-world pauses (see JDK-8265136). Only the "Pauses" beans reflect time
the JVM was actually paused.

Two other GC monitors in hadoop-common still add up all GC beans:

* GcTimeMonitor sums getCollectionTime() / getCollectionCount() over every
  bean. With ZGC, GcTimePercentage is heavily overstated. Its javadoc defines
  it as the percentage of time the JVM is paused in GC. The NameNode uses this
  monitor, and JvmMetrics exports the value, so overstated values can cause
  spurious alerts.
* JvmPauseMonitor lists per-pool GC times in its "Detected pause in JVM or host
  machine" log message. The list includes the ZGC Cycles pools, which is
  misleading when diagnosing pauses.

Proposed fix: move the existing check from JvmMetrics into a shared static
method, JvmPauseMonitor#isConcurrentCycleBean, and use it in JvmMetrics (no
behavior change), GcTimeMonitor and JvmPauseMonitor.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to