Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1058824 - Performance: Long queries around 'updatevdsdynamic' function
Summary: Performance: Long queries around 'updatevdsdynamic' function
Keywords:
Status: CLOSED DUPLICATE of bug 1016634
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: 3.3
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
: 3.4.0
Assignee: Liran Zelkha
QA Contact: bugs@ovirt.org
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-28 15:14 UTC by Eldad Marciano
Modified: 2014-07-25 04:13 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-04 11:05:57 UTC
oVirt Team: ---


Attachments (Terms of Use)

Description Eldad Marciano 2014-01-28 15:14:39 UTC
Description of problem:

Long queries captured around 'updatevdsdynamic' during scale test of 2000 vms.
scale definition:
- 2000 fake vm's
- 100 fake host
- ~20 vms per host.
- vds_dynamic table included 109 rows


note - the query using select all ('*')

see the following long queries (duration represent the execution time)

user=engine,db=engineLOG:  duration: 6821.458 ms  execute S_10: select * from updatevdsdynamic($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47) as result

user=engine,db=engineLOG:  duration: 39298.794 ms  execute S_18: select * from updatevdsdynamic($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47) as result

user=engine,db=engineLOG:  duration: 17643.016 ms  execute S_74: select * from updatepartialvdsdynamiccalc($1, $2, $3, $4, $5, $6) as result

user=engine,db=engineLOG:  duration: 15263.515 ms  execute S_10: select * from updatevdsdynamic($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47) as result

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

How reproducible:
scale test of 2000 fake vms with 100 host fake
ramp up - 50 vm bulks every 1/2 hour.

Steps to Reproduce:
1.
2.
3.

Actual results:
more than 15 sec to execution time (the worst case was 39 sec)

Expected results:
query optimization required
further investigation


Additional info:

Comment 1 Liran Zelkha 2014-01-29 13:03:19 UTC
There is no way to "optimize" a single update statement. We can either remove the unneeded update (see bug https://bugzilla.redhat.com/show_bug.cgi?id=1016634) or to just update the single value that needs to be updated.
Can you please describe the scenario in the system? Is it idle, or are you doing anything in the UI/NBI?

Comment 2 Itamar Heim 2014-02-02 08:16:59 UTC
Setting target release to current version for consideration and review. please
do not push non-RFE bugs to an undefined target release to make sure bugs are
reviewed for relevancy, fix, closure, etc.

Comment 3 Liran Zelkha 2014-02-04 11:05:57 UTC

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

Comment 4 Eldad Marciano 2014-02-18 12:51:57 UTC
(In reply to Liran Zelkha from comment #1)
> There is no way to "optimize" a single update statement. We can either
> remove the unneeded update (see bug
> https://bugzilla.redhat.com/show_bug.cgi?id=1016634) or to just update the
> single value that needs to be updated.
> Can you please describe the scenario in the system? Is it idle, or are you
> doing anything in the UI/NBI?

+1 for option#2 - update single value 
if we do update just for single value, the unneeded updated will noramlly disapre no?!
if no we should tackle it too
-remove the unneeded updates
-and updated just the relevant \ single values.

the scenario already described in the bug
see the "How reproducible" section.


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