iMIG: Toward an Adaptive Live Migration Method for KVM Virtual Machines

Jianxin Li, Jieyu Zhao, Yi Li, Lei Cui, Bo Li, Lu Liu, John PanneerselvamComput. J 2015 · OpenReview

Abstract: With the energy and power costs increasing alongside the growth of the IT infrastructures, achieving workload concentration and high availability in cloud computing environments is becoming more and more complex. Virtual machine (VM) migration has become an important approach to address this issue. However, migration is a complex process affected by several factors such as bandwidth availability, application workload and operating system configurations. In this paper, we propose an adaptive approach named improved MIGration (iMIG), in which we characterize key metrics of live migration performance and conduct experiments to study their impacts on KVM functionalities and energy consumption. Our results reveal the importance of configured parameters like speed limit, TCP buffer size, and max downtime. We identify bugs in existing QEMU/KVM frameworks and develop an analytical model for better predictions. Our implementation achieves a 40% reduction in migration latency and a 45% reduction in energy consumption compared to default approaches.

Introduction

In modern cloud data centers, "live migration" is a critical capability that allows administrators to move a running Virtual Machine (VM) between physical hosts without service interruption. This process is essential for dynamic workload scheduling, hardware maintenance, and energy management. However, live migration is a "moving target." If a VM generates "dirty pages" (memory writes) faster than the network can transfer them, the migration may loop indefinitely or fail, consuming excessive energy in the process.

Existing KVM/QEMU frameworks often rely on static, "one-size-fits-all" parameters. Furthermore, researchers identified a fundamental bug in how standard QEMU calculates bandwidth, leading to inaccurate downtime predictions. There is a clear need for an adaptive system that can sense real-time network and workload conditions to optimize migration strategy.

The Live Migration Process

To understand the challenges of optimization, one must look at the standard stages of live migration, typically involving a pre-copy mechanism where memory is transferred while the VM is still active.

Stages of the VM live migration process, from pre-migration to activation on the target host.

As shown in the figure above, the process moves through iterative pre-copy rounds (Stage 2) before reaching the critical "stop and copy" phase (Stage 3) where downtime occurs. iMIG focuses on optimizing these transitions to ensure convergence and minimize service impact.

The iMIG Adaptive Framework

The researchers developed iMIG as a three-tiered solution combining empirical study, analytical modeling, and a real-time profiling patch for qemu-kvm.

The iMIG framework architecture, showing the integration of profiling tools, analytical models, and adaptive migration logic.

Methodology

  1. Empirical Study: Extensive mapping of variables such as TCP buffer size, speed limits, and VM memory size to performance and power draw.
  2. Analytical Modeling: Development of a Static Model to predict total migration time ($T_{mig}$) and a Dynamic Model to predict downtime ($T_{down}$) by tracking dirty page rates.
  3. Adaptive Patching: A suite of profiling tools monitors migration in real-time. If the system detects non-convergence, it dynamically adjusts parameters like maximum allowable downtime to force completion.

Experimental Evaluation

The system was evaluated using a variety of standard Linux benchmarks to simulate realistic cloud workloads, including Apache web servers, Linux kernel compilation, and memory-intensive applications like Memcached. Experiments were conducted on a 32-node PC cluster.

Key Findings

  • Bandwidth Bug Correction: Fixing the throughput calculation bug in QEMU/KVM was essential for accurate timing predictions.
  • TCP Buffer Sensitivity: Increasing the TCP_Buffer size (up to ~6 MB) significantly reduces migration time by saturating physical bandwidth more efficiently.
  • Energy-Latency Synergy: By reducing the time hosts spend in the high-power "migration state," iMIG naturally lowers energy consumption.
  • Convergence Control: iMIG prevents "zombie" migrations by compromising slightly on downtime when necessary to ensure the process actually finishes under high workloads.

Results and Conclusion

The iMIG approach demonstrated significant improvements over default KVM settings:

  • 40% reduction in total migration latency.
  • 45% reduction in total energy consumption.
  • Enhanced Reliability: Successful completion of migrations in high-workload scenarios where default settings often failed.

While the current implementation is based on qemu-kvm-0.12.5, the underlying analytical models provide a robust foundation for modern virtualization environments. Future work will explore "floating workloads"—where memory intensity fluctuates rapidly—and the integration of these models into broader cloud orchestration platforms.

Summary updated

Abstract

With the energy and power costs increasing alongside the growth of the IT infrastructures, achieving workload concentration and high availability in cloud computing environments is becoming more and more complex. Virtual machine (VM) migration has become an important approach to address this issue, particularly; live migration of the VMs across the physical servers facilitates dynamic workload scheduling of the cloud services as per the energy management requirements, and also reduces the downtime by allowing the migration of the running instances. However, migration is a complex process affected by several factors such as bandwidth availability, application workload and operating system configurations, which in turn increases the complications in predicting the migration time in order to negotiate the service-level agreements in a real datacenter. In this paper, we propose an adaptive approach named improved MIGration (iMIG), in which we characterize some of the key metrics of the live migration performance, and conduct several experiments to study the impacts of the investigated metrics on the Kernel-based VM (KVM) functionalities, as well as the energy consumed by both the destination and the source hosts. Our results reveal the importance of the configured parameters: speed limit, TCP buffer size and max downtime, along with the VM properties and also their corresponding impacts on the migration process. Improper setting of these parameters may either incur migration failures or causes excess energy consumption. We witness a few bugs in the existing Quick EMUlator (QEMU)/KVM parameter computation framework, which is one of most widely used KVM frameworks based on QEMU. Based on our observations, we develop an analytical model aimed at better predictions of both the migration time and the downtime, during the process of VM deployment. Finally, we implement a suite of profiling tools in the adaptive mechanism based on the qemu-kvm-0.12.5 version, and our experiment results prove the efficiency of our approach in improving the live migration performance. In comparison with the default migration approach, our approach achieves a 40% reduction in the migration latency and a 45% reduction in the energy consumption.
BibTeX
@inproceedings{li2015imig,
  author = {Jianxin Li and Jieyu Zhao and Yi Li and Lei Cui and Bo Li and Lu Liu and John Panneerselvam},
  title = {{iMIG: Toward an Adaptive Live Migration Method for KVM Virtual Machines}},
  booktitle = {Comput. J},
  year = {2015},
  url = {https://openreview.net/forum?id=EdtXz259gN},
}
Figure