Omer Frenkel has posted comments on this change.

Change subject: core: throttle running of VMs (#843058)
......................................................................


Patch Set 6: (3 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommandBase.java
Line 426:      * @see VdsEventListener
Line 427:      * @See VdsUpdateRunTimeInfo
Line 428:      */
Line 429:     @Override
Line 430:     public void throttle(Guid vdsId) {
IIRC, using this check will save generating the string when debug not enabled
Line 431:         if (log.isDebugEnabled()) {
Line 432:             log.debug("try to wait for te engine update the host 
memory and cpu stats");
Line 433:         }
Line 434: 


Line 436:         try {
Line 437:             // time out waiting for an update is the highest between 
the refresh rate and the last update elapsed time
Line 438:             // but still no higher than a configurable max to prevent 
very long updates to stall command.
Line 439:             long t =   Math.max(
Line 440:                     
ResourceManager.getInstance().GetVdsManager(vdsId).getLastUpdateElapsed(),
i am not sure about using ResourceManager directly, usually we are using it  
only through VdsCommands, since we moved to java this is not a must, i guess, 
but still looks odd to me
Line 441:                     TimeUnit.SECONDS.toMillis(Config.<Integer> 
GetValue(VdsRefreshRate)));
Line 442:             t = Math.max(Config.<Integer> 
GetValue(ConfigValues.ThrottlerMaxWaitForVdsUpdateInMillis), t);
Line 443: 
Line 444:             // wait for the run-time refresh to decrease any current 
powering-up VMs


Line 464:      * @param vdsId
Line 465:      * @return {@link VdsMonitor} for signaling on thread actions
Line 466:      */
Line 467:     private VdsMonitor getMonitor(Guid vdsId) {
Line 468:         return 
ResourceManager.getInstance().GetVdsManager(vdsId).getVdsMonitor();
same
Line 469:     }
Line 470: 
Line 471:     @Override
Line 472:     public void onPowerringUp() {


--
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: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com>
Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to