<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi all,<br>
<br>
Based on Live Migration IRC meeting discussions, I've uploaded an
updated patch set for the "add post-copy live migration support to
Nova" specs (<a class="moz-txt-link-freetext" href="https://review.openstack.org/#/c/301509/">https://review.openstack.org/#/c/301509/</a>). Based on
that discussions, the proposed way of including the post-copy live
migration capability is the next:<br>
<br>
- To enable the use of post-copy, a new config option will be made
available at<br>
nova.conf, `live_migration_postcopy`, similarly to<small> </small>`live_migration_tunnelled`one.
If `True`, the<br>
libvirt postcopy flag `VIR_MIGRATE_POSTCOPY` will be used, if
supported,<br>
making the migration ready to be switched to post-copy mode.<br>
<br>
- To trigger the switch to post-copy mode, an automatic mechanism
will be implemented based on the number<br>
of memory iterations done by the ongoing migration. When the
number of iterations is greater than a defined threshold, the
switch will be triggered. <br>
<br>
- Similarly to the `live_migration_bandwidth` parameter, the
number of memory iterations before the switch to postcopy will be
defined in another configuration parameter named
`live_migration_postcopy_max_iterations`, allowing a more or less
aggressive switch to post-copy. For instance, it could be set to a
small number (even 0) for evacuation purposes, minimizing the
amount of network traffic.<br>
<br>
Any input/review of the updated patch set is really welcome.<br>
<br>
Thanks,<br>
Luis<br>
<br>
<br>
On 04/05/2016 05:17 PM, Luis Tomas wrote:<br>
</div>
<blockquote cite="mid:5703D715.7030905@cs.umu.se" type="cite">Hi,
<br>
<br>
We are working on the possibility of including post-copy live
migration into Nova (<a class="moz-txt-link-freetext" href="https://review.openstack.org/#/c/301509/">https://review.openstack.org/#/c/301509/</a>)
<br>
<br>
At libvirt level, post-copy live migration works as follow:
<br>
- Start live migration with a post-copy enabler flag
(VIR_MIGRATE_POSTCOPY). Note this does not mean the migration is
performed in post-copy mode, just that you can switch it to
post-copy at any given time.
<br>
- Change the migration from pre-copy to post-copy mode.
<br>
<br>
However, we are not sure what's the most convenient way of
providing this functionality at Nova level.
<br>
The current specs, propose to include an optional flag at the live
migration API to include the VIR_MIGRATE_POSTCOPY flag when
starting the live migration. Then we propose a second API to
actually switch the migration from pre-copy to post-copy mode
similarly to how it is done in LibVirt. This is also similar to
how the new "force-migrate" option works to ensure migrations
completion. In fact, this method could be an extension of the
force-migrate, by switching to postcopy if the migration was
started with the VIR_MIGRATE_POSTCOPY libvirt flag, or pause it
otherwise.
<br>
<br>
The cons of this approach are that we expose a too specific
mechanism through the API. To alleviate this, we could remove the
"switch" API, and automatize the switch based on data transferred,
available bandwidth or other related metrics. However we will
still need the extension to the live-migration API to include the
proper libvirt postcopy flag.
<br>
<br>
The other solution is to start all the migrations with the
VIR_MIGRATE_POSTCOPY mode, and therefore no new APIs would be
needed. The system could automatically detect the migration is
taking too long (or is dirting memory faster than the sending
rate), and automatically switch to post-copy.
<br>
<br>
The cons of this is that including the VIR_MIGRATE_POSTCOPY flag
has an overhead, and it will not be desirable to included for all
migrations, specially is they can be nicely migrated with pre-copy
mode. In addition, if the migration fails after the switching, the
VM will be lost. Therefore, admins may want to ensure that
post-copy is not used for some specific VMs.
<br>
<br>
I would like to know your opinion in this? What option would be
preferred? Is there a different option we are missing?
<br>
<br>
Thanks!
<br>
<br>
Best regards,
<br>
Luis
<br>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
-----------------------------------
Dr. Luis Tomás
Postdoctoral Researcher
Department of Computing Science
Umeå University
<a class="moz-txt-link-abbreviated" href="mailto:luis@cs.umu.se">luis@cs.umu.se</a>
<a class="moz-txt-link-abbreviated" href="http://www.cloudresearch.se">www.cloudresearch.se</a>
www8.cs.umu.se/~luis
------------------------------------</pre>
</body>
</html>