prometheus / prometheus/node_exporter
cpufreq collector is useless
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 13.8k
- Forks
- 2.7k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 8
Description
Host operating system: output of uname -a
Linux vivo 5.10.103 #1-NixOS SMP Wed Mar 2 10:42:57 UTC 2022 x86_64 GNU/Linux
node_exporter version: output of node_exporter --version
node_exporter, version 1.2.2 (branch: unknown, revision: v1.2.2)
build user: nix@nixpkgs
build date: unknown
go version: go1.16.13
platform: linux/amd64
node_exporter command line flags
--collector.textfile --collector.textfile.directory /run/prometheus-node-exporter --collector.systemd --collector.systemd.unit-exclude='.+\\.(automount|device|scope|slice)' --collector.diskstats.ignored-devices='^(ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\\d+n\\d+p|mmcblk\\d+p)\\d+$|^zd' \
--no-collector.ipvs --no-collector.schedstat --no-collector.mdadm --no-collector.nfsd --no-collector.bonding --no-collector.infiniband --no-collector.nfs --no-collector.rapl --no-collector.fibrechannel --no-collector.tapestats --no-collector.nvme \
--web.listen-address 0.0.0.0:9100
Are you running node_exporter in Docker?
no
What did you do that produced an error?
Looked at the node_cpu_scaling_frequency_hertz metric over time
What did you expect to see?
Representative statistics about CPU frequency
What did you see instead?
Plateaus of high CPU frequency whenever the system is mostly idle.
I suspect that this is because the "boost" frequencies are thermally viable and thus used for the time in which the node exporter is doing its business only when the system is otherwise idle. In other words, the sampling is ineffective because of its own side effects.
Requiring CONFIG_CPU_FREQ_STAT and exporting counters for time_in_state and potentially also trans_table would probably make a lot more sense to see what frequencies the CPU is really running at most of the time. See also the docs for cpufreq-stats: https://www.kernel.org/doc/html/latest/cpu-freq/cpufreq-stats.html
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the cpufreq collector and the linked Linux cpufreq-stats documentation. Investigate whether time_in_state and trans_table can provide representative frequency statistics instead of sampling node_exporter's own activity. Done should include a defined metric approach and validation that idle-system observations no longer produce misleading frequency plateaus.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, linux
- Domain
- observability, operating-systems, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100