## 3 Cost Model and Problem Description
### Cost Model
#### 3.1.2 Cost of VM Migration  
We assume that at the beginning of each time segment, the CDC performs server consolidation to balance between the CSP's cost and the user's performance. VM migration is an important part of server consolidation. The majority of data transferred during VM live migration are from the memory of VM. Although the VM generates several dirty pages during live migration, [PERSON] et al. [26] found that the energy consumption of VM live migration is positively related to the memory size of the migrating VM. The larger the VM memory at the time of migration, the longer the migration time and the more energy consumption. In CDC, migrating a VM \(v_{j}\) from host \(h_{i}\) to another host \(h_{i^{\prime}}\) requires additional resources provided by \(h_{i}\) to support the process. We assume that \(h_{i}\) reserves enough resources to complete the migration of \(v_{j}\), and \(h_{i^{\prime}}\) also reserves enough resources to receive \(v_{j}\). The work conducted by [PERSON] et al. [6] on server consolidation is based on the assumption that a VM consumes an additional 10% of CPU usage during migration. In this paper, we extend this assumption to the VM usage with respect to all four computing resources in migration. In addition, in order to speed up batch VM migration and reduce the impact on user services during batch VM migration, we assume that CDC deploys an exclusive NIC and network for migration tasks, and here the size of the exclusive migration bandwidth of \(h_{i}\) is \(MIG\_NET_{i}\). Therefore, the VM migrations cloud be completed within a time segment. This part of the cost is denoted as \(C_{k}^{mig\_net}\). In this paper, the total cost of VM migration of a CDC in a given life cycle is denoted as \(C_{mig}\). Since the power model of CPU is a nonlinear exponential model, and the power model of other resources are linear, \(C_{mig}\) can be described as:  
\[C_{mig}=\sum_{k=1}^{L}(C_{k}^{cpu}+C_{k}^{mig}+C_{k}^{mig\_net}), \tag{10}\]  
where \(C_{k}^{cpu}\) is the cost caused by CPU when migrating VMs within \(t_{k}\), and \(C_{k}^{mig}\) is the cost caused by non-CPU resources when migrating VMs within \(t_{k}\). \(C_{k}^{mig}\) is described as:  
\[C_{k}^{mig}=\sum_{i=1}^{N}\sum_{j=1}^{M}\sum_{i^{\prime}=1}^{N}(EP\times \gamma_{j,i,i^{\prime},k}\times p_{j,k}^{mig}\times t_{j,k}^{mig}), \tag{11}\]  
where \(\gamma_{j,i^{\prime},k}\) is a 0-1 indicator, \(p_{j,k}^{mig}\) is the power of migrating \(v_{j}\), and \(t_{j,k}^{mig}\) is the time spent migrating \(v_{j}\). If \(v_{j}\) is migrated from \(h_{i}\) to \(h_{i^{\prime}}\), then \(\gamma_{j,i,i^{\prime},k}=1\); otherwise \(\gamma_{j,i,i^{\prime},k}=0\). Furthermore, it is obviously that \(t_{j,k}^{mig}<T\). Since VM memory is the majority data transferred during migration, there are:  
\[t_{j,k}^{mig}=\frac{s_{j,k}^{mem}}{mig\_bw_{i,k}}, \tag{12}\]  
where \(mig\_bw_{i,k}\) is the migration bandwidth size allocated by \(h_{i}\) to \(v_{j}\). We assume that the dedicated migration bandwidth is evenly allocated to each migrated VM within \(t_{k}\) on \(h_{i}\). Hence, for a given \(h_{i}\) and a \(h_{i^{\prime}}\), we have:  
\[mig\_bw_{i,k}=\frac{MIG\_NET_{i}}{\sum_{i=1}^{N}\sum_{j=1}^{M}\sum_{i^{\prime} =1}^{N}\gamma_{j,i,i^{\prime},k}}, \tag{13}\]  
then  
\[t_{j,k}^{mig}=\frac{s_{j,k}^{mem}\times\sum_{i=1}^{N}\sum_{j=1}^{M}\sum_{i^{ \prime}=1}^{N}\gamma_{j,i^{\prime},k}}{mig\_bw_{i,k}*MIG\_NET_{i}}. \tag{14}\]  
Then, we substitute Equation (14) into Equation (11). We let \(p_{j,k}^{mem}\), \(p_{j,k}^{disk}\), and \(p_{j,k}^{met}\) be the memory, disk, and network power of \(v_{j}\) within \(t_{k}\), respectively. The migration cost regarding memory of \(v_{j}\) is \(0.1\times p_{j,k}^{mem}=0.1\times a_{i}^{mem}\times s_{j,k}^{mem}\), the migration cost regarding memory of \(v_{j}\) is \(0.1\times p_{j,k}^{mdsk}=0.1\times a_{i}^{disk}\times s_{j,k}^{disk}\), and the migration cost regarding network of \(v_{j}\) is \(0.1\times p_{j,k}^{mnet}=0.1\times a_{i}^{NIC}\times u_{i,NIC}^{NIC}\).