## 4 Workload and Data Center Modeling
### Analytical Modeling Approach
#### 4.1.2 Data Center Modeling
Bayesian networks use the five machine classes as states, in addition to the following three states: (a) adding a new machine \(NM\), (b) removing or replacing a failed machine \(FM\) and (c) upgrading a machine \(UM\). These three states are auxiliary states for data center capacity scaling and maintenance that are included in Bayesian networks to reflect data center machine configuration. Figure 9 presents a full diagram of the machine states in a Bayesian network and their relationships. In Definition 1, a Bayesian network must be an acyclic graph where an event sequence occurs in chronological order. To scale up the resources, each machine will transit based on the previous evidence (event already happened) in a sequential order of states. The same assumption is applied for the scaling down of resources but in the reverse sequential order. Both models of scaling types (in/out) are integrated together as Markov hidden layers architecture, as in Figure 9. The transition condition follows the conditional probability of machine states that happen as a sequence of events for each machine that is selected in both scaling types. The Alibaba data center scaling does not have a sequential process in adding machines because there is a high fluctuation in provisioning the resources, as seen in Figures 5 and 6. On the other hand, the Google data center has smooth scaling, as shown in Figure 8. A Bayesian network model is, therefore, not a good model for Alibaba data center scaling. **Definition 1** (Bayesian Network Definition). : _Let_  
\[X=(X_{1},\dots,X_{n})\]  
Figure 8: Data Center Provision Resources Shape. Figure 9: Machine States in a Bayesian Network. be a set of random variables. A Bayesian network is a directed acyclic graph (DAG) that specifies a joint distribution over \(X\) as a product of local conditional distributions, one for each node. Equation (14) depicts the probability distribution._  
\[P(X_{1}=x_{1},...,X_{n}=x_{n})=\prod_{i=1}^{n}P(x_{i}x_{parents(i)}). \tag{14}\]  
The transition probability values are found using statistical analysis and probability random variable modeling. The probability of adding new machines \(P(NM_{t})\) in the new machine \(NM\) state follows a uniform distribution over the time window, as Equation (15) depicts. \(M_{n}\) is the average number of added machines in time window \(T_{w}\). The new machine state \(NM\) is the state representing the installation of new servers in a data center but not in production mode, where new resources are not yet available. The upgraded state \(UM\) also represents machines in non-production modes that are not participating in data center operations. After adding the new servers or machines, the new machine will be in production mode starting from state \(A\) (where all new and upgraded machines have maximum resources, \(MU\)). The probability \(P(A)\) of moving new and upgraded machines to the serving mode follows a Poisson random process with an average arrival rate \(\lambda_{A}\) in time window \(T_{w}\). Using [PERSON]'s law of new machines, \(A_{t}\) is found in state \(A\) as a queuing model, as Equation (16) depicts, where \(T_{A}\) is the serving time (time of machine staying in the same state). \[P(NM_{t})=\frac{1}{M_{n}}. \tag{15}\]  
\[P(A)=P(NM_{t})\times T_{w},\]  
\[A_{t}=\frac{\lambda_{A}\times T_{w}}{T_{A}}. \tag{16}\]  
Based on the Bayesian network definition described in Equation (14), the probability of machine state transitions is dependent on the previous state evidence and average serving time in its states \(T_{A},T_{B},T_{C},T_{D},T_{E},T_{UM},T_{NM}\). For failure machine state \(FM\), time \(T_{FM}=\infty\), which means no machine will get out of that state. We call it a black hole state. The transition probability between all states is found statistically by reading the real log traces for all states. The probability of failure follows an exponential random variable with an expected value of \(\lambda_{FM}\), which is also found statistically.