Change in ovirt-engine[ovirt-engine-4.0]: dashboard: Optimize VM status query

tnisan at redhat.com tnisan at redhat.com
Wed Jun 22 06:40:46 UTC 2016


Tal Nisan has submitted this change and it was merged.

Change subject: dashboard: Optimize VM status query
......................................................................


dashboard: Optimize VM status query

- the vm_samples_history table will grow significantly every
  minute (number of VMs each time). This made the original
  query slow as it needs to go through the entire table to
  lookup the right history_id. I modified the query to first
  filter on time frame, and then select the latest history_id
  from the filtered set. The query now takes < 100ms.
- Made similar changes to the top 10 cpu/mem/storage vm lookup
  to filter by timeframe as significantly reducing the query time.
- Verified all other queries are fast in a scale environment.
- Note all the queries are using the DWH views and one of those
  views is missing an index on vm_id and history_datetime. These
  will not be fast unless that index is added.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1345934
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1345947
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1345944
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1344428

Change-Id: I834e3231c72fb3f0bcbadb67870c143bfb98c69e
Signed-off-by: Alexander Wels <awels at redhat.com>
---
M frontend/webadmin/modules/frontend/src/main/resources/org/ovirt/engine/ui/frontend/server/dashboard/dao/StorageDomainDwhDAO.properties
M frontend/webadmin/modules/frontend/src/main/resources/org/ovirt/engine/ui/frontend/server/dashboard/dao/VmDwhDAO.properties
2 files changed, 73 insertions(+), 68 deletions(-)

Approvals:
  Alexander Wels: Verified
  Jenkins CI: Passed CI tests
  Greg Sheremeta: Looks good to me, approved



-- 
To view, visit https://gerrit.ovirt.org/59570
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I834e3231c72fb3f0bcbadb67870c143bfb98c69e
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-4.0
Gerrit-Owner: Alexander Wels <awels at redhat.com>
Gerrit-Reviewer: Alexander Wels <awels at redhat.com>
Gerrit-Reviewer: Greg Sheremeta <gshereme at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list