Liron Ar has posted comments on this change. Change subject: core: long query response time while many simultaneously queries are running ......................................................................
Patch Set 10: (2 comments) 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 1977: vmToUpdate.updateRunTimeStatisticsData(vmStatistics, vmToUpdate); Line 1978: addVmStatisticsToList(vmToUpdate.getStatisticsData()); Line 1979: updateInterfaceStatistics(vmToUpdate, vmStatistics); Line 1980: Line 1981: try { > This is where we use the diskImages we loaded earlier i referred to the try-catch clause 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 Line 1985: // update for the AI. 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 > If we use n as the number of updates, and m as the number of reads, we will that way we save that unnecessary loads the load is here just to perform the update, so we can easily encapsulate it within the update stored procedure which will improve things even more imo (less code added here, no need to add dedicated stored procedure and better performance). I think that this approach has benefits, I'd suggest to reconsider it. 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 <lzel...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches