## 6 VirtFogSim in Action: Testing Its Numerical Capabilities
### Scalability of the Simulation Time of the VirtFogSim Toolbox  
The two-fold goal of this section is to test the scalability of the execution times of the _VirtFogSim_ toolbox versus both the number of cores available for its execution and the computational complexity of the run task allocation strategies. For this purpose, DAG1 at \(T_{DAG}=0.3\) has been considered, and then, both the execution times and the total input/output volumes (in MByte) of data transferred to/from the available pool of working cores have been numerically profiled through the _tictoc_ and _ticByte-tocByte_ commands available in the _Parallel Toolbox_ of MATLAB. The attained results are reported by the bar-plots of Figures 13 and 14. Each reported result has been obtained by averaging over 10 independent runs of the (complexity-tunable) _GeneticTA_par_ task allocation strategy. An examination of the execution times of Figure 13 points out that the speed-up factors attained at \(n_{core}=2\), 4, 6, 8, and 10 over the benchmark case of \(n_{core}=1\) are around 1.91, 3.51, 4.98, 5.94, and 6.60, respectively. Hence, these speed-factors scale in a (quasi-) _linear_ way for values of \(n_{core}\) limited up to 3-4, while the scaling becomes more and more _sub-linear_ for larger values of \(n_{core}\). The reason behind this scaling behavior of the execution times is provided by a comparative examination of the corresponding total input/output data traffic generated by the carried out parallel executions. In this regard, the traffic bars of Figure 13 unveil that both the generated volumes of data (which is the most)  
Figure 12: Energy ratios returned by VirtFogSim under DAG3 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 _GeneticTA_par_. and the corresponding growing rate increase for increasing values of \(n_{core}\). The resulting net effect is that the experienced execution times become more and more dominated by the corresponding inter-core communication times, so that the corresponding relative decrements in the execution times tend to decrease for large values of \(n_{core}\). This conclusion is further corroborated by the bar plots of Figure 14. They report the profiled execution times and generated inter-core traffic volumes obtained by running _GeneticTA_par_ for increasing values of the population size \(PS\) at fixed \(n_{core}=10\). In fact, since the computational complexity of _GeneticTA_par_ scales in a linear way with \(PS\) (see Table 4), it could be expected that the same scaling behavior would be also exhibited by the corresponding profiled execution times. However, an examination of the execution-time bars of Figure 14 unveils that the slow-down factors attained at \(PS=100\), \(150\), \(200\), \(250\), and \(300\) against the benchmark case of \(PS=50\) do not scale, indeed, linearly, and are around \(1.76\), \(2.38\), \(3.16\), \(3.40\), and \(4.53\), respectively. Even in this case, the reason is the nonlinear growing behaviors of the corresponding input/output volumes of inter-core data (see the bars of data traffic in Figure 14). In this regard, we point out that similar trends are also exhibited by the (profiled) execution times of the other parallel functions: \(ES\_S\_par\) and \(O\_TAS\_par\) implemented by the _VirtFogSim_ package. Figure 14: Bar-plots profiling the simulation times and corresponding input/output data traffics generated by parallel executions of _GeneticTA_par_ for increasing values of the population size \(PS\). The case of DAG1 at \(n_{core}=10\). Figure 13: Bar-plots profiling the simulation times and corresponding input/output data traffics generated by parallel executions of _GeneticTA_par_ for increasing values of the number \(n_{core}\) of the employed cores under DAG1 at \(PS=300\). The case: \(n_{core}=1\) corresponds to the sequential execution of _GeneticTA_par_.