## 6 VirtFogSim in Action: Testing Its Numerical Capabilities
### Comparative Task and Resource Allocation Performance  
In this section, we compare the task placement, resource allocation, and energy performance of the (previously-described) _GeneticTA_par_ strategy under the considered test DAGs. This is done for values of the allowed execution times \(T_{DAG}\) of 0.3, 0.6, 0.9, 1.5, and 3.0 (s). The final goal is to acquire insights about the effects of the DAG topologies, their sizes, and corresponding distributions of the task workloads and edge weights on the allocation patterns returned by _GeneticTA_par_. The numerical results obtained by running the _VirtFogSim_ toolbox are reported in Tables 6-8 under DAG1, DAG2, and DAG3, respectively. A view of these results leads to the following four main sets of remarks. _Consumed total energies and allocated resources_: A comparative examination of the profiled values reported in the 13 th column of Tables 6-8 points out that, in all simulated cases, the total consumed energy \(\mathcal{E}_{TOT}\) remains limited up to 32 Joule. Since all the test DAGs share the same sum values of the task workloads and edge weights, this supports the conclusion that, at the first order, these factors play a major role in dictating the energy efficiency of the performed task and resource allocations. However, a more detailed examination of these results also unveils the following two trends: (i) at fixed DAG, the consumed energies tend to decrease for increasing values of \(T_{DAG}\); and (ii) at fixed \(T_{DAG}\), the energy consumption tends to decrease by passing from the (more symmetric and regular) DAG1 to the (more random and irregular) DAG3 (see the DAG graphs of Figures 5 and 6). Roughly speaking, the first trend reflects the fact that larger values of \(T_{DAG}\) make the underlying application environment more delay-tolerant. As a consequence, the _RAP_p_ function lowers the steady-state computing frequencies and/or the network bandwidths (see the numerical values reported by the corresponding columns of Tables 6-8). This reduces, in turn, the dynamic (e.g., resource-depending) components of the total consumed energies. The second trend confirms the fact that, by design, the optimization capability of genetic-based strategies generally increases with the size and/or the pseudo-random irregular nature of the topology of the underlying DAGs. \begin{table}
\begin{tabular}{c c c c c c c c c c c c c c c} \hline \hline
**T\({}_{\text{DAG}}\)** & **Mobile Tasks** & **Fog Tasks** & **Cloud Tasks** & \(\mathbf{f_{M}}\) & \(\mathbf{f_{F}}\) & \(\mathbf{f_{C}}\) & \(\mathbf{R_{U}}\) & \(\mathbf{R_{D}}\) & \(\mathbf{B_{U}}\) & \(\mathbf{B_{D}}\) & \(\mathbf{BR}\) & \(\mathcal{E}_{\text{TOT}}\) & \(\mathcal{E}_{\text{NET}}\) \\ \hline
0.3 & \(\{1,12\}\) & \(\{3,7-9,11\}\) & \(\{2,4-6,10\}\) & 11.81 & 3.00 & 2.50 & 7.42 & 8.25 & 3.96 & 1.16 & 0.0 & 31.81 & 16.72 \\
0.6 & \(\{1,12\}\) & \(\{3,7-9,11\}\) & \(\{2,4-6,10\}\) & 11.75 & 2.38 & 2.47 & 6.97 & 7.61 & 2.31 & 0.95 & 0.0 & 28.76 & 13.70 \\
0.9 & \(\{1,3,12\}\) & \(\{-\}\) & \(\{2,4-11\}\) & 11.60 & 0.00 & 2.00 & 0.00 & 0.00 & 0.75 & 0.76 & 0.0 & 27.59 & 11.38 \\
1.5 & \(\{1,3,12\}\) & \(\{2,4-11\}\) & \(\{-\}\) & 11.50 & 1.82 & 0.00 & 6.75 & 7.15 & 0.00 & 0.00 & 0.0 & 26.11 & 9.48 \\
3.0 & \(\{1,2,3,12\}\) & \(\{4-11\}\) & \(\{-\}\) & 11.35 & 1.79 & 0.00 & 6.72 & 7.10 & 0.00 & 0.00 & 0.0 & 25.75 & 9.45 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Task, resource allocation, and energy consumption returned by _GeneticTA_par_ under DAGI. Resources are measured in Mbit/s and energies in joule. \begin{table}
\begin{tabular}{c c c c c c c c c c c c c c} \hline \hline
**T\({}_{\text{DAG}}\)** & **Mobile Tasks** & **Fog Tasks** & **Cloud Tasks** & \(\mathbf{f_{M}}\) & \(\mathbf{f_{F}}\) & \(\mathbf{f_{C}}\) & \(\mathbf{R_{U}}\) & \(\mathbf{R_{D}}\) & \(\mathbf{B_{U}}\) & \  
Consumed network energiesThe impact of the DAG topology and distribution of the edge weights on the resulting consumed network energy \(\mathcal{E}_{NET}\) seems to be, indeed, more relevant.