## 6 VirtFogSim in Action: Testing Its Numerical Capabilities
### Comparative Task and Resource Allocation Performance
In fact, a comparative examination of the results reported in the last column of Tables 6-8 points out that: (i) under DAG1, the percent ratios of the network energies to the corresponding total ones quickly decrease for increasing values of \(T_{DAG}\) and pass from 52% at \(T_{DAG}~{}=~{}0.3\) s to: 36.5% at \(T_{DAG}~{}=~{}3.0\) s; and (ii) under DAG2 and DAG3, the corresponding network-to-total energy ratios are not so sensitive to the values of \(T_{DAG}\). They remain clipped, indeed, around: 31-32%, and around: 33.5-33.7% under DAG2 and DAG3, respectively. This supports the conclusions that: (i) DAG1 features a communication-intensive application, especially at low values of \(T_{DAG}\); while (ii) DAG2 and DAG3 describe more computing-intensive applications. Task allocation patternsColumns 2, 3, and 4 of Tables 6-8 report the Identification Numbers (IDs) of the tasks allocated by _GeneticTA_par_ to the Mobile, Fog, and Cloud nodes under DAG1, DAG2, and DAG3, respectively. Although the reported allocation patterns may strongly depend on the specifically considered DAGs, nevertheless, three main quite general trends seem to stand out. First, at low values of \(T_{DAG}\), medium-sized and communication-intensive tasks are typically allocated at the Fog node, while large-sized and communication-light tasks are allotted at the Cloud node. The Mobile device only executes small-sized, but communication-intensive tasks. Second, more and more tasks are shifted from the Cloud node to the Fog node and/or to the Mobile device for decreasing values of \(T_{DAG}\). Utilization of the Fog-Cloud backhaul connectionA _peculiar_ feature of the three-tiered technological platform of Figure 1 is the presence of a (possibly multi-hop and/or wired) two-way backhaul connection, which interconnects the Fog and Cloud nodes. Hence, it may be of interest to attain insights about its utilization for the support of the (previously-mentioned) task allocation patterns performed by _GeneticTA_par_. Intuitively, we expect that the backhaul connection is used when there are large-sized tasks to be allocated at the Cloud and the volumes of data output by the execution of these tasks are large. Therefore, since the Fog-to-Mobile WiFi connection is more energy efficient than the corresponding Cloud-to-Mobile cellular one, it may be energy-saving to transport the processed data from the Cloud to the Fog over the backhaul connection and, then, use the Fog as a _relay_ node, in order to forward these data to the Mobile device by exploiting the WiFi downlink of Figure 1. This is, indeed, the strategy dictated by _GeneticTA_par_, in order to execute DAG3. In fact, an examination of the corresponding Table 8 points out that the winner strategy returned by _GeneticTA_par_ utilizes: (i) the cellular bandwidth \(B_{U}\) for the upload of the data to be processed by the Cloud; (ii) the backhaul bandwidth \(BR\) for forwarding the processed data to the Fog node; and (iii) the WiFi bandwidth \(R_{D}\) for the final download of the processed data to the Mobile device. The final conclusion is that, in the considered operating scenario, the utilization of (single-hop) Cloud-to-Mobile and/or Mobile-to-Fog links is _less_ energy efficient than the exploitation of the (multi-hop) Cloud-Fog-Mobile path.