Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prometheus Difference jvm_gc_collection_seconds_sum and jvm_gc_pause_seconds

I found this article where GC Throughput is queried in Prometheus/Grafana as follows:

min by(job)(100 - (sum by (job, instance)(increase(jvm_gc_collection_seconds_sum[1m])) * 100 / sum by (job, instance) (increase(process_cpu_seconds_total[1m]))))

The author takes the metric besides others jvm_gc_collection_seconds_sum to compute GC Throughput. When I look to my Spring Boot Prometheus endpoint I do not find this metric but find instead jvm_gc_pause_seconds. It is stated:

 #HELP jvm_gc_pause_seconds Time spent in GC pause

Is there a difference between this two metrics?

Thanks a lot!

like image 986
Tobitor Avatar asked Oct 21 '25 20:10

Tobitor


1 Answers

jvm_gc_collection_seconds_sum

is a Prometheus client metric. Now Prometheus client is no more developed for Spring Boot 2.

jvm_gc_pause_seconds or jvm_gc_pause_seconds_sum

is a Micrometer client metric that is used in Spring Boot.

like image 87
Dmytro Danilenkov Avatar answered Oct 23 '25 11:10

Dmytro Danilenkov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!