-
Notifications
You must be signed in to change notification settings - Fork 934
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
Reported CPU usage is confusing #1194
Comments
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/149996510 The labels on this github issue will be updated when the story is started. |
Hi @CAFxX Thanks for this feedback. Red in CLI output is reserved for errors that warrant user attention. I don't see how a usage of >100% due to best-effort resources require attention? Regards, |
I'm not sure what should we document exactly... The point I'm trying to make is that the CPU usage number right now is not very useful from a user perspective and that we should replace it with something more actionable. Put it otherwise, this is not a documentation bug. (if I really have to answer the question about where to put the documentation: I think I would argue that the most discoverable place for such documentation is
Because an application that is routinely using over 100% capacity definitely needs scaling up/out or it is at risk of failing when the best-effort resources become unavailable for factors completely outside the application itself (e.g. because a different application on the same cell starts spinning).
This may not be an "error" but as I argued above it should definitely warrant not just user attention but likely user action (scale out/up). In any case red was just a suggestion, the point is that it should be highlighted to suggest that it warrants user attention/action.
This is a long standing issue with the CF project. When something as big as a user story (e.g. this ticket) is reported it normally doesn't include in its scope a single component (e.g. only cli or only capi) but rather many components (e.g. in this case probably at least cli and capi, maybe diego as well). But AFAIK there's no single issue tracker that can be used for this, so we're forced to open the issue, at least at first, on a somewhat arbitrary component (normally the one where the problem "surfaces" the most). So yes, eventually this will have to propagate also to capi and likely beyond. But if we don't agree that the issue is also in the CLI (again, mostly because it's where it's more likely to surface) then there's no point in opening the corresponding issues in the other components. |
Updated the "what to expect" section to make it clear that "over 100%" refers to the allocated quota discussed beforehand, not about the currently displayed number |
I think I understand the issue(s), but not sure how to proceed. I don't have any stats on how/whether users refer to the cpu stats. |
Adding a link to this thread for additional context: https://lists.cloudfoundry.org/g/cf-dev/topic/16273332 |
The Garden team (container runtime) have started work on a track which will:
You can check out our progress in our tracker by searching for the |
Hi @Callisto13 @julz please could you provide a update to this issue? Thanks. |
Hi @abbyachau From cf-deployment v3.6.0 (garden-runc-release 1.16.3) operators can deploy with From cf-deployment v7.8.0 (garden-runc-release 1.19.0), having deployed with the same ops file mentioned above, CLI users can install the CPU Entitlement Plugin to get accurate CPU metrics for their apps. Please note that this is all still highly experimental and the user experience could yet change. |
Thanks @Callisto13! Appreciate the update. @CAFxX if you are not already and are able to update to the aforementioned version of |
I'll defer to @giner as, unfortunately, I'm not working on CF anymore. |
I think the request was intended for @giner. Thanks |
With the GA of the v7 CLI, we're no longer actively developing against the v6 line. With an interest the overall hygiene of the CLI project we're closing this issue. |
@heyjcollins hi, is percentage in v7 in a range [0,100] or [0, cores*100] and is it relative to assigned CPU quota to an app? |
The cli reports whatever CAPI https://v3-apidocs.cloudfoundry.org/version/3.86.0/index.html#the-process-stats-object reports back to us. You may want to reach out CAPI for more insights https://cloudfoundry.slack.com/archives/C07C04W4Q |
@heyjcollins I don't believe this should have closed with V7 |
@univ0298 I think what Josh is trying to say is that the CF CLI displays an unmodified version of what the CF [V3] API provides. In general, the CF CLI should not modify the contents of that data when presenting it to the user. If an adjustment should be made, then it should be done on the API side so it will be consistent with all API clients for the foundation. So it's better to file a ticket against the Cloud Controller instead of the CLI. |
+1 for the issue. It's is especially unfortunate given how long the issue has been raised, and still not addressed. |
Command
cf app my_app
What occurred
The CPU usage is displayed as percentage, but nowhere it's defined what the percentage refers to. Users are puzzled by this, they often assume that the range is [0,100]%, whereas in reality, the range is [0,cores*100] where cores is a number they have no real visibility/control over since it's operator-defined.
In addition, this number does not reflect the CPU quotas at all, so whether e.g. "25%" means the application has a lot of idle resources or it is actually CPU-starved depends on:
This means that currently the displayed CPU usage is basically not "actionable" at all, i.e. it doesn't tell users much about what's going on inside their application.
Extreme example of this: two instances with CPU usage that should have the same CPU usage because they handle the same workload:
Which instance is working correctly? Which one is not?
What you expected to occur
CPU usage should be relative to the CPU quotas assigned to the container: 100% should, therefore, map to "100% of the allocated quota". (alternatively: the allocated CPU quota should be reported together with CPU usage, similarly as is done for memory and disk)
Instances running over 100% of the allocated quota should be highlighted in red because they are using best-effort resources that are not guaranteed to be available. User documentation should be updated to make this clear.
CLI Version
6.29.0
CC API Endpoint Version
2.74
The text was updated successfully, but these errors were encountered: