分类: 虚拟化
2014-08-12 16:33:47
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