Hello, I was playing with live migrations and tuning them for better speed. I also try to use post-copy method, but don’t have userfaultfd
feature enabled in kernel :(. So I try to use compression and tune it param cache size
. After testing I decided to use 512MiB size for cache size
.
I have to edit few files:
/var/lib/one/remotes/vmm/kvm/kvmrc
...
MIGRATE_OPTIONS=--compressed
...
/var/lib/one/remotes/vmm/kvm/migrate
...
deploy_id=$1
dest_host=$2
# set compression cache size before migration run, set to 512MiB
virsh --connect $LIBVIRT_URI migrate-compcache $deploy_id --size 536870912
exec_and_log "virsh --connect $LIBVIRT_URI migrate --live $MIGRATE_OPTIONS $deploy_id $QEMU_PROTOCOL://$dest_host/system" \
"Could not migrate $deploy_id to $dest_host"
...
/var/lib/one/remotes/vmm/kvm/migrate_local
...
deploy_id=$1
dest_host=$2
src_host=$3
# set compression cache size before migration run, set to 512MiB
virsh --connect $QEMU_PROTOCOL://$src_host/system migrate-compcache $deploy_id --size 536870912
virsh --connect $QEMU_PROTOCOL://$src_host/system \
migrate --live $deploy_id $MIGRATE_OPTIONS $QEMU_PROTOCOL://$dest_host/system
...
Will be good have this in official code or have some other way how to set migrate-comcache
and other params like migrate-setspeed
and migrate-setmaxdowntime
before migration