# SDN-Based Routing Framework for Elephant and Mice Flows Using Unsupervised Machine Learning
## 4 Results and Analysis of Experiment
### Results and Evaluation  
This experiment was implemented with a CSV file for each DCN topology. Each file contains 1 million flows and 129 features regarding network performance metrics. These features can be found in Appendix A. The 129 features were chosen based on their efficiency in the clustering model [42]. For each TCP flow, we have all the network performance parameters, such as packet loss, round trip time (RTT), and throughput. To reduce the dimensions of the dataset, the PCA technique was applied. A total of 13 PCA components were input into the clustering process. It is the best number of components to achieve a balance between completeness and simplicity [38]. The outputs of the clustering and identification steps are three clusters. Each cluster consists of a group of elephants and mice flows, which have distinct characteristics. In each cluster, the representative flow are selected for each type of flow. To find the best path for each elephant and mice flow, a developed Dijkstra algorithm was utilized. The flow types and description for the experiments are provided in Table 2.  
Figure 8 depicts the routing process of each type of flow (elephant or mice) for all three clusters. To accomplish a high efficiency and obtain a higher throughput, a flow of the elephant type is sent by more than one path. At the same time, some available paths are kept to serve higher-priority flows, such as real-time traffic. The top left corner of the figure presents the best path that has been selected by the proposed algorithm (Widest-Dijkstra algorithm) for all elephant flows in cluster 1. Using the same technique, the best path for the elephant flows in clusters 2 and 3 are chosen. On the other hand, the bottom right corner of the figure shows the best path for the mice flows in the three clusters. This path has been selected based on Algorithm 5 and the Dijkstra algorithm. The figures clarify the used links with a green dotted line, whereas an unused link is represented by a red dashed line. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Flow Type** & **Port Number** & **Protocol Service** & **Packet Rate** & **Method to Apply** \\ \hline Elephant & 88 & HTTP & 1 M & Multipath \\ Elephant & 443 & HITPS & 300 K & Multipath \\ Elephant & 20 & FTP & 22 K & Multipath \\ Elephant & 25 & SMTP & 12 K & Multipath \\ Mice & 514 & Syslog & 632 K & Singlepath \\ Mice & 88 & Kerberos & 220 K & Singlepath \\ Mice & 119 & NNTP & 125 K & Singlepath \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Routing Traffic Based on Flow Types. Figure 8: Flow Paths in the Network Using the Proposed Method. The evaluation results show the effectiveness of the proposed flow routing optimization method against the SDN-Ryu controller. Employing a developed Dijkstra algorithm to optimize flow routing results in improved network performance in relation to data center network resources. Furthermore, the evaluation aims to present the benefit of routing-based traffic management over network performance, regardless of the routing of a particular type of flow that is being optimized by the developed routing algorithm, using the SDN framework. The evaluation of the proposed system conducted for both topologies is provided in Figures 3 and 4. The first test includes a comparison between the SDN-Ryu controller and the proposed system based on their performance using the DCN topology in Figure 3. The comparison is accomplished based on the throughput and bandwidth parameters. As shown below in Figure 9, the proposed application provides a higher throughput than the Ryu controller. This is achieved for all flows. For example, at flow number 10, the throughput of the proposed application improves by a ratio of 61.5% compared to the throughput of the Ryu controller. In addition, it is observed that a higher number of parallel flows leads to a decline in the throughput for both the proposed application and the Ryu controller. However, the performance of the proposed method is still better than the Ryu controller.