Bug 1151477 - GetAllFromVms stored function is inefficient
Summary: GetAllFromVms stored function is inefficient
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-userportal
Version: unspecified
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: 3.5.1
Assignee: Tim Speetjens
QA Contact: Pavel Stehlik
URL:
Whiteboard: infra
Depends On:
Blocks: 1154607 1156434
TreeView+ depends on / blocked
 
Reported: 2014-10-10 14:23 UTC by Tim Speetjens
Modified: 2016-02-10 19:30 UTC (History)
10 users (show)

Fixed In Version: ovirt-3.5.1_rc1
Clone Of:
: 1154607 (view as bug list)
Environment:
Last Closed: 2015-01-21 16:06:46 UTC
oVirt Team: Infra
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 34006 0 master MERGED userportal: optimize GetAllFromVms query Never
oVirt gerrit 34387 0 ovirt-engine-3.5 MERGED userportal: optimize GetAllFromVms query Never

Description Tim Speetjens 2014-10-10 14:23:00 UTC
Description of problem:
The query as defined for GetAllFromVms in vms_sp.sql is inefficient, when a moderate number of VMs exist.

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

How reproducible:
100%

Steps to Reproduce:
explain select already signifies that the query is not very optimized
with real life VDI data, its cost becomes significant (say, 1000 users, 1000 vms, ...)

Actual results:
EXPLAIN shows a high cost, and lists 148 actions (for the isolated query)
This results in high load on the database, when many users are logged into the user portal.

Expected results:
This should query should be more optimized, as it is called very frequently (user portal refresh)

Additional info:

Comment 1 Liran Zelkha 2014-10-13 05:47:46 UTC
Hi

It's impossible to tune this query, as it's running against the VM view, which we can't change... 
I'll try to see if we can decrease the number of calls to it.

Comment 3 Sandro Bonazzola 2015-01-15 14:15:47 UTC
This is an automated message: 
This bug should be fixed in oVirt 3.5.1 RC1, moving to QA

Comment 4 Sandro Bonazzola 2015-01-21 16:06:46 UTC
oVirt 3.5.1 has been released. If problems still persist, please make note of it in this bug report.


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