About JMX's performance when read kafka MBeans

120 views
Skip to first unread message

Matheus Lino de Freitas

unread,
Nov 22, 2022, 4:31:08 PM11/22/22
to Prometheus Developers
Hi,

We are using jmx exporter to scrape metrics from Kafka's MBeans.
Turns out that because we capture lots of metrics and the exporter is single threaded, it takes too long to scrape.
I'm thinking of paralellizing the scrapper to boost the exporter's performance.
Any thoughts, ideas, does anyone tried this before?

Doug Hoard

unread,
Apr 24, 2023, 8:57:08 AM4/24/23
to Prometheus Developers
Matheus,

Late reply... Have you done any work/testing? My initial tests show improvements but at the cost of the creation of substantial threads.

---

I tested multi-threading this code...


results...

MBean processing threads = 1

- jmx_scrape_duration_seconds 18.950623706

MBean processing threads = 10

- jmx_scrape_duration_seconds 14.159571088 (25.28% decrease in scrape time)

MBean processing threads = 100

- jmx_scrape_duration_seconds 12.424207296 (34.44% decrease in scrape time)

---

Given that there is a default of 5 threads in the exporter, using 100 MBean processing threads would result in a potential for 500 threads to be created by the exporter alone! (not good.)
Reply all
Reply to author
Forward
0 new messages