# Joint Optimization of Service Migration and Resource Allocation in Mobile Edge-Cloud Computing
## 5 Performance Evaluation
### Simulation Results  
In all simulations, the parameters for the ESs were randomly generated within the ranges specified in Table 2. At each simulation step, new values were randomly selected from these ranges to update the system state. To assess performance, we calculated the average response delay and the average service failure rate across 10,000 episodes. Each episode consisted of 100 steps, during which we recorded the average service delay, the number of tasks generated by users, and the number of service timeouts. _The impact of the number of ESs:_ In this section, we investigate the effects of varying the number of ESs on the average service response delay and task failure rate. We fixed the number of users at 10, the duration of each time slot at 0.8 s, and the size of tasks generated by applications between 2 and 3 MB. Figure 4 shows the reduction in average response delay as the number of ESs increases from 4 to 8, incrementing by one each time. As the number of ESs grows, more computational resources become available, facilitating better task resource allocation and reducing service response times. Although the Follow-Avg, PPO, and DDPG methods exhibit minor differences in response delays across various \begin{table}
\begin{tabular}{l l} \hline \hline
**Parameters** & **Value** \\ \hline Bandwidth between ESs and cloud & [20, 100] Mbps \\ Total computing capacity in ES & [1, 3] GHz \\ Supsension processing intensity & [1.0, 20] cycles/bit \\ State context size & [100, 200] KByte \\ Bandwidth between ESs & [100, 200] Mbps \\ The ratio of the result data size to initial size & [0.001, 0.005] \\ Propagation delay from ESs to the cloud & 400 ms \\ Computational intensity requirements & [20, 40] cycles/bit \\ Average task data size for \(W\) & [2.0, 3.0] MbJte \\ The bandwidth between user and RANs & 10 MHz \\ Transmission power & 10 dBm \\ Noise power spectrum density & \(-170\ dBm/Hz\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Experiment parameters. ES counts, they do not match the efficiency of the PSO and A2C methods. Notably, the A2C-based scheme consistently outperforms the PSO scheme by reducing the average response delay by 0.15 s across all evaluated numbers of ESs. Figure 5 demonstrates that our A2C-based approach achieves the lowest task failure rate, outperforming PSO, while PPO and DDPG record the highest failure rates. Under conditions of abundant resources, other methods experience failure rates as high as 20%, whereas our approach maintains a rate below 10%. Analyzing both Figures 4 and 5, with six or more ESs present, the Follow-Avg scheme shows a lower failure rate than PSO but suffers from longer response delays. This difference stems from the system's dual focus on migration and resource allocation decisions. While abundant resources can mitigate response delays through efficient migration, leading to reduced failure rates, the generic resource allocation strategy of the Follow-Avg scheme,  
the time constraints for each application. For this analysis we fixed the number of ESs at five while maintaining the number of users and task sizes consistent with previous comparisons. Figure 6 illustrates the average service response delays for varying time slot durations, from 0.6 s to 1.0 s, with an increment of 0.1 s. As shown in Figure 6, excluding PSO and our method, the differences in average response delays among the other three methods are minimal. Our method consistently achieves the lowest average service response delay. As the time constraints are relaxed with a constant computational workload, the average service response delay decreases. Shorter time slot durations impose stricter constraints on each task, leading to an increased number of tasks that fail to complete within the designated time. Consequently, these tasks are offloaded to the cloud for continuation, introducing significant propagation delays during transmission and increasing the average service response delay. According to Figure 7, as time constraints become less stringent the task failure rate diminishes.