Roy Golan has posted comments on this change.
Change subject: core: throttle running of VMs (#843058)
......................................................................
Patch Set 3: (4 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommandBase.java
Line 365: return true;
Line 366: }
Line 367:
Line 368: protected void DecreasePendingVms(Guid vdsId) {
Line 369: decreaseLock.lock();
I replaced the keyword with a lock object. nothing here is really changed
except the signal in the end.
Line 370: try {
Line 371: boolean updateDynamic = false;
Line 372: VDS vds = DbFacade.getInstance().getVdsDAO().get(vdsId);
Line 373: if (vds == null)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsFreeMemoryChecker.java
Line 17: }
Line 18:
Line 19: public boolean evaluate(VDS vds, VM vm) {
Line 20: // first check if this host has memory.
Line 21: if (!RunVmCommandBase.hasMemoryToRunVM(vds, vm)) {
I have thought about during the work on this patch and have few ideas but
decided to keep to scope of change small. will send a leading patches for it.
Line 22: if (log.isDebugEnabled()) {
Line 23: log.debug("not enough memory on host. throttling...");
Line 24: }
Line 25: // not enough memory to run the vm invoke the throttler.
....................................................
File
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java
Line 230: } else {
Line 231: _refreshIteration++;
Line 232: }
Line 233: if (isMonitoringNeeded()) {
Line 234: setStartTime();
its due to the work on getLastUpdateElapsed method
Line 235: _vdsUpdater = new
VdsUpdateRunTimeInfo(VdsManager.this, _vds);
Line 236: _vdsUpdater.Refresh();
Line 237: mUnrespondedAttempts.set(0);
Line 238: setLastUpdate();
Line 678: }
Line 679:
Line 680: /**
Line 681: * @return elapsed time in milliseconds between two updates. If
we diminished the
Line 682: * {@link ConfigValues.VdsRefreshRate} from that we would
get the actual time it took to update the Host
wrong description here. will update
Line 683: * run-time info. 0 means the updater never ran.
Line 684: */
Line 685: public long getLastUpdateElapsed() {
Line 686: return lastUpdate - updateStartTime;
--
To view, visit http://gerrit.ovirt.org/7204
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I076ede6cba919bc61f7546d7b29ef436eb6d3375
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Barak Azulay <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches