prometheus / prometheus/node_exporter

optimize cpufreq collector for multithreaded physical cores

Open
#1,517 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement platform/Linux
Dominant language
Go
Stars
13.8k
Forks
2.7k
Avg merge
1d 23h
Merged PRs (30d)
8

Description

(enhancement)

A proposal for performance improvement at the node_exporter cpufreq collector. The frequencies for each "CPU" are read always, despite of having multiple threads running on the same physical core (aka "hyperthreading").

If two CPUs share the same physical core, they share the frequency information. It would be possible to just copy the info instead of reading sysfs for both, based on the topology info and the thread siblings list. The only fields that come to my mind which are different, based on what I've seen, would be SystemCPUCpufreqStats Name and RelatedCpus.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the node_exporter cpufreq collector and inspect how it reads per-CPU sysfs data. Compare that flow with the topology information and thread-siblings list, while preserving the distinct SystemCPUCpufreqStats Name and RelatedCpus fields. Done means avoiding duplicate frequency reads for CPUs sharing a physical core without changing the reported metrics.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, linux
Domain
operating-systems, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.