## 3 Cost Model and Problem Description
### Cost Model
#### 3.1.1 Cost of Host Energy Consumption  
Given a host \(h_{i}\), its cost \(C_{h_{i}}\) during operation is mainly related to the electricity fee \(EP\) and its power \(p_{h_{i}}\), which is:  
\[C_{h_{i}}=\sum_{k=1}^{L}(EP\times p_{h_{i}}\times T\times\lambda_{i,k}). \tag{1}\]  
It should be noted that if \(h_{i}\) is powered off or in a power-saving state, its power consumption is negligible, so it will not incur any electricity-related costs. In CDCs, in order to meet the various business demands of a large number of different users, almost all hosts are high-power and high-performance components. Therefore, it is impractical to model host power consumption only by analyzing the CPU. [PERSON] et al. [44] calculated that the average energy consumption of CPU in the host is about 37%. It should be noted that when users create or apply for a VM in a CDC, they need to directly specify the relevant parameters of the CPU, memory, disk, and network devices. Here, we can think that the host power consumption is related to the four resources: CPU, memory, disk, and network interface card (NIC). Therefore, in this paper, we build the power consumption model of the host based on these four resources:  
* **CPU power model** [PERSON] et al. [6] leveraged a linear CPU power consumption model, that is, the current energy consumption of the CPU is directly related to its usage rate. When the CPU usage increases, the power of the host increases linearly. Although the linear model is simple to calculate, the result is lower than the actual power consumption value and the accuracy is not enough [24]. Therefore, we adopt an exponential model to fit the power consumption of the CPU. Under normal circumstances, even if the working host is in idle state (the CPU usage rate is 0), the CPU will also generate a certain amount of energy consumption. This part of the energy consumption needs to be considered. Hence, the CPU power \(p_{i,k}^{cpu}\) of host \(h_{i}\) in \(t_{k}\) can be described as:  
\[p_{i,k}^{cpu}=p_{i,tile,i}^{cpu}+(p_{peak,i}-p_{i,tile,i})\times(u_{i,k}^{cpu} )_{i}^{cpu}, \tag{2}\]  
where \(p_{i,tile,i}^{cpu}\) is the CPU power of \(h_{i}\) in idle state, \(p_{peak,i}\) is the CPU power of \(h_{i}\) when it is running at full load, \(u_{i,k}^{cpu}\) is the usage rate of the CPU at any time in \(t_{k}\), and \(\alpha_{i}^{cpu}\) is the fit index. Here, we assume that the CPU usage at any time in \(t_{k}\) is equal and is \(u_{ik}^{cpu}\). For a given CPU model, the powers in idle state and at full load are fixed values. According to [45], the value of \(\alpha_{i}^{cpu}\) varies with the CPU usage. However, in general, the CPU power can be described more accurately when \(\alpha_{i}^{cpu}=0.75\)[45]. * **Memory power model** The power consumption of memory is related to its reading and writing. Accurately monitoring the read and write speed of memory in real time is too expensive. An alternative low-overhead solution is to estimate the throughput of memory through last level cache (LLC) miss counter available in processors. However, this approach is still impractical because the specific instructions associated with LLC misses are different in different CPU models [22]. In fact, in all public host or VM workload trace datasets, the provided memory-related data are the memory usage in certain periods of time. Therefore, we use the current footprint of memory (current usage of memory) \(u_{i,k}^{mem}\) to estimate the power \(p_{i,k}^{mem}\) of host \(h_{i}\):  
\[p_{i,k}^{mem}=p_{i,tile,i}^{mem}+\alpha_{i}^{mem}\times u_{i,k}^{mem}, \tag{3}\]  
where \(p_{i,tile,i}^{mem}\) is memory power of \(h_{i}\) in idle state, \(\alpha_{i}^{cpu}\) is the fit index, and \(u_{i,k}^{mem}\) is the usage rate of memory at any time in \(t_{k}\). Here, we assume that the memory usage at any time in \(t_{k}\) is equal and is \(u_{i,k}^{mem}\). According to statistics, for a DDR memory system, when \(\alpha_{i}^{mem}=0.3\) W/GB, the memory power can be estimated more accurately [46].