声明:
本博客欢迎转发,但请保留原作者信息!
博客地址:http://blog.csdn.net/halcyonbaby
内容系本人学习、研究和总结,如有雷同,实属荣幸!
Qemu Migration优化特性
XBZRLE (Xor Based Zero Run Length Encoding)
概述
用于降低虚拟机downtime和迁移的总时间。尤其对运行内存高负载写的虚拟机有效。
比如SAP的ERP系统这样的大型企业应用。
通过源端cache已经发送的内存页,下次发送该页时就可以对比,只发送变化部分的数据。
因此cache越大,则命中越高。
cache大小可以在迁移前调整。
用法
1. Verify the destination QEMU version is able to decode the new format.
{qemu} info migrate_capabilities
{qemu} xbzrle: off , ...
2. Activate xbzrle on both source and destination:
{qemu} migrate_set_capability xbzrle on
3. Set the XBZRLE cache size - the cache size is in MBytes and should be a
power of 2. The cache default value is 64MBytes. (on source only)
{qemu} migrate_set_cache_size 256m
4. Start outgoing migration
{qemu} migrate -d tcp:destination.host:4444
{qemu} info migrate
capabilities: xbzrle: on
Migration status: active
transferred ram: A kbytes
remaining ram: B kbytes
total ram: C kbytes
total time: D milliseconds
duplicate: E pages
normal: F pages
normal bytes: G kbytes
cache size: H bytes
xbzrle transferred: I kbytes
xbzrle pages: J pages
xbzrle cache miss: K
xbzrle overflow : L