## 7 Performance Evaluation
### Comparative Tracking Performance Returned by DeepFogSim  
The goal of this subsection is to test the convergence speed to the steady state and the steady-state stability of the primal-dual iterations implemented by the _DynDeF_RAS_ function of Section 5.4 when abrupt changes in the operating conditions of the Fog platform of Figure 3 occur. For this purpose, we ran the _DynDeFog_TRACKER_ function of Section 5.4 under the (previously described) Fog topology of Figure 8b. The obtained dynamic behaviors of the total consumed energy \(\mathcal{E}_{TOT}^{(best)}\), network energy \(\mathcal{E}_{NET}^{(best)}\), and first and last (i.e., the \(M\)-th) _lambda_ multipliers are presented in Figures 15 and 16. The plots of these figures refer to three values of the clipping factor \(a_{MAX}\) in Equations (26) and (27). \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Topology** & \(\mathcal{E}_{TOT}^{(MAX)}\) **(J)** & \(\mathcal{E}_{TOT}^{(best)}\) **(J)** & \(\mathcal{E}_{COP}^{(best)}\) **(J)** & \(\mathcal{E}_{NET}^{(best)}\) **(J)** & \(\frac{\mathcal{E}_{NET}^{(best)}}{\mathcal{E}_{TOT}^{(best)}}\) **(\%)** & \(\frac{\mathcal{E}_{TOT}^{(MAX)}}{\mathcal{E}_{TOT}^{(MAX)}}\) **(\%)** \\ \hline
**T1** & 1960.9 & 369.6 & 333.5 & 36.2 & 9.8 \% & 18.8 \% \\
**T2** & 1140.0 & 144.3 & 114.1 & 30.3 & 21.0 \% & 12.7 \% \\ \hline
**T1a** & 12148.7 & 1192.1 & 1017.2 & 174.9 & 14.7 \% & 9.8 \% \\
**T2a** & 12486.7 & 552.9 & 477.8 & 75.1 & 13.6 \% & 4.4 \% \\ \hline \hline \end{tabular}  
The energy sensitivity of the resource allocation returned by _DeepFogSim_ is measured at different values of the vector \(\overrightarrow{T}_{EXIT}\) (s) of the maximum allowed inference times under topology \(T2\) and the results are comparatively presented in Table 7. We consider values of the vector \(\overrightarrow{T}_{EXIT}\) in the range of \(0.5\times\overrightarrow{T}_{EXIT}^{(0)}\) — \(2.5\times\overrightarrow{T}_{EXIT}^{(0)}\).  
\end{table} 
Table 6: Energy comparison under the test \(T1\) and \(T2\) Fog topologies. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \(\overrightarrow{T}_{EXIT}\) **(s)** & \(\mathcal{E}_{TOT}^{(MAX)}\) **(J)** & \(\mathcal{E}_{TOT}^{(best)}\) **(J)** & \(\mathcal{E}_{COP}^{(best)}\) **(J)** & \(\mathcal{E}_{NET}^{(best)}\) **(J)** & \(\frac{\mathcal{E}_{NET}^{(best)}}{\mathcal{E}_{TOT}^{(best)}}\) **(\%)** & \(\frac{\mathcal{E}_{TOT}^{(MAX)}}{\mathcal{E}_{TOT}^{(MAX)}}\) **(\%)** \\ \hline \(2.5\times\overrightarrow{T}_{EXIT}^{(0)}\) & 1140.0 & 5.3 & 1.2 & 4.1 & 77.4 \% & 0.5 \% \\ \(1.2\times\overrightarrow{T}_{EXIT}^{(0)}\) & 1140.0 & 73.4 & 66.1 & 7.3 & 9.9 \% & 6.4 \% \\ \(1.0\times\overrightarrow{T}_{EXIT}^{(0)}\) & 1140.0 & 144.3 & 114.1 & 30.3 & 21.0 \% & 12.7 \% \\ \(0.7\times\overrightarrow{T}_{EXIT}^{(0)}\) & 1140.0 & 403.4 & 358.6 & 44.8 & 11.1 \% & 35.4 \% \\ \(0.5\times\overrightarrow{T}_{EXIT}^{(0)}\) & 1140.0 & 1097.7 & 1045.2 & 52.5 & 4.8 \% & 96.3 \% \\ \hline \hline \end{tabular}  
\end{table} 
Table 7: Energy sensitivity on the vector \(\overrightarrow{T}_{EXIT}\) (s) of the maximum allowed inference times under the simulated topology \(T2\). Specifically, we have simulated a failure-affected scenario in which some nodes of the considered topology sequentially fail and then resume at the iteration indexes \(k=1\), 90, 180, 270, and 360 according to the following pattern: (i) at \(k=1\), all nodes and links are ON; (ii) at \(k=90\), a FN fails, i.e., both the operating frequencies of its convolutional and classifier processors vanish; (iii) at \(k=180\), the failed FN resumes its normal operating conditions; (iv) at \(k=270\), the convolutional and classifier processors of a second FN fail; and, finally, (v) at \(k=360\), the failed FN turns to be operative. After each change in the operating conditions, Algorithm 1_self_-reacts by _re-computing_ the components of the resource vector, in order to suitably reconfigure the underlying technological platform of Figure 3, so as to attempt to still meet the constraints in (23b) on the inference times.