Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic display of online CPUs in CPU meter #1198

Open
BenBE opened this issue Feb 25, 2023 · 2 comments
Open

Dynamic display of online CPUs in CPU meter #1198

BenBE opened this issue Feb 25, 2023 · 2 comments
Labels
needs-discussion 🤔 Changes need to be discussed and require consent new feature Completely new feature

Comments

@BenBE
Copy link
Member

BenBE commented Feb 25, 2023

This is a follow up to #993 / #995 / #1195 / #1197 aimed at systems with dynamic power management of CPU cores.

When a system has many cores and most of them are offline (e.g. due to power saving mode or because of containerization) these offline CPUs should be hidden while offline, but shown once first active (or recently active). An additional color coding similar to #74 / #241 might be added to indicate cores that recently became active or were recently disabled.

Basically, what is needed is:

  1. Track which cores have been seen online (and when)
  2. Hide cores that have not been online (recently)
  3. Implement some highlighting similar to Feature Request: Allow for marking of new/old entries #74 / Highlight new and old processes (#74) #241 for CPU cores that have recently changed their state (possibly with flapping detection when the state changes regularly)
  4. Create some configuration for this additional behavior as either an additional type of CPU meter OR as part of the normal CPU meters
  5. Better display CPU node hierarchy information (physical id, core id, apic id, core type re SMT/BIG.little)

/cc @fasterit

@BenBE BenBE added needs-discussion 🤔 Changes need to be discussed and require consent new feature Completely new feature labels Feb 25, 2023
@glaubitz
Copy link

As explained in my comment here, I think the main problem is that the Linux version of updateCPUcount() checks for available processors instead (equivalent to sysconf(_SC_NPROCESSORS_CONF)) while the Solaris version of that function checks for online processors by correctly using sysconf(_SC_NPROCESSORS_ONLN).

I would simply switch to using sysconf(_SC_NPROCESSORS_ONLN) on Linux as well instead of parsing through /sys.

@C0rn3j
Copy link
Contributor

C0rn3j commented Jan 31, 2024

@glaubitz That won't work as that will just reintroduce #1195 again, but worse, as commented on the PR draft that #1394 supersedes.
Either of the two PRs is not related to this issue, as neither PR actually hides the offline threads from the view, it's just about marking them offline correctly.

While this is being plumbed it would be nice to fix the terminology - CPU, socket, cores, threads, … - at least the linux Machine file has "cpu" used everywhere for threads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-discussion 🤔 Changes need to be discussed and require consent new feature Completely new feature
Projects
None yet
Development

No branches or pull requests

3 participants