Bug 1268216
Summary: | Query count grows linear with vm count for /api/vms endpoint | ||||||
---|---|---|---|---|---|---|---|
Product: | [oVirt] ovirt-engine | Reporter: | Roman Mohr <rmohr> | ||||
Component: | RestAPI | Assignee: | Marek Libra <mlibra> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Israel Pinto <ipinto> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 3.6.0 | CC: | bugs, ecohen, juan.hernandez, sbonazzo, tjelinek | ||||
Target Milestone: | ovirt-4.0.0-beta | Flags: | rule-engine:
ovirt-4.0.0+
rule-engine: planning_ack+ tjelinek: devel_ack+ mavital: testing_ack+ |
||||
Target Release: | 4.0.0 | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: |
Cause: Data retrieval for /api/vms REST call was ineffective in terms of DB calls.
Consequence: There was significant delay to get result for numerous VM list.
Fix: DB access has been optimized.
Result: The REST API /api/vms call returns faster.
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2016-08-12 14:04:58 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | Virt | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Roman Mohr
2015-10-02 08:06:32 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release. Additional info:
the table vm_device is missing the right index to make the query 'GetVmDeviceByVmIdTypeAndDevice' fast.
So consider adding
> CREATE UNIQUE INDEX idx_combined_vmid_type_device
> ON vm_device
> USING btree
> (vm_id, type, device);
Note that this might not give much additional boost because the db function is also using the permission_view and I did not check if the indices there are done right. Might be worth a look too.
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA. Verify with: Engine: 4.0.2.4-0.1.el7ev Host: OS Version:RHEL - 7.2 - 9.el7_2.1 Kernel Version:3.10.0 - 327.22.2.el7.x86_64 KVM Version:2.3.0 - 31.el7_2.21 LIBVIRT Version:libvirt-1.2.17-13.el7_2.5 VDSM Version:vdsm-4.18.5.1-1.el7ev SPICE Version:0.12.4 - 15.el7_2.1 Steps: 1. Create 100 VMs on engine with last version (4.0.2.4) Create 100 VMs on engine without the fix (3.6.8.1) 2. Query engine vms status on both engines: eval date +%s >> time_to_exe.out ; seq 1 100 | parallel -j 10 curl -H "Accept: application/json" -H "Content-type: application/json" -X GET --user admin@internal:engine <engine FQND>/ovirt-engine/api/vms >> test.out; eval date +%s >> time_to_exe.out 3. Compare results (time_to_exe.out file) without the fix: 113 sec with the fix: 68 sec PASS *** Bug 1194291 has been marked as a duplicate of this bug. *** |