You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/05/21 07:39:01 UTC

[GitHub] [pulsar] lhotari commented on issue #10654: [Performance] Prometheus client causes allocation overhead by creating exceptions

lhotari commented on issue #10654:
URL: https://github.com/apache/pulsar/issues/10654#issuecomment-845732499


   There seems to be a design issue in how org.apache.pulsar.broker.stats.DimensionStats is implemented. What happens it that for each call to the getDimensionX methods, all samples are collected for all Prometheus client collectors and filtered. 
   
   https://github.com/prometheus/client_java/blob/8fcc7bc03dfbabd0c15776640d5fe52942aa9309/simpleclient/src/main/java/io/prometheus/client/CollectorRegistry.java#L258-L274
   
   The javadoc of getSampleValue method states: "This is inefficient, and intended only for use in unittests.".
   
   This is amplifying the performance issue in the Prometheus client's hotspot.StandardCollector implementation.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org