node_exporter icon indicating copy to clipboard operation
node_exporter copied to clipboard

hwmon and so node_exporter very slow with a lot of DS18b20 sensors (taking ~22 seconds to complete)

Open JsBergbau opened this issue 3 years ago • 2 comments

Host operating system: output of uname -a

Linux hostname 5.10.17-v7+ #1414 SMP Fri Apr 30 13:18:35 BST 2021 armv7l GNU/Linux

node_exporter version: output of node_exporter --version

node_exporter, version 1.3.1 (branch: HEAD, revision: a2321e7b940ddcff26873612bccdf7cd4c42b6b6) build user: root@2efabfa20624 build date: 20211205-11:09:40 go version: go1.17.3 platform: linux/arm

node_exporter command line flags

./node-exporter with no flags

Are you running node_exporter in Docker?

No

What did you do that produced an error?

attached 23 DS18b20 1-Wire sensors to RasbperryPI

What did you expect to see?

node-exporter reporting the metrics very fast

What did you see instead?

It takes about 22 seconds until request to http://<IP>:9100/metrics is completed.

When running node-exporter with ./node_exporter --no-collector.hwmon then request is done in less than one second, as it should. You can query the DS180b20 sensors in parallel, so query time is about one second. I use this in a python script via asyncio and works very well. Also I'd like the idea to disable querying the DS18b20 for hwmon collector, if that is somehow possible.

JsBergbau avatar Dec 08 '21 23:12 JsBergbau

Adding a flag to include/exclude sensors makes sense.

Not sure if parallelizing this is worth it, but given we already do it for mount point it's probably fine.

discordianfish avatar Dec 09 '21 10:12 discordianfish

Ability to disable certain chips or sensors would be great as some sensors are inherently broken and report nonsensical values. Currently we use silences as a workaround.

PSSGCSim avatar Aug 05 '22 14:08 PSSGCSim