# An Intelligent Approach to Resource Allocation on Heterogeneous Cloud Infrastructures
## 4 Results and Discussion
### Validating the VM Mapping Genetic Programming Algorithm
#### 4.1.1 NUMA Placement Generation  
To evaluate the capacity of our genetic programming algorithm to generate optimal NUMA placements, we used it to allocate different sets of virtual machines to NUMA nodes. We considered scenarios in which we used various combinations of input parameters: the number of virtual cores, the number of physical cores, the number of NUMA domains, and the percentage of maximum CPU utilization. The output was the progress of the best fitness and the average fitness across generations. We used a crossover rate of 0.1 for these tests, a mutation rate of 0.001, a random initial population of 100 chromosomes, 50 generations, and a tournament selection method. Virtual cores on the same virtual machine were assigned a high level of memory shared communication, and virtual cores of different virtual machines were assigned a low level.  
In the first experiment, we created three configurations, using the objective function without penalties for suboptimal NUMA mappings. For this experiment, we used a CPU utilization of 90%. The algorithm performance was optimal, and the evolution towards the best results happened very fast, as shown in Table 2. Although we ran 50 generationsfor each experiment, we achieved the best results from the 20 th generation. This means that the algorithm is very practical for real world use, since 20 generations can be run very quickly, and our algorithm can therefore be used in real CC environments. Figure 4 shows the average and best fitness values for \(N_{v}=32\), \(N_{p}=16\), \(N_{m}=2\), \(N_{vm}=4\).  
In the second experiment, we used the objective function with a penalty for suboptimal NUMA assignments while keeping the CPU utilization at 90%. In the same way as in the first experiment, significant improvements in fitness were evident across the generations. Figure 5 shows the average and best fitness values for \(N_{v}=32\), \(N_{p}=16\), \(N_{m}=2\), \(N_{vm}=4\). Although the performance of the algorithm is affected by the penalty operations, as shown in Table 3, it is still efficient.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Test** & **Parameters** & **Time to Solve (s)** & **Best Fitness** & **Avg. Fitness** \\ \hline \multirow{4}{*}{1} & \(N_{v}=32\), & & & \\  & \(N_{p}=16\), & & & \\  & \(N_{m}=2\), & & & \\  & \(N_{vm}=4\) & & & \\ \hline \multirow{4}{*}{2} & \(N_{v}=32\), & & & \\  & \(N_{p}=80\), & & & \\  & \(N_{m}=4\), & & & \\  & \(N_{vm}=16\) & & & \\ \hline \multirow{4}{*}{3} & \(N_{v}=64\), & & & \\  & \(N_{p}=160\), & & & \\  & \(N_{m}=8\), & & & \\  & \(N_{vm}=16\) & & & \\ \hline \hline \end{tabular}
\end{table}
Table 2: Experiment 1. GP algorithm using objective function without penalties for suboptimal NUMA mappings.  
Figure 4: Average and best fitness for experiment with input \(N_{v}=32\), \(N_{p}=16\), \(N_{m}=2\), \(N_{vm}=4\). No penalization used for suboptimal NUMA allocations.  
In the third experiment, we used different values for the CPU utilization, ranging from 50% to 90%. The results were comparable to those obtained in the second experiment (see Table 4). For these experiments, we used the version of the algorithm with penalties and the following parameters for all the tests \(N_{v}=32\), \(N_{p}=80\), \(N_{m}=4\), \(N_{vm}=16\). Figure 6 shows the average and best fitness values.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Test** & **Parameters** & **Time to Solve (s)** & **Best Fitness** & **Avg. Fitness** \\ \hline
7 & \(U_{max}=50\) & \(16.69\) & \(0.68\) & \(-0.81\) \\
8 & \(U_{max}=70\) & \(15.49\) & \(0.71\) & \(-0.72\) \\
9 & \(U_{max}=90\) & \(14.22\) & \(0.66\) & \(-0.31\) \\ \hline \hline \end{tabular}
\end{table}
Table 4: Experiment 3. GP algorithm using objective function without penalties for suboptimal NUMA mappings.  
Figure 5: Average and best fitness using penalization for suboptimal NUMA placements and \(N_{v}=32\), \(N_{p}=16\), \(N_{m}=2\), \(N_{vm}=4\) as input.