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:
*** This bug has been marked as a duplicate of bug 1896359 ***