Change in vdsm[master]: vm: migration: exponential downtime increment

fromani at redhat.com fromani at redhat.com
Tue Mar 18 10:14:52 UTC 2014


Francesco Romani has uploaded a new change for review.

Change subject: vm: migration: exponential downtime increment
......................................................................

vm: migration: exponential downtime increment

Migration downtime is calculated using an interpolation
using the current downtime step (up to a configurabile
maximum) and the maximum downtime.

The downtime is incremented at each downtime step until
it reaches the maximum, or the migration is finished.

This patch changes the interpolation formula from linear
to exponential, being the new one:

d = c ** s

where d is the downtime, s is the step and c is the
exponentiation coefficient computed in such a way
of when s = S (number of steps to perform),
then we will have d = D (selected downtime).

Please note that this patch still preserve an linear
increment of the wait time.

Change-Id: I6401772f52ea28144452e67198bddff18f6703eb
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1004101
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/vm.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/20/25820/1

diff --git a/vdsm/vm.py b/vdsm/vm.py
index c53f1d4..1d7b643 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -722,6 +722,7 @@
         delay_per_gib = config.getint('vars', 'migration_downtime_delay')
         memSize = int(vm.conf['memSize'])
         self._wait = (delay_per_gib * max(memSize, 2048) + 1023) / 1024
+        self._coeff = self._downtime ** (1 / float(self.DOWNTIME_STEPS))
 
         self.daemon = True
         self.start()
@@ -735,7 +736,7 @@
             if self._stop.isSet():
                 break
 
-            downtime = self._downtime * (i + 1) / self.DOWNTIME_STEPS
+            downtime = int(self._coeff ** i)
             self._vm.log.debug('setting migration downtime to %d', downtime)
             self._vm._dom.migrateSetMaxDowntime(downtime, 0)
 


-- 
To view, visit http://gerrit.ovirt.org/25820
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6401772f52ea28144452e67198bddff18f6703eb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>


More information about the vdsm-patches mailing list