# An Uncertainty-Driven Proactive Self-Healing Model for
## 3 Results  
### Setup and Performance Metrics  
The experimental evaluation of the Uncertainty-driven Proactive Self-Healing Model (UP-SHM), relies on the Tasks Simulation Dataset (www:iprism.eu/assets/DatasetTasksOffloading.zip, accessed on 15 July 2022) and the comparison with a Baseline Model (BM) which is described in [6]. More specifically, the authors use a mechanism that decides whether a task needs to be offloaded when a resource constraint occurs. In our scenario, we consider the aforementioned mechanism as the BM, and we assume that the resource constraint concerns the case in which the queue is full. Moreover, we include in the comparison an algorithm named Decision Maker (DM), which is described in [29] and has been adapted to our scenario. The goal of our experiments is to prove that UPSHM has the ability to manage the incoming tasks in such a way so as to minimize the times when the node is overloaded offloading the tasks, ignoring both their priority and their demand. The dataset mentioned above contains \(E=3564\) instances representing tasks that arrive in a node in \(W=100\) time instances. More specifically, at every instance, we record the following data for every task: the ID of the task, the required service time of the task, the arrival time, the priority value and the demand indicator. The number of tasks in each time instance follows a Poisson distribution and the service and task arrival times follow an exponential distribution. The rates of both exponential distributions are selected separately for each experiment. In addition, the priority and the demand values follow the uniform distribution. For every experiment, we randomly generate the values of \(\lambda\) and \(\mu\), based on the uniform distribution in the intervals \([10,60]\) and \([10,40]\), respectively. For comparison purposes, we define the aforementioned BM which performs an offloading action when the local queue of a node is full, regardless of the priority or the demand of tasks. In the comparison between the performance of UPSHM and BM, we pay attention to the number of tasks that the node executes locally. This quantity is expressed by the \(\phi\) metric which depicts the service rate in a node and is defined by the following equation  
\[\phi=\frac{\xi}{E} \tag{12}\]  
where \(\xi\) is the number of executed tasks and \(E\) is the total number of tasks that arrive in the node. The higher the number of the tasks that are executed locally, the lower the delay in the provision of results becomes. Additionally, we examine the performance of both BM and UPSHM on the percentage of high-priority tasks that are executed locally. The following equation defines the aforementioned metric; i.e.,  
\[\eta=\frac{\kappa}{L} \tag{13}\]  
where \(\kappa\) is the number of high-priority tasks which are executed locally and \(L\) is the total number of high-priority tasks that arrive in the node. When \(\eta\to 1\), it is indicated that the node executes all the high-priority tasks locally, delivering the results to the requestor in the minimum possible time. The same scenario stands for the tasks with high demand rates, where \(\omega\) is the number of tasks that are executed locally. The next equation holds true:  
\[\omega=\frac{\zeta}{\gamma} \tag{14}\]  
where \(\zeta\) is the number of high-demand tasks which are executed locally and \(\gamma\) is the total number of tasks with high demand. The aim behind the choice of these metrics, i.e., \(\eta\), \(\omega\), is to check the ability of an edge node to execute as much as possible high-priority tasks and tasks with high demand rates locally, respectively. The ability of both UPSHM and BM to maintain free space for the high-priority tasks is described by the \(\psi\) metric as follows:  
\[\psi=\frac{q}{E} \tag{15}\]  
where \(q\) is the total number of times that the local queue is full. This metric allows us to check how often the load in a node is maximized.