Live Migration of Virtual Machines using Mirroring Technique

Corresponding Author: Umamakeswari Arumugam SASTRA Deemed University, School of Computing, Thanjavur, India Email: a_umamakeswari@yahoo.com Abstract: Virtualization is a key concept in empowering the “Infrastructure asa-Service (IaaS)” of cloud-based services. Live migration of virtual machines is the process of moving virtual machine from one physical host to another without interrupting other VMs. Migration of VMs supports the improved efficiency of resource usage and dynamic resource provision capabilities. The performance metrics of live migration are down time and total migration time. In this paper, a technique to reduce the total migration time of standard memory migration using the mirroring of VMs at destination host is proposed. It mainly concentrates on the total migration time and maximum profit of providers. The proposed technique avoids the iterative transmission of memory pages from the source host to destination host. Performance results depict that the proposed algorithm can reduce 36% of the data transmitted during migration and 26% of the total migration time when compared with pre-copy migration technique.


Introduction
Cloud computing (Josep et al., 2010) has been envisioned as the current generation architecture of IT enterprise. It provides infrastructure-as-a-Service (IaaS) (Bhardwaj et al., 2010) to the users as pay per usage basis. Virtualization technology is one of the key factors in the area of cloud computing. It separates the operating system from the underlying phyigsical machine using a hypervisor. Each virtual machine instance is having its own operating system called guest operating system. Virtualization technology provides maximum profit to the cloud providers with less maintenance cost. It allows the creation and migration of virtual machines on a physical host.
Virtualization allows the creation of multiple instances on the top of a server/host such that multiple applications can run independently. Virtual Machine (VM) is an instance which takes network, memory and I/O resources based on the user request. Figure 1 shows the framework for virtualization of physical host which is of Type-I virtualization. In Type-1 virtualization, the virtual machine monitor called Hypervisor sit directly on the hardware and multiple VM's can be hosted over Hypervisor. Each VM can run multiple applications in its own operating system. Cloud provider allocates the VM to the user based on his/her request. VMs are independent of the underlying heterogeneous Physical Machines (PM).
Live migration expands upon the thought of migration and makes it a step further. Live migration is the process of transferring Virtual Machine (VM) from one host to another without interrupting the running VMs. The "live" in live migration states that the movement should be transparent to the clients. The migrating VM should be active on source machine during the migration process. This process is useful when datacenters are facing problems like cold spots, hotspots and load unbalancing. The hotspot is the overloaded condition of a PM, where the performance of a system falls below the minimum acceptance level. The underutilization of physical machine can be defined as cold spot situation and load imbalance can occur when some machines are heavily loaded and some are lightly loaded in a datacenter.
The performance of live migration process is evaluated based on two metrics: total migration time and downtime. The duration between the start and end of the migration process is called as total migration time. The unresponsive time period of virtual machine during migration is defined as downtime. The key challenge of live migration process (Clark et al., 2005) is to optimize the downtime and total migration time.

Pre-Copy Migration
Pre-copy is a predominant memory migration technique used today by many hypervisors like VMware, Xen and KVM. It works by copying the memory of the virtual machine from the source and then transfers it to the destination iteratively without suspending the VM on the source node. In the first iteration, the whole memory is transferred from the source to destination. In the following iterations, the modified memory pages can be transmitted iteratively. This process continues until the source halts the execution of VM after transferring the last modified memory pages to the destination machine. Pre-copy (Sharma and Chawla, 2016) method consists of the following steps to migrate a VM from source to destination: 1. Initialization: The VM which is to be migrated can be selected at source machine either by direct or holistic approach 2. Reservation: This phase will check whether the destination host is having enough resources to copy the VM 3. Iterative Pre-copy: In first phase entire RAM of VM is transferred. The subsequent modified pages can be transmitted in the next iterations 4. Stop and copy: Once the pages are copied to the destination machine, suspend the VM and copy the remaining pages to destination 5. Commitment: Once a VM is copied to the destination, it will check the consistency of a VM 6. Activation: The copied VM on the destination is activated Traditional Pre-copy method (Ma et al., 2010) (Svard et al., 2011, Time series approach (Hu et al., 2011) Memory Compression (PhyuZaw and Memory Ballooning (Hines and Gopalan, 2009;Barham et al., 2003), Working Set algorithm (Carr and Hennessy, 1981;Seok et al., 2011;Zaw and Thein, 2012) are the various methods adopted to improve the pre-copy technique. Sahni and Varma (2012) proposed a hybrid approach, which is a combination of two traditional approaches pre-copy and post copy methods. Generally, the standard migration methods like pre and post copy algorithms consume more downtime. This approach reduces the downtime by sending subset of most frequently used memory pages. This method reduces the number of page faults which occurred at post copy. An alternative way to hybrid method, (Agrawal and Pateriya, 2013) introduced live migration based on enhanced time series. This approach is done by iterative transmission of VM pages from source to destination. This algorithm suffers with iterative transmission of dirty page rate.
This paper aims to decrease the total migration time using the mirroring of VMs. The pre-copy method takes more total migration time because it has to transmit the memory pages iteratively. This method is not suitable for write intensive applications. In the proposed algorithm it is not necessary to transfer dirty memory pages iteratively to destination host because of one pass RAM copy.
In Section 2 live migration of VM based on the mirroring algorithm and its mathematical formulation is discussed. Section 4 describes the simulation environment and performance results. Finally, Section 5 includes the conclusion.

Mirroring of VMs
Cloud datacenter consists of a controller and computing nodes and Fig. 2 depicts the live migration process at datacenter using three nodes. Virtual machines are created on the top of computing nodes and can hold the resources of computing nodes. These nodes are managed by the controller node. Controller node has the authority to send messages between the computing nodes and it can directly interact with the user. The controller nodes provides the Application Programming interface (API), scheduling and other services necessary for managing the cloud resources. If computing nodes suffer with load imbalance then controller node initiates the migration of virtual machines present on computing nodes.
The mirroring algorithm can be carried out by using two layers present on the controller node: Data mover and mirror block. The first iteration of the proposed algorithm is similar to the pre-copy method. Data mover activates the one-pass RAM copy from one computing node to another computing node. It copies the files in a sequential manner to the destination node. Controller node stores the migrated VM list in linked hash table with user-id as index. When user wants to modify the memory pages at computing node, controller node verifies whether that particular page is migrated or not to the other computing node. If the page is migrated then mirror block transfers the control from one computing node to another node. Now user directly modifies the page of migrated VM present at destination computing node. Once the data mover copies all the This approach can be considered as a modified precopy method where the total migration time is reduced. The following steps are carried out in the proposed method and the logical steps to migrate a VM are summarized in Fig. 3. 1. Initialization: Target VM is selected for migration based on direct or holistic approach 2. Reservation: Reserves the resources for a VM on destination node 3. Copy phase: Data mover present at the controller will copy the RAM from source to destination node 4. Mirroring phase: Mirror activation block transfers the control from source to destination whenever a user wants to modify the memory pages of already copied RAM 5. Stop and activation Phase: Once data mover copies the RAM, the VM can be removed from the source and is activated in the destination  Step 1: Initialization -> Selection of VM to be migrated Step 2: Reservation -> Reserve the resources at destination Step 3: Copy phase -> Data mover copies the entire RAM to destination Step 4: Mirroring phase -> Mirror block transfers the control signal Step 5: Stop and Activation -> Stop VM at source and activate at destination Post-copy overhead Post-copy overhead

Key Parameters
The proposed method can be defined based on data transmission and control signal transmission parameters. In the traditional approach, the live migration performance is measured using the data transmission parameters like total migration time and down time. Total migration time is the time taken between the start and end of migration process. Down time is the unresponsive time of a virtual machine during migration.
Additionally, a control signal transmission parameter is used in the proposed methodology. Control transfer time is the time at which a control signal has to transfer from one computing node to another.
The time required to spent for all the above five stages is defined as the total migration time. The copy and mirroring phases dominate the total migration time due to high memory modification rate. The first two steps and the activation are considered as the pre-copy and post-copy overheads respectively.

Characterizing the Migration Performance
Migration performance (Liu et al., 2011) is characterized by calculating the total migration time and the total down time. Let Cp1, Cp2 be the computing nodes holding virtual machines and Cr is a controller node that performs the live migration of VMs at Cp1 and Cp2. The VM size can be varied based on the user request can be denoted as  and the control signal size can be denoted as . The link speed to transfer the data and control signal can be taken as . Let the migration of VM requires _1 data transmission signals and _2 control transmission signals between the controller and computing nodes.
Total migration time can be computed from the initialization to the activation phase including the copy phase. The migration of a VM depends on the size of a VM and link speed of a network. The pre and post-copy overheads are combined as overheads in the given formula. The time needed to send RAM copy along with overheads can be defined as Migration Time (MT) and is given in Equation 1: In the proposed method memory of a VM transfers only once from one computing node to another and hence the migration time can be calculated using Equation 1. Down time is the duration between halting of VM at the source and its activation at the destination.
The time to transfer the control signal from source to destination can be called as control signal transmission time and is determined using Equation 2. This time is lesser than the data signal transmission time because the size of a control signal is in terms of bytes and the data transmission is in terms of Giga Bytes: The Idle case of migration can be considered as the multiple read operations performed by a user without modifying the memory pages. The number of control signal transfers is equal to zero in idle case. Thus, the lower bound of control signal transfer time is equal to zero. Then again, consider the situation where all the memory pages are being changed as quickly as link speed. In this situation number of control signal transfers is equal to the number of memory pages present in a VM. Hence The mirror based live migration of VMs is depicted in algorithm1. This approach will be very effective in case of write intensive applications where frequent modifications of memory pages will be done by a user. The total migration time is less in contrast to the existing methods so that the cloud provider will get maximum profit.

Materials and Methods
Traditional pre-copy and proposed mirroring algorithm has been evaluated with varying link speeds and VM sizes.

Simulation Environment
The proposed mirroring algorithm is simulated by java with respect to link speeds and VM sizes. The performance of proposed algorithm can be compared with two existing migration algorithms: pre-copy and Least Recently Used (LRU) Migration method (Zaw and Thein, 2012). LRU method transfers the least recently used memory pages first to the destination node while migrating the VM: Controller node and computing nodes are created in the simulation environment. Computing nodes create the VMs based on the user request and provide the resources to them. When controller node triggers the migration process the number of data transfers can be needed to transfer the VM between the computing nodes. When user requests to update the memory pages, the computing node transfers a control signal to destination node. The number of control signal transfers required in the proposed method are more when compared to the above two approaches.
The simulation experiments were performed over the following parameter settings:  Each Computing node holds a number of existing VMs. This count is randomly taken from 0 to 10  The size of a VM can lies in between (64 MB to 1024 MB) and Its based on the user request  The number of files present in the VM can vary from 10 to 100  The link speed is assumed to be within [10 Mbps,10 Gbps] for transmitting the data between the computing nodes

Total Migration Time
The total migration time for a proposed method can be analyzed using pre-copy algorithm and LRU approach. Total migration time depends on the link speed of a network and size of a VM. Figure 4 shows the comparison among the three algorithms, where both pre-copy and LRU need more total migration time than the proposed method. As a link speed increases, the total migration time decreases drastically in all the methods. The total migration of these three algorithms is shown in Fig. 4.

Total Data Transfer Rate
The pre-copy method iteratively transfers the modified pages between the computing nodes so the data transfer rate is higher. Figure 5 represents the number of data line transfers among three approaches. As the VM size increase substantially, the number of data line transfers are more in pre-copy and LRU methods than the proposed algorithm.

Cloud Provider's Profit
Cloud provider offers the services as VMs, which have different resource limits with relating charges.  Figure 6 shows the produced benefits by making distinctive sizes of VMs from 64 MB to 1024 MB and Table 1 shows the snapshot results obtained using simulation. The benefits of all algorithms increment with the size of VMs. Compared with other two existing algorithms, the proposed algorithm can achieve profits by 48% and 38% respectively.

Conclusion
Live migration of virtual machines is the process of moving virtual machine from one physical host to another without interrupting other VMs. Migration of VMs supports the improved efficiency of resource usage and dynamic resource provision capabilities. The performance metrics of live migration are down time and total migration time. This paper reduces the total migration time of standard memory migration techniques by introducing the mirroring of VMs at destination host. It mainly concentrates on the Total migration time and maximum profit of providers. The proposed technique avoids the iterative transmission of memory pages from the source host to destination host. Performance results depict that the proposed algorithm can reduce 36% of the data transmitted during migration and 26% of the total migration time when compared with pre-copy migration technique. In Future we will extend the proposed technique to reduce the down time of VMs.