-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[improve][monitor] Rename "GC Pauses" to "GC Time" in Pulsar JVM dashboards #18891
Conversation
- source metric is not about GC pauses. - the source metric is "jvm_gc_collection_seconds_sum" which is not the same as "GC pause" - The metric is defined in Prometheus Java client - "Time spent in a given JVM garbage collector in seconds." - source code is https://github.com/prometheus/client_java/blob/e68daf23336eb5de7856df406eb1d497f51ad3be/simpleclient_hotspot/src/main/java/io/prometheus/client/hotspot/GarbageCollectorExports.java#L53 - calls GarbageCollectorMXBean.getCollectionTime() - Javadoc https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/GarbageCollectorMXBean.html#getCollectionTime() "Returns the approximate accumulated collection elapsed time in milliseconds." - Stackoverflow Q&A: https://stackoverflow.com/a/44686539
There's also a metric for GC Pauses in Pulsar. The metric name is jvm_full_gc_pause. pulsar/pulsar-common/src/main/java/org/apache/pulsar/common/stats/JvmDefaultGCMetricsLogger.java Lines 93 to 94 in 52d8fe0
It uses total safepoint time metric under the covers, pulsar/pulsar-common/src/main/java/org/apache/pulsar/common/stats/JvmDefaultGCMetricsLogger.java Line 124 in 4dcb166
It's a bit misleading to call it "full gc" since it's more than full gc. More details in https://blanco.io/blog/jvm-safepoint-pauses/ |
Codecov Report
@@ Coverage Diff @@
## master #18891 +/- ##
============================================
- Coverage 46.17% 43.31% -2.86%
+ Complexity 10359 8404 -1955
============================================
Files 703 597 -106
Lines 68845 56863 -11982
Branches 7382 5902 -1480
============================================
- Hits 31788 24632 -7156
+ Misses 33448 29422 -4026
+ Partials 3609 2809 -800
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Change jvm dashboard labels to be more accurate. See also: apache/pulsar#18891
Motivation
Modifications
Replace "GC Pauses" with "GC Time" in Grafana JVM dashboards.
Documentation
doc
doc-required
doc-not-needed
doc-complete