## 6 VirtFogSim in Action: Testing Its Numerical Capabilities
### The Performance Impact of Different Task and Resource Allocation Strategies
At the same time, since the implementation complexity of the _E_ESS_par_ function scales up exponentially as \(\mathcal{O}\left(3^{(V-2)}\right)\) with the size \(V\) of the considered DAG, the execution of _E_ESS_par_  
Figure 10: Energy ratios returned by VirtFogSim under DAG1 for \(T_{DAG}=0.3\) s, 0.6 s, 0.9 s, 1.2 s, and 1.5 s. All the reported ratio values are normalized with respect to the corresponding total energies consumed by _ES_S_par_. under DAG3 is out of discussion, while the resulting execution complexities are of the order of \(\mathcal{O}\left(3^{10}\right)\) and \(\mathcal{O}\left(3^{13}\right)\) under DAG1 and DAG2, respectively. As a consequence, the (profiled) execution times of _E_ESS_par_ are about five- and 133-times larger than the corresponding ones of _GeneticTA_par_. Regarding the analysis of the first bars of Figures 10 and 11, the following three main insights may be drawn. First, under the (small-sized) DAG1, _GeneticTA_par_ and _E_ESS_par_ return the same optimal task and resource allocation patterns at \(T_{DAG}=0.3,1.5,3.0\) s. Furthermore, the energy ratio: \(E_{GeneticTA\_par}/E_{E\_ESS\_par}\) is limited up to 1.07 (e.g., 7%) in the remaining two cases. Second, under the (medium-sized) DAG2, _GeneticTA_par_ and _E_ESS_par_ share the _same_ energy consumption at \(T_{DAG}=0.3\), while the corresponding energy ratio: \(E_{GeneticTA\_par}/E_{E\_ESS\_par}\) is no larger than 1.26 in the other cases. Overall, the carried out analysis supports the conclusion that the tested implementation of _GeneticTA_par_ is capable of attaining, indeed, good performance-vs.-complexity tradeoffs. _Three tiered-vs.-single and two-tiered execution platforms_: A potential drawback of multi-tiered distributed computing platforms is that the number of involved communication links tends to grow with the number of inter-connected tiers, and this may lead, in turn, to an increment of the network component of the overall consumed energy. Hence, the goal of this subsection is to give insight into the following (rather basic) question: What is the net tradeoff among the reduction of the computing energy arising from the utilization of multi-tiered computing nodes and the corresponding increment of the network energy needed for their inter-connection? In order to address this question, the _VirtFogSim_ toolbox makes available the _OM_S_, _OF_S_, and _OC_S_ strategies. By design, they utilize only the Mobile device, the two-tiered Fog-Mobile platform, and the two-tier Cloud-Mobile platform for the execution of the application DAGs. Furthermore, all these strategies perform dynamic scaling of the utilized computing frequencies and wireless network bandwidths (see Section 4.2). Hence, since _GeneticTA_par_ exploits, by design, all the Mobile, Fog, and Cloud nodes of Figure 1 for task placement, a comparative analysis of the energy ratios in the last three bars of Figures 10-12 provides a direct response to the above question by providing the following three main insights. First, the energy ratio: \(E_{OM\_S}/E_{GeneticTA\_par}\) takes values over the intervals: 2.84-3.84, 3.3-3.9, and 4.8-5.1, under DAG1, DAG2, and DAG3, respectively. The corresponding intervals of the energy ratios: \(E_{OF\_S}/E_{GeneticTA\_par}\) and \(E_{OC\_S}/E_{GeneticTA\_par}\) are: 1.53-1.88, 2.0-2.73, 1.23-1.32, and 1.35-1.52, 1.99-2.59, 1.35-1.63, respectively. Hence, in the carried out simulations, the minimum (e.g., worst-case)  
Figure 11: Energy ratios returned by VirtFogSim under DAG2 for \(T_{DAG}=0.3\) s, 0.6 s, 0.9 s, 1.2 s, and 1.5 s. All the reported ratio values are normalized with respect to the corresponding total energies consumed by _ES_S_par_. energy-savings guaranteed by the three-tier Mobile-Fog-Cloud platform over the Mobile, Mobile-Fog, and Mobile-Cloud ones are: 184%, 23% and 35%, respectively. Second, at fixed \(T_{DAG}\), the average energy savings offered by the Mobile-Fog-Cloud platform over the considered benchmark ones tend to be somewhat more substantial under DAG2.