Description of problem: Add index for better performance to vm disks usage tables Version-Release number of selected component (if applicable): 4.0 How reproducible: Steps to Reproduce: 1.Test query results against the tables in scale env before and after the change.
Shirly - this isn't posted/merged in 4.0, so can't move to modified. Alexander's patch is already merged on 4.0. Can you make sure to backport this ASAP?
This was in 3.6.8 build but I can't manage to add the target release for it.
Shirly, where's the 4.0 bug?
(In reply to Sandro Bonazzola from comment #6) > Shirly, where's the 4.0 bug? ydary said we don't need another bug for it. Yaniv, am I right?
Thanks!
Created attachment 1181571 [details] ran these queries to validate performance with new index
Created attachment 1181572 [details] ran these queries to validate performance with new index
Created attachment 1181573 [details] ran these queries to validate performance with new index
Created attachment 1181574 [details] ran these queries to validate performance with new index
Ran attached (cpu,samples.available_disk_size_gb +samples.used_disk_size_gb ,etc,,,) quires to validate performance time with new added index on system topology with simulated 500 hosts, 9.9K vms, ~30K disks. [root@bkr-hv05 ~]# time psql -U ovirt_engine_history -f dash.sql cpu_total_vms | cpu_used_vms | mem_total_vms | mem_used_vms ---------------+--------------+---------------+-------------- 9977 | 8073 | 1287808 | 1044096 (1 row) real 0m0.315s user 0m0.000s sys 0m0.002s [root@bkr-hv05 ~]# time psql -U ovirt_engine_history -f dashstg.sql total_vms | used_vms -----------+---------- 257872 | 5 (1 row) real 0m0.452s user 0m0.001s sys 0m0.007s [root@bkr-hv05 ~]# time psql -U ovirt_engine_history -f dashstgtotal.sql total ------- 441 (1 row) real 0m0.007s user 0m0.001s sys 0m0.001s [root@bkr-hv05 ~]# time psql -U ovirt_engine_history -f dashsthourly.sql the_date | used ---------------------+------ 2016-07-18 06:00:00 | 2016-07-18 07:00:00 | 2016-07-18 08:00:00 | 2016-07-18 09:00:00 | 2016-07-18 10:00:00 | 342 2016-07-18 11:00:00 | 342 2016-07-18 12:00:00 | 342 2016-07-18 13:00:00 | 342 2016-07-18 14:00:00 | 342 2016-07-18 15:00:00 | 342 2016-07-18 16:00:00 | 342 2016-07-18 17:00:00 | 342 2016-07-18 18:00:00 | 342 2016-07-18 19:00:00 | 342 2016-07-18 20:00:00 | 342 2016-07-18 21:00:00 | 342 2016-07-18 22:00:00 | 342 2016-07-18 23:00:00 | 342 2016-07-19 00:00:00 | 342 2016-07-19 01:00:00 | 342 2016-07-19 02:00:00 | 342 2016-07-19 03:00:00 | 342 2016-07-19 04:00:00 | 342 2016-07-19 05:00:00 | 342 2016-07-19 06:00:00 | (25 rows) real 0m0.008s user 0m0.001s sys 0m0.002 closing
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-1516.html