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

CPU utilisation figure for Pod is not cumulative #1336

Closed
poVoq opened this issue Jul 5, 2023 · 3 comments · Fixed by #1889
Closed

CPU utilisation figure for Pod is not cumulative #1336

poVoq opened this issue Jul 5, 2023 · 3 comments · Fixed by #1889
Labels
bug Something isn't working

Comments

@poVoq
Copy link

poVoq commented Jul 5, 2023

The large CPU utilisation figure for a Pod seems to display what looks like the highest current use by one of the included containers and not the cumulative CPU utilisation like it does for the RAM use of the Pod.

As CPU use by individual containers is already displayed below, it makes the Pod figure quite redundant, but a cumulative figure would be nice to have if the Pod includes many containers.

@poVoq poVoq added the enhancement New feature or request label Jul 5, 2023
@jelly
Copy link
Member

jelly commented Jul 6, 2023

Showing the CPU / Memory usage was a bit tricky for pods so we use the following solution:

https://github.com/cockpit-project/cockpit-podman/blob/main/src/Containers.jsx#L488

So we just show the highest CPU usage of the shown containers as adding up CPU usage might show > 100% which might be weird/unexpected.

@poVoq
Copy link
Author

poVoq commented Jul 6, 2023

IMHO, if it isn't cumulative, I would remove it completely as currently it is just redundant and misleading.

@martinpitt
Copy link
Member

Please don't use line refs on main (as these change all the time). This is stable:

// As podman does not provide per pod memory/cpu statistics we do the following:

I agree to this request -- the CPU usage should just be added up. It's correct to be > 100% on multi-CPU systems -- top shows "%CPUs" as > 100% all the time.

If that is a bother, podman could also normalize the number by dividing by nproc. But then this would need to happen for the per-container metrics as well. The latter already show > 100% numbers:

image

but that is an independent request.

@martinpitt martinpitt added bug Something isn't working and removed enhancement New feature or request labels Jul 17, 2023
tomasmatus added a commit to tomasmatus/cockpit-podman that referenced this issue Oct 21, 2024
tomasmatus added a commit that referenced this issue Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants