Skip to content

[improve][monitor] Rename "GC Pauses" to "GC Time" in Pulsar JVM dashboards - #18891

Merged
lhotari merged 1 commit into
apache:masterfrom
lhotari:lh-rename-gc-pauses-to-gc-time
Dec 16, 2022
Merged

lhotari merged 1 commit into
apache:masterfrom
lhotari:lh-rename-gc-pauses-to-gc-time

Conversation

@lhotari

@lhotari lhotari commented Dec 12, 2022

Copy link
Copy Markdown
Member

Motivation

Modifications

Replace "GC Pauses" with "GC Time" in Grafana JVM dashboards.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

- 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
@lhotari lhotari added this to the 2.12.0 milestone Dec 12, 2022
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Dec 12, 2022
@lhotari

lhotari commented Dec 12, 2022

Copy link
Copy Markdown
Member Author

There's also a metric for GC Pauses in Pulsar. The metric name is jvm_full_gc_pause.
Here's the implementation:

metrics.put("jvm_full_gc_pause", currentFullGcTime);
metrics.put("jvm_full_gc_count", currentFullGcCount);

It uses total safepoint time metric under the covers,

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-commenter

codecov-commenter commented Dec 12, 2022 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.05%. Comparing base (3180a4a) to head (61c209c).
⚠️ Report is 3148 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #18891      +/-   ##
============================================
- Coverage     46.17%   43.05%   -3.12%     
+ Complexity    10359     9469     -890     
============================================
  Files           703      677      -26     
  Lines         68845    66615    -2230     
  Branches       7382     7138     -244     
============================================
- Hits          31788    28681    -3107     
- Misses        33448    34556    +1108     
+ Partials       3609     3378     -231     
Flag Coverage Δ
unittests 43.05% <ø> (-3.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 111 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tisonkun tisonkun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@lhotari
lhotari merged commit 56ad217 into apache:master Dec 16, 2022
lifepuzzlefun pushed a commit to lifepuzzlefun/pulsar that referenced this pull request Jan 10, 2023
@lhotari lhotari mentioned this pull request Jun 7, 2024
1 of 2 tasks
pgier added a commit to datastax/kaap that referenced this pull request Jun 25, 2024
Change jvm dashboard labels to be more accurate.
See also: apache/pulsar#18891
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs ready-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants