Bug 1850270
| Summary: | UI reports different memory and cpu values compared to command line output | ||||||
|---|---|---|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Sam Yangsao <syangsao> | ||||
| Component: | Management Console | Assignee: | Andrew Pickering <anpicker> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | Yadan Pei <yapei> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 4.4 | CC: | anpicker, aos-bugs, jokerman, pkrupa, pweil, spadgett | ||||
| Target Milestone: | --- | Keywords: | Reopened | ||||
| Target Release: | 4.6.0 | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | No Doc Update | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2020-06-26 12:55:41 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Sam Yangsao
2020-06-23 20:45:02 UTC
Hi, requests and limits are different from actual usage. These values are not expected to be the same. Requests and limits tell k8s how much resources your pod needs so it can be placed on a node with enough resources available. These are set in the workload YAML and don't change. See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ The console is showing you actual usage for your running pod, which will be different from requests. (In reply to Samuel Padgett from comment #2) > Hi, requests and limits are different from actual usage. These values are > not expected to be the same. > Understood. > Requests and limits tell k8s how much resources your pod needs so it can be > placed on a node with enough resources available. These are set in the > workload YAML and don't change. See > https://kubernetes.io/docs/concepts/configuration/manage-resources- > containers/ > > The console is showing you actual usage for your running pod, which will be > different from requests. The confusing part here is we're seeing the percentage values from the `oc describe node ...` output. What do these correlate to? <snip> Namespace Name CPU Requests CPU Limits Memory Requests Memory Limits AGE --------- ---- ------------ ---------- --------------- ------------- --- [...] openshift-logging elasticsearch-cdm-1kapyvbj-3-7946bd6446-dsnp6 1100m (31%) 0 (0%) 16448Mi (71%) 16448Mi (71%) 14m **** HERE **** </snip> So 31% of 1100m is 341m, correct? Or should we be ignoring this value since it doesn't match up to actual usage in the UI. Thanks! Sorry, I missed that you were referring to the percentages. What CLI command are you running? Andy, are you able to help us look at this? OK, I see it's `oc describe node`. I'm also wondering, is there another command that we can run to see the same values represented in the UI? Thanks! Here are the Prometheus queries we're running: https://github.com/openshift/console/blob/master/frontend/public/components/pod.tsx#L62-L75 In 4.5 CPU usage queries which are behind `oc top` (also used in `oc describe`) changed after https://bugzilla.redhat.com/show_bug.cgi?id=1812004. They were changed to https://github.com/openshift/cluster-monitoring-operator/blob/release-4.5/assets/prometheus-adapter/config-map.yaml#L7-L8 *** This bug has been marked as a duplicate of bug 1812004 *** |