chaijunjie0101 commented on PR #7406: URL: https://github.com/apache/hadoop/pull/7406#issuecomment-2680168151
> Sorry, the PR title is misleading, I think the current trunk code could report "Total GC Count" and "Total GC time in milliseconds" correctly for Generational ZGC without this patch, and the implementation does not look correct to me. > > Minor and Major GC are quite common concepts for GC, not specific to ZGC, for example, the [Spark docs](https://spark.apache.org/docs/latest/monitoring.html) say: > > > .MinorGCCount - Total minor GC count. For example, the garbage collector is one of Copy, PS Scavenge, ParNew, G1 Young Generation and so on. > > .MajorGCCount - Total major GC count. For example, the garbage collector is one of MarkSweepCompact, PS MarkSweep, ConcurrentMarkSweep, G1 Old Generation and so on. hi, thanks reviwing~ I used JDK 21(https://gitee.com/openeuler/bishengjdk-21), you are right, but for different GC, **has different bean name** for minor/Major GC, I just found Generational ZGC use MajorGC/MinorGC directly, but for example CMS GC: jmx["java.lang:type=GarbageCollector,name=ParNew","CollectionCount"] jmx["java.lang:type=GarbageCollector,name=ParNew","CollectionTime"] jmx["java.lang:type=GarbageCollector,name=ConcurrentMarkSweep","CollectionCount"] jmx["java.lang:type=GarbageCollector,name=ConcurrentMarkSweep","CollectionTime"] ParNew likely Minor GC, ConcurrentMarkSweep likely Major GC, but I do not why they not use same bean name like "MajorGC", maybe some diiferent here? when I test on JDK21, I just want get a more refined GC time to adjust Youg/Old memory size, since ZGC provides them(Major/Minor), we could fetch them... you means we no need it, or need to support all GC's "MajorGC/MinorGC", but it may be difficult, the JDK not define a common metric for them? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
