Bug 1465795 - Top utilized Resources (Storage) - VMs should be sorted by actual use, not over-allocation percentage
Top utilized Resources (Storage) - VMs should be sorted by actual use, not ov...
Status: CLOSED CURRENTRELEASE
Product: ovirt-engine-dashboard
Classification: oVirt
Component: Core (Show other bugs)
unspecified
Unspecified Unspecified
medium Severity high
: ovirt-4.2.2
: ---
Assigned To: Scott Dickerson
Petr Matyáš
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-28 04:32 EDT by Yaniv Kaul
Modified: 2018-03-29 06:58 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-03-29 06:58:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: UX
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑4.2+
sdickers: devel_ack+


Attachments (Terms of Use)
screen: Top Utilized Resources (Storage) - still ordered by allocation ratio (34.41 KB, image/png)
2017-12-18 16:08 EST, Pavel Novotny
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 82514 master MERGED dashboards: fix storage.vm_utilization query sorting 2017-10-17 06:35 EDT
oVirt gerrit 86974 master MERGED Do sorting of ObjectUtilizationList data sets at fetch time 2018-02-05 09:34 EST
oVirt gerrit 88106 ovirt-engine-dashboard-1.2 MERGED Do sorting of ObjectUtilizationList data sets at fetch time 2018-02-22 17:45 EST

  None (edit)
Description Yaniv Kaul 2017-06-28 04:32:59 EDT
Description of problem:
Currently there ordering is by over-allocation percentage. That provides very little value to the customer. The real interesting question is how much space is actually, on disk, occupied by VM or template disk(s).

Version-Release number of selected component (if applicable):
4.1.3
Comment 2 Yaniv Kaul 2017-07-03 07:38:20 EDT
Shirly, please check which query is used and should we use a different one, etc.
Comment 6 Pavel Novotny 2017-12-18 16:06:35 EST
FailedQA in
ovirt-engine-4.2.0.2-0.1.el7.noarch
ovirt-engine-dashboard-1.2.0-1.el7ev.noarch

The top 10 VM storage utilization is still ordered by the disk allocation ratio and not by the actually used disk space.
See the attached screenshot, the sorting it evident there.
Comment 7 Pavel Novotny 2017-12-18 16:08 EST
Created attachment 1369688 [details]
screen: Top Utilized Resources (Storage) - still ordered by allocation ratio
Comment 8 Oved Ourfali 2017-12-19 01:49:50 EST
Scott - can you please take a look?
Comment 9 Oved Ourfali 2017-12-19 01:50:25 EST
Oops... Shirly?
Comment 10 Tomas Jelinek 2018-01-10 04:49:05 EST
Shirly, any news?
Comment 11 Alexander Wels 2018-01-22 09:22:43 EST
Scott, I noticed we are sorting on

  const sortedData = data.slice().sort((a, b) => {
    return (b.used / b.total) - (a.used / a.total)
  })

In ObjectUtilizationList.jsx while the backend already sorts in the query. The query is sorting on USED instead of used percentage. Shirly has fixed the query per this bug, but the UI is resorting it to percentage used again. Could you either remove the sorting altogether or sort by used?
Comment 12 Yaniv Kaul 2018-01-31 08:25:27 EST
Any news?
Comment 13 Scott Dickerson 2018-01-31 11:59:28 EST
I know this BZ specifically references the Top Utilized Resources (Storage) 
Virtual Machines utilization list.  What about the other 5 utilization lists?  
How should they sort on the UI?  They are:
  - Top Utilized Resources (CPU), Hosts
  - Top Utilized Resources (CPU), Virtual Machines
  - Top Utilized Resources (Memory), Hosts
  - Top Utilized Resources (Memory), Virtual Machines
  - Top Utilized Resources (Storage), Storage Domains

If they can display as sorted by the data service and SQL queries, I can remove the UI sort completely.

Right now, I'll patch dashboard to remove the sort on the "Top Utilized Resources (Storage), Virtual Machines" utilization list and leave the other sorts in place.

For reference, the SQL query key ultimately used by each list is:
  Top Utilized Resources (CPU), Hosts 
    -> HostDwhDAO.properties, host.cpu_host_utilization

  Top Utilized Resources (CPU), Virtual Machines
    -> VmDwhDAO.properties, vm.cpu_utilization

  Top Utilized Resources (Memory), Hosts
    -> HostDwhDAO.properties, host.mem_host_utilization

  Top Utilized Resources (Memory), Virtual Machines
    -> VmDwhDAO.properties, vm.mem_utilization

  Top Utilized Resources (Storage), Storage Domains
    -> StorageDomainDwhDAO.properties, storage.utilization

  Top Utilized Resources (Storage), Virtual Machines
    -> StorageDomainDwhDAO.properties, storage.vm_utilization
Comment 14 Yaniv Kaul 2018-01-31 12:46:53 EST
(In reply to Scott Dickerson from comment #13)
> I know this BZ specifically references the Top Utilized Resources (Storage) 
> Virtual Machines utilization list.  What about the other 5 utilization
> lists?  
> How should they sort on the UI?  They are:
>   - Top Utilized Resources (CPU), Hosts
>   - Top Utilized Resources (CPU), Virtual Machines
>   - Top Utilized Resources (Memory), Hosts
>   - Top Utilized Resources (Memory), Virtual Machines
>   - Top Utilized Resources (Storage), Storage Domains
> 
> If they can display as sorted by the data service and SQL queries, I can
> remove the UI sort completely.
> 
> Right now, I'll patch dashboard to remove the sort on the "Top Utilized
> Resources (Storage), Virtual Machines" utilization list and leave the other
> sorts in place.
> 
> For reference, the SQL query key ultimately used by each list is:
>   Top Utilized Resources (CPU), Hosts 
>     -> HostDwhDAO.properties, host.cpu_host_utilization

+1. 

> 
>   Top Utilized Resources (CPU), Virtual Machines
>     -> VmDwhDAO.properties, vm.cpu_utilization

This is probably meaningless (you can't compare CPU utilization between different topologies... But I don't see anything better we could do.

> 
>   Top Utilized Resources (Memory), Hosts
>     -> HostDwhDAO.properties, host.mem_host_utilization

Again - is it in percentage, or absolute numbers? Neither is great. Not sure, but it's not as bad as storage was.

> 
>   Top Utilized Resources (Memory), Virtual Machines
>     -> VmDwhDAO.properties, vm.mem_utilization
> 
>   Top Utilized Resources (Storage), Storage Domains
>     -> StorageDomainDwhDAO.properties, storage.utilization

Is this in absolute or percentage? In this case, I think absolute free or used is better?

> 
>   Top Utilized Resources (Storage), Virtual Machines
>     -> StorageDomainDwhDAO.properties, storage.vm_utilization

What is the value here? Isn't it what I've asked to fix?
Comment 15 Scott Dickerson 2018-02-01 18:16:21 EST
(In reply to Yaniv Kaul from comment #14)

I left the JavaScript sorting in place for all of the lists except for the VMs in Storage.  The JavaScript sorting resorts based on percent used.  I'd have to dig through the SQL a bit to see what the queries are ordering by - working out sorting across multiple joins isn't my strength.

> > 
> > For reference, the SQL query key ultimately used by each list is:
> >   Top Utilized Resources (CPU), Hosts 
> >     -> HostDwhDAO.properties, host.cpu_host_utilization
> 
> +1. 
> 
> > 
> >   Top Utilized Resources (CPU), Virtual Machines
> >     -> VmDwhDAO.properties, vm.cpu_utilization
> 
> This is probably meaningless (you can't compare CPU utilization between
> different topologies... But I don't see anything better we could do.

It's sorted by percent used.  Maybe percentages are better then actual in this case.

> 
> > 
> >   Top Utilized Resources (Memory), Hosts
> >     -> HostDwhDAO.properties, host.mem_host_utilization
> 
> Again - is it in percentage, or absolute numbers? Neither is great. Not
> sure, but it's not as bad as storage was.
> 
> > 
> >   Top Utilized Resources (Memory), Virtual Machines
> >     -> VmDwhDAO.properties, vm.mem_utilization
> > 
> >   Top Utilized Resources (Storage), Storage Domains
> >     -> StorageDomainDwhDAO.properties, storage.utilization
> 
> Is this in absolute or percentage? In this case, I think absolute free or
> used is better?
> 
> > 
> >   Top Utilized Resources (Storage), Virtual Machines
> >     -> StorageDomainDwhDAO.properties, storage.vm_utilization
> 
> What is the value here? Isn't it what I've asked to fix?

The sort value here is now dependent on the SQL order by, so actual storage used.  Shirly's SQL change and dropping the JavaScript sort made that happen.

I think the specific issue for this BZ is solved.  Might be worth having a re-look at the SQL for the other lists and determining if those sorts should just pass through to the UI.
Comment 16 Yaniv Kaul 2018-02-22 08:36:20 EST
Should it move to ON_QA for 4.2.2?
Comment 17 Scott Dickerson 2018-02-22 11:28:14 EST
I missed the backport req for dashboard.  Fixing that shortly.  It'll be in the next 4.2.2 dashboard build.
Comment 18 Petr Matyáš 2018-03-07 09:48:29 EST
Verified on ovirt-engine-4.2.2.2-0.1.el7.noarch
Comment 19 Sandro Bonazzola 2018-03-29 06:58:50 EDT
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.2 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.

Note You need to log in before you can comment on or make changes to this bug.