Bug 1896192 - Dashboard: the Virtual resources Committed and Allocated % for the Global CPU Utilization data doesn't take "Count Threads as Cores" values into consideration.
Summary: Dashboard: the Virtual resources Committed and Allocated % for the Global CP...
Keywords:
Status: CLOSED DUPLICATE of bug 1896359
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-ui-extensions
Version: 4.4.2
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.4.5
: ---
Assignee: Sharon Gratch
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-09 23:29 UTC by Bimal Chollera
Modified: 2023-12-15 20:03 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-01-07 15:06:10 UTC
oVirt Team: UX
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 5565451 0 None None None 2020-11-09 23:51:44 UTC

Description Bimal Chollera 2020-11-09 23:29:22 UTC
Description of problem:

In the Webadmin Dashboard, the Virtual resources Committed and Allocated percentage for the  Global CPU Utilization data doesn't take "Count Threads as Cores" values into consideration.

The Dashboard shows the following information.

~~~
Global Utilization
CPU

Virtual resources - Committed: 95%, Allocated: 118%
~~~

From the database.	

Total for all VMs:

~~~
#  /usr/share/ovirt-engine/dbscripts/engine-psql.sh -c "select SUM(num_of_sockets*cpu_per_socket*threads_per_cpu) as total_all_cpus from vms;"
 total_all_cpus 
------------
        127
(1 row)
~~~

Total for running VMs:

~~~
#  /usr/share/ovirt-engine/dbscripts/engine-psql.sh -c "select SUM(num_of_sockets*cpu_per_socket*threads_per_cpu) as total_running_cpus from vms where status = '1';"
 total_running_cpus 
------------
        103
(1 row)
~~~

Count_threads_as_cores enabled.

~~~
# /usr/share/ovirt-engine/dbscripts/engine-psql.sh -c "select name, count_threads_as_cores from cluster;"
   name    | count_threads_as_cores 
-----------+------------------------
 RHHI      | t
(1 row)
~~~

Host total cpu cores:

~~~
#  /usr/share/ovirt-engine/dbscripts/engine-psql.sh -c "select SUM(cpu_cores) as total_cores from vds_dynamic ;"
 total_cores 
-------------
         108
(1 row)
~~~

Host total cpu threads:

~~~
#  /usr/share/ovirt-engine/dbscripts/engine-psql.sh -c "select SUM(cpu_threads) as total_cores from vds_dynamic ;"
 total_cores 
-------------
         216
(1 row)
~~~

So taking the information from above.

Using the cpu_core values, the percent committed and allocated matches to what is reported on the dashboard.

Committed percentage:
=======================

(Total_running_cpu of VM / Total host cpu_cores) * 100 
(103/108) * 100 = 95.37 ~95%

Allocated percentage:
=====================

(Total_all_cpu of VM / Total host cpu_cores) * 100 
(127/108) * 100 = 117.59 ~118%

Since the "Count Threads As Cores" is enabled for the Cluster, the cpu_thread count should be considered.  It appears that cluster option is not honoured.

The following should be reported in the dashboard.

Committed percentage:
=======================

(Total_running_cpu of VM / Total host cpu_threads) * 100 
(103/216) * 100 = 47.69 ~48%


Allocated percentage:
=====================

(Total_all_cpu of VM / Total host cpu_threads) * 100 
(127/216) * 100 = 58.79 ~59%


Version-Release number of selected component (if applicable):

4.3.10
4.4.2

How reproducible:

100%

Steps to Reproduce:
1.  Enable the "Count Threads as Cores" in the Cluster setting.

2.  Dash board (ovirt-engine-dwhd was restarted) Virtual resources Committed and Allocated information will continue to reflect the calculation based on cpu_core instead of cpu_threads.

3.

Actual results:

Dashboard will reflect the calculation based on cpu_core instead of cpu_threads.

Expected results:

Dashboard should take the cpu_thread value for calculation.

Additional info:

Comment 2 Sharon Gratch 2021-01-07 15:06:10 UTC

*** This bug has been marked as a duplicate of bug 1896359 ***


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