-
-
Notifications
You must be signed in to change notification settings - Fork 449
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
[Regression in 3.2.1] Wrong CPU threads are shown when running in a container #1195
Comments
Can you please provide a |
ok, that cpuinfo only has 16 "processors" so we need to find a way to identify which real cores are the active ones. Can you please upload a |
Sure thing |
Ofc, the individual /cpu*/online are all "1" despite LXC configured to not use them |
@C0rn3j / @BenBE*: If you add the "PROCESSOR" column to Trying to find out what LXC munges and what not. *BenBE said on IRC they run LXC somewhere in production as well |
Couldn't test myself yet, but from the screenshot this looks like the physical core id, not some logical re-ordering. |
Thanks @C0rn3j. So LXC sees the "true" CPU IDs from the host. Which means we should probably revert the hack from 0d53245. Which means 2 core LXC containers on a 128 core host system, see 126 offline CPUs. Not nice but more correct. May be as a second step we should extend the CPUMeter with an option to hide non-active CPUs?!? |
Possibly with the extension I remarked in IRC to "remember" which notes have been seen, so systems with their full 128 cores would still see all the nodes while some go offline in idle. Otherwise this might cause quite some flicker on systems with many CPUs/nodes that have energy saving active. |
LXC shows the real host CPU ids but can be limited in configuration as to which cores are used. Still the sysfs files are visible and the CPUs (stay) marked online. We will need to parse /sys/devices/system/cpu/online to follow LXC's logic. Revert for now until we can come up with a better handling of the LXC hacks. Cf. issue htop-dev#1195 Essentially reverting 33973f7 and 0d53245 (htop-dev#993, htop-dev#995)
Please try the PR from #1197. This should revert to LXC showing all CPU meters. |
LXC shows the real host CPU ids but can be limited in configuration as to which cores are used. Still the sysfs files are visible and the CPUs (stay) marked online. We will need to parse /sys/devices/system/cpu/online to follow LXC's logic. Revert for now until we can come up with a better handling of the LXC hacks. Cf. issue #1195 Essentially reverting 33973f7 and 0d53245 (#993, #995)
I have a host server with 48 threads running a container using LXC 5.0.2 where I am executing htop.
This container has the following LXC config set:
limits.cpu: "16"
, meaning it gets assigned 16 random threads.htop 3.0.5 shows the threads and their usage correctly:
htop 3.1.0 to 3.2.0 show things correctly while showing the unused host CPU threads too:
htop 3.2.1 to 3.2.2 however seem to show completely wrong threads by simply showing threads 1 to 16 as they go in order, irrelevant of the actual assignment. This is obvious when comparing against the previous screenshot.
The text was updated successfully, but these errors were encountered: