danielqsj / kafka_exporter

Kafka exporter for Prometheus
Apache License 2.0
2.16k stars 607 forks source link

升级到1.4.2版本后,进程cpu使用率涨了一倍 #270

Open yuyivic opened 2 years ago

yuyivic commented 2 years ago

将kafka_exporter版本从1.3.0升级到1.4.2,在相同topic数量1000个的情况下,cpu使用率从20%左右涨到了40%左右,几乎是涨了一倍。

升级前: app 2517 19.6 0.5 787600 48192 ? Ssl 16:28 0:44 /usr/local/prometheus/kafka_exporter/kafka_exporter --kafka.server=10.10.1.1:9092 --kafka.server=10.10.1.2:9092 --kafka.server=10.10.1.3:9092 --topic.filter=^[A-Za-z0-9]. 升级后: app 6543 41.9 0.6 718892 53520 ? Ssl 16:37 0:54 /usr/local/prometheus/kafka_exporter/kafka_exporter --kafka.server=10.10.1.1:9092 --kafka.server=10.10.1.2:9092 --kafka.server=10.10.1.3:9092 --topic.filter=^[A-Za-z0-9].

danielqsj commented 2 years ago

You can try to set topic.workers as 1, then observe the cpu usage