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... https://github.com/prometheus/jmx_exporter/blob/74d23d77cd2404c8cb59720f983b836400b8c43e/collector/src/main/java/io/prometheus/jmx/JmxScraper.java#L116-L120 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.) On Tuesday, November 22, 2022 at 4:31:08 PM UTC-5 Matheus Lino de Freitas wrote: > 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? > -- You received this message because you are subscribed to the Google Groups "Prometheus Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-developers/d1a73def-27d9-404e-825f-9826d1da21bfn%40googlegroups.com.

