# An SDN Focused Approach for Energy Aware Traffic Engineering in Data Centers
## 5 SDN Application
Green_Topology_Optimizer: This is the CPLEX module performing the optimization and some python modules to control its execution. Based on a preconfigured link power consumption model and the configuration files as created from Topology_discovery and Stats_collector modules, this module generates the optimal power state for all devices and interfaces. Port_Modifier: According to the solution generated, this module provisions the new state either via the SND-C programmable API, via OVSDB or via ovs-vsctl. The verification of our application was performed into two steps. The first step, the functional verification, consisted of the successful integration of the above compents in the physical and virtual lab environment. The second step, the performance evaluation, was carried out on the same Mininet emulated topologies as in Section 4. Thus, the optimal solution in terms of power consumption savings for each topology does not change. Topologies emulated by Mininet are depicted in Figure 6.  
Figure 6: _Cont._  
The network size of emulated topologies affects the time required for our SDN application to calculate and provision the optimal solution. Thus, we evaluated its total execution time and not only the optimization (CPLEX) part. We performed measurements for the concrete phases: (a) time required to discover network topology and compute link power consumption based on the device's energy model and link capacity; (b) flow generation for full mesh communication among hosts and their provisioning via Openflow commands; and (c) collection of flow statistics and initialization of optimization problem CPLEX solution. As shown in Table 3, the topology discovery part is the faster phase even for large topologies. The times for the flow generation and the collection of flow statistics depend only on the number of flows and end hosts and are independent of the complexity of the topology. The two initial phases have to be executed sequentially in less than 100 s in the worst case scenario. After the bootstrap, the statistics collection can forked to different processes. Measured values appearing in table must be regarded as the upper limit for this phase. Timely execution of the SDN application is of high importance since we aim at a practical implementation. As demonstrated in Table 3, execution is fast even when the MIP optimization is applied to large network topologies. Next, we compare the performance of our solution to a similar approach in existing literature [37] that requires full knowledge of the flow matrix and applies heuristic algorithms (referred to as QRTP and RQRTP) for traffic engineering. The method in [37] is selected for comparison since it is developed as an SDN application like ours, it is focused on DC network topologies and requires equivalent input for the optimization problem (flow matrix). Applying traffic \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Size** & **Topology Discovery (s)** & **Flow Provisioning (s)** & **Statistics Collection (s)** \\ \hline \multicolumn{4}{c}{**Classical 3-layer**} \\ \hline Size 1 (XS) & 0.45 & 0.942 & 0.808 \\ Size 2 (S) & 0.825 & 3.649 & 3.313 \\ Size 3 (M) & 1.495 & 17.059 & 13.203 \\ Size 4 (L) & 2.495 & 76.116 & 71.189 \\ Size 5 (XL) & 3.739 & 71.941 & 72.298 \\ \hline \multicolumn{4}{c}{**Fat Tree**} \\ \hline Size 1 (XS) & 0.608 & 0.995 & 0.879 \\ Size 2 (S) & 1.198 & 3.916 & 3.258 \\ Size 3 (M) & 5.068 & 35.099 & 23.061 \\ Size 4 (L) & 5.024 & 89.483 & 72.062 \\ Size 5 (XL) & 4.539 & 79.729 & 70.433 \\ \hline \multicolumn{4}{c}{**Leaf and Spine**} \\ \hline Size 1 (XS) & 0.599 & 0.952 & 0.856 \\ Size 2 (S) & 1.72 & 4.316 & 3.277 \\ Size 3 (M) & 3.342 & 17.562 & 13.587 \\ Size 4 (L) & 6.5 & 18.853 & 13.815 \\ Size 5 (XL) & 13.556 & 78.15 & 71.851 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Performance evaluation of SDN application. Figure 6: Network topologies under evaluation: (**a**) classical-3-layer (**b**) fat tree (**c**) leaf and spin. engineering decisions is based on QoS and network performance metrics, not on power saving criteria.