On Wed, Apr 26, 2017 at 07:26:53PM +0800, Chao Fan wrote:
Hi all,
When migrating a guest which consumes too much CPU & memory, dirty
pages amount will increase significantly, so does the migration
time, migration can not even complete, at worst.
So I made an RFC patch in QEMU to set cpu throttle value by workload
when migration. The test result and the RFC patch are here:
https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg03479.html
But this idea was not accepted by QEMU community. So I want to do a
similar feature in libvirt:
Step 1: Add --auto-converge-smart parameter to migrate.
Step 2: Add a timer in qemu-driver to get the 'info migrate' to check
if the dirty-pages-rate updated every 1 second or 0.5 second
when migration.
Step 3: If updated, change the cpu throttle value according to the
dirty-pages-rate and page-size by
'migrate_set_parameter cpu-throttle-increment'
I think this feature makes auto-converge smarter than leaving the
cpu throttle value with default 20/10 or set by users.
And also it can save time.
Libvirt design goal is to *not* implement such policies in our
code. Instead we aim to expose the mechanisms that higher level
applications can use to implement policies themselves. Both
OpenStack and OVirt already use these mechanisms to apply migration
policies. So any ideas like the ones you suggest should be proposed
to the one or both of those apps as desired.
Personally though I view post-copy migration as a more viable long
term strategy, because it allows migration to complete in a predictable
guaranteed timeframe without harming guest workloads to the extent that
things like autoconverge do.
Regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|