This feature provides a method for dynamically throttling guest cpus during autoconverge migrations in order to force migration of very busy guests to complete.
With extreme memory write intensive workloads, normal live migration will never complete because the guest is writing to memory faster than Qemu can transfer the memory changes to the destination system. In this case normal migration will continue forever, not making enough progress to stop the guest and proceed to the non-live "finishing up" phase of migration.
This feature provides a method for slowing down guest execution speed, thus hopefully, also slowing down guest memory write speed. As time advances autoconverge will continually increase the amount of guest cpu throttling until guest memory write speed slows enough to allow the guest to be stopped and migration to finish.
It should be noted that some workloads may not benefit from autoconverge. There may be workloads where memory write speed is not significantly dependent on cpu execution speed. Autoconverge will likely be ineffective for these workloads as it relies on the assumption that throttling cpu will also effectively throttle memory write speed.
Autoconverge was originally introduced in Qemu 1.6 to deal with the above situation however the mechanism used to slow guest cpus was not dynamic and ineffective for many memory write intensive workloads. As of Qemu 2.5 dynamic throttling has been added to autoconverge dramatically increasing its effectiveness.
Many previously non-migratable workloads become migratable.
From the Qemu monitor before starting your migration:
migrate_set_capability auto-converge on
Now start your migration as you normally would:
migrate -d tcp:destination:port
If auto-converge activates throttling then the throttling percentage will be displayed on the info migrate command:
cpu throttle percentage: 20
The initial throttling percentage defaults to 20%. This value is a migration parameter and can be changed with migrate_set_parameter:
migrate_set_parameter x-cpu-throttle-initial 30
If after a period of time the migration has still not completed then throttling is incremented. This process continues until migration completes or we reach 99% throttled. By default the throttling rate is always incremented by 10%. This increment is a migration parameter and can be changed with the migrate_set_parameter:
migrate_set_parameter x-cpu-throttle-increment 15
Both x-cpu-throttle-initial and x-cpu-throttle-increment can be queried with info migrate_parameters: