## 4 Workload and Data Center Modeling
### Analytical Modeling Approach
#### 4.1.1 Workload Modeling
Here, \(T_{ret}\) represents the total number of resubmitted tasks in a specific time window. \[P(T_{net})=\frac{{(T_{net}^{e})}{(T_{net}^{e})}{(T_{cft}^{e})}}{{\frac{{T_{st} +T_{rt(t-1)}}}{{T_{ct}}}}},\ T_{net}\leq T_{et}. \tag{11}\]  
The Poisson process is used to model the number of submitted jobs and tasks with the average arriving rate \(\mu_{j}\) multiplied by time window \(T_{w}\), multiplied by the probability cumulative distribution function CDF \(P(J_{st}(j)\leq j)\). The job and task arriving process is depicted in Equation (12). The same relation applies to Alibaba traces, where the Poisson process and exponential random variable describe the submitted and ended instances. \[ \begin{split} J_{st}(j)=\mu_{j}\times T_{w}\times P(J_{st}(j) \leq j),\\ T_{st}(i)=\mu_{i}\times T_{w}\times P(T_{st}(i)\leq i).\end{split}  \tag{12}\]  
The exponential random variable process is used to model the number of ended tasks \(T_{et}\), where the exponential random is a special case in a Gamma distribution when \(r=1\). The expected value of the number of non0 finished tasks \(T_{net}\) is applied to a hypergeometric distribution \(E(T_{net})=\frac{T_{et}}{T_{st}}\) as Equation (13) describes the ended task states (ended tasks that complete \(T_{cft}\), and tasks ended without completion \(T_{net}\)). \[ \begin{split} T_{et}=\mu_{\Gamma}\times\Gamma(T_{et})\times P(T_ {et})\times T_{w},\\ T_{net}=T_{et}\times P(T_{net})\times E(T_{net})\times T_{w},\\ T_{cft}=T_{et}-T_{net}.\end{split}  \tag{13}\]  
Algorithm 1 describes the workload modeling using the previously defined equations. Table 2 summarizes the workload and data center mathematical model notations. ```
1:\(RD\)\(\prime\)\(R\)D Workload requested demand trace. */
2:while true do
3:\(t\gets 0,T_{w}\gets 180\) /* Initialize starting time and time window size, time in second. */ /* Training Part, in current time window \(T_{w}\). */
4:\(X\gets readLogs(T_{w})\) /* Read workload trace during window time, store it in array X. */
5:\(CT\gets t*T_{w}\) /* Update current time. */
6:\(J_{st},T_{fl},T_{et},T_{net},(R_{ij}\in R),(RE_{i}\in RE)\gets FindStatistics(X)\) /* Get workload statistical parameters value from log array X. */
7:\(R_{t}\leftarrow\) Equation (2)
8:\(RE_{t}\leftarrow\) Equation (3)
9:\(RR_{t}\leftarrow\) Equation (4)
10:\(RD_{t}\leftarrow\) Equation (5)
11:\(W_{t}\leftarrow\) Equation (6) /* Using derived equations in sequence to find workload demand \(W_{t}\). */
12:\(\bar{x_{l}},\bar{x_{T}},g_{t}^{2},g_{t}^{2}\leftarrow\) Equation (8)
13:\(\mu_{j},\mu_{i},\sigma_{j}^{2},\sigma_{i}^{2}\leftarrow\bar{x_{j}},\bar{x_{T}}, g_{t}^{2},g_{t}^{2}\) /* Set random variable values. */
14:\(P(J_{st}(j)),P(T_{st}(i))\leftarrow\) Equation (7) /* Find submitted j jobs and i tasks probability. */
15:\((R_{ij}=RE_{i})\in R\leftarrow\) Equation (9) /* Find average workload request. */
16:\(P(T_{et})\leftarrow\) Equation (10) /* Find Gamma constant and probability of end tasks. */
17:\(P(T_{net})\leftarrow\) Equation (11) /* Find probability of ended tasks that are not finished. */
18:\(t\gets t+1\) /* Update time index. */
19:\(\bullet\)Prediction Part, next time window \(T_{w+1}\). */
20:\(J_{st}(j),T_{st}(i)\leftarrow\) Equation (12)
21:\(T_{et},T_{net},T_{eff}\leftarrow\) Equation (13) /* To predict next logs parameters values. */
22:\(R_{t}\leftarrow\) Equation (2), \(RE_{t}\leftarrow\) Equation (3), \(RR_{t}\leftarrow\) Equation (4), \(RD_{t}\leftarrow\) Equation (5), \(W_{tp}\leftarrow\) (6) /* Find all next parameters, where \(W_{tp}\) represents predicted workload. */
23:endwhile
```  
**Algorithm 1** Workload Modeling.