Liron Ar has posted comments on this change. Change subject: core: long query response time while many simultaneously queries are running ......................................................................
Patch Set 10: (1 comment) suggestion - instead of querying all the all the images just for the image id here and then update the db using the values populated in _vmDiskImageDynamicToSave, we can add a update stored procedure that will get the disk id instead of the image id and will do that internally, that way we won't need to load *anything* here. http://gerrit.ovirt.org/#/c/27586/10/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java: Line 1980: Line 1981: try { Line 1982: for (DiskImageDynamic imageDynamic : _runningVms.get(vmToUpdate.getId()).getVmDynamic().getDisks()) { Line 1983: Guid activeImageId = diskImages.get(imageDynamic.getId()); Line 1984: // We have disk_id statistics, which is good, but disk_image_dynamic table contains image_id, so we suggestion - instead of querying all the all the images just for the image id here and then update the db using the values populated in _vmDiskImageDynamicToSave, we can add a update stored procedure that will get the disk id instead of the image id and will do that internally, that way we won't need to load *anything* here. Line 1985: // update for the AI. Line 1986: // We also check if the disk is null, as, for external VMs the disk is not in the database Line 1987: if (activeImageId != null) { Line 1988: imageDynamic.setId(activeImageId); -- To view, visit http://gerrit.ovirt.org/27586 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I94e20d782bc4e2befaf4338f51551a2855509769 Gerrit-PatchSet: 10 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liran Zelkha <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Barak Azulay <[email protected]> Gerrit-Reviewer: Eli Mesika <[email protected]> Gerrit-Reviewer: Liran Zelkha <[email protected]> Gerrit-Reviewer: Liron Ar <[email protected]> Gerrit-Reviewer: Omer Frenkel <[email protected]> Gerrit-Reviewer: Oved Ourfali <[email protected]> Gerrit-Reviewer: Roy Golan <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
