Liran Zelkha has posted comments on this change.
Change subject: core: Clean pending memory and CPUs only during init
......................................................................
Patch Set 3:
(2 comments)
....................................................
File
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/ResourceManager.java
Line 92:
Line 93: // Is there any VM that is not fully Up or fully Down on
this host?
Line 94: boolean runningVmsInTransition = false;
Line 95:
Line 96: List<VM> _vms =
DbFacade.getInstance().getVmDao().getAllRunningForVds(_vds.getId());
This is a really slow query. Can you load all VMs for all relevant VDSs? Can't
you just load all VMs, and do the loop on VMs?
Line 97: for (VM vm : _vms) {
Line 98: if (vm.isRunning() && vm.getStatus() != VMStatus.Up) {
Line 99: runningVmsInTransition = true;
Line 100: break;
Line 111: _saveVdsDynamic = true;
Line 112: }
Line 113:
Line 114: if (_saveVdsDynamic) {
Line 115:
DbFacade.getInstance().getVdsDynamicDao().update(_vds.getDynamicData());
Please use batch here. Add all dynamic data to a list, and push via batch
update.
Line 116: }
Line 117: }
Line 118:
Line 119: // Populate the VDS dictionary
--
To view, visit http://gerrit.ovirt.org/20172
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I84c2ba29368c0b6bc400087512d7b3a68c5c8f5c
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Liran Zelkha <[email protected]>
Gerrit-Reviewer: Martin Sivák <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[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