Bug 1401010
| Summary: | Memory and CPU donut shows nonsense value | ||
|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | Michal Skrivanek <michal.skrivanek> |
| Component: | Frontend.Core | Assignee: | Shirly Radco <sradco> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Lucie Leistnerova <lleistne> |
| Severity: | medium | Docs Contact: | |
| Priority: | high | ||
| Version: | 4.0.5 | CC: | awels, bugs, fkrepins, lsvaty, mgoldboi, oourfali, pstehlik, sradco |
| Target Milestone: | ovirt-4.1.1 | Flags: | rule-engine:
ovirt-4.1+
rule-engine: blocker+ rule-engine: planning_ack+ sradco: devel_ack+ lsvaty: testing_ack+ |
| Target Release: | 4.1.1 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause:
The dashboard host utilization queries were calculated as the sum of percentages of memory/cpu usage per each host, of the total sum of memory/cpu of those hosts.
Consequence:
The dashboard gauges are not calculated correctly
Fix:
Updated the queries to calculate the sum of used cpu/memory out of the total , to represent correctly the used cpu/memory.
Result:
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-04-21 09:42:15 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | UX | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Michal Skrivanek
2016-12-02 14:52:59 UTC
Shirly - can you look at the calculation and share your thoughts on what the query should be? Also I think the cpu values are wrong in the same way.
It is calculated as average of cpu percentages. I think there should be distinction between cpus with different number of cores at least.
So that means these should be accounted for:
cpu with 50% usage and 8 cores
cpu with 50% usage and 4 cores
Also, can vm run on one thread?
I am making moVirt dashboard (REST API), so I will use adjusted percentages to sockets and cores.
> Shirly - can you look at the calculation and share your thoughts on what the query should be?
And "used memory" (in Bytes) of each host.
Shirly, please tell me if you come up with different calculations so that we can adjust both implementations.
Also, should we count total cpu/memory (used in over commit) from all hosts? I think it makes sense to show only over commit for running hosts. I am also getting different values for number of cores from this query
HostDwhDAO.properties:
host.total_cpu_memory_count=SELECT \
SUM(COALESCE(hosts.number_of_cores, 0) * COALESCE(hosts.number_of_sockets, 0)) AS cpu_total ...
When I call the REST API and make the calculations, I will get 62 cores on my setup. But this query returns 182 cores. Do you know what makes the difference?
This is my solution how to get cpu usage from REST API: https://github.com/suomiy/moVirt/blob/dashboardFix/moVirt/src/main/java/org/ovirt/mobile/movirt/ui/dashboard/general/DashboardGeneralFragment.java#L66-L77 *Note: entityCores == sockets * coresPerSocket You are currect. Already working on fixing these queries. Does the fixing include even the core count, or what is your opinion on this?
> When I call the REST API and make the calculations, I will get 62 cores on my setup. But this query returns 182 cores. Do you know what makes the difference?
Are you going to also make changes to this?
> Also, should we count total cpu/memory (used in over commit) from all hosts?
Any progress on this? Value of used memory in donut corresponds with sum of used memory on hosts. The used percentage in donut corresponds with the total sum of memory and used memory. Value of used CPU in donut corresponds with calculation: ((host1 cores * usage) + (host2 cores * usage) ..) / all cores. Changes on the host have affect after dwh reloads (15 minutes). I did not check over commit. I don't know how it should be calculated and it was not mentioned that this BZ contains it. tested in ovirt-engine-4.1.1.3-0.1.el7.noarch with ovirt-engine-dashboard-1.1.0-6.el7ev.noarch So the calculations looks like you suggested but it should be mentioned somewhere. In release notes? The customer could be confused because the tooltips for the calculation are not yet done, see Bug 1358604. (In reply to Filip Krepinsky from comment #3) > Also, should we count total cpu/memory (used in over commit) from all hosts? > I think it makes sense to show only over commit for running hosts. Alexander, please reply how the over commit is currently calculated. I believe it is calculated after the dwh queries, on the dashboard level. Overcommit is calculated like this: virtual used / physical total * 100 So if I have 100G virtual memory used and my total physical memory is 50G, then my overcommit is 200%. Or for CPU if I have 100 virtual cores used for VMs, and I have 20 physical cores. Then my over commit is 500% Note there is a difference between used and total. So the calculations on memory and cpu are OK. Over commit is not part of this BZ. If it needs some update, please create new BZ for it. verified in ovirt-engine-4.1.1.3-0.1.el7.noarch |