Closed kamalkrbh closed 2 years ago
As per analysis, export_temp_info() function in exporter.py is consuming significant time, without this metric exported all other metrics are exported in ~1 sec. But with temp_info overall time significantly increases to ~17 secs. Introducing multi threaded implementation doesn't seems to solve the problem. Need to further analyse the implementation of export_temp_info().
Corrected placement of export_hwmon_temp_info, it was misplaced causing nested loop execution and costing execution time. Also introduced threadpool of 10 threads for metric collection. Metric collection takes ~2 secs now.
On slow systems scrap gets timed out and scrap_timeout of prometheus need to be configured to be big enough to fill all the metrics. A multithreaded metric will be more performant on exporter side.