# Efficient Dynamic Deployment of Simulation Tasks in Collaborative Cloud and Edge Environments
## 4 Design of Pool
### Reassigning of Tasks
\begin{table}
\begin{tabular}{c c l} \hline \hline
**Symbol** & **Value** & **Description** \\ \hline \(|\mathbb{C}|\) & 20 & Number of data centers \\ \(|\mathbb{E}|\) & 100 & Number of edge nodes \\ \(|\mathbb{R}|\) & 100 & Number of regions \\ \hline \(d_{i}^{\tau}\) & \(\Gamma(3,17)\) MB & Volume of interactive data between user and task \(i\) \\ \(s_{i}^{\tau}\) & \(\Gamma(3,17)\) MB & Total volume of interactive data for task \(i\) \\ \(\zeta_{i}\) & \(\psi_{i}\cdot N(1,5)\) & Image size for task \(i\) \\ \(\mathfrak{h}_{i}\) & \(\psi_{i}\cdot N(0.1,1)\) & Task size for task \(i\) \\ \hline \(\alpha_{rc}\) & (50,200) ms/MB & Unit transferring cost between region \(r\) and datacentre \(c\) \\ \(\beta_{re}\) & (10,30) ms/MB & Unit transferring cost between region \(r\) and edge \(e\) \\ \(\gamma_{cc}\) & (50,200) ms/MB & Unit transferring cost between edge \(e\) and datacentre \(c\) \\ \(\lambda_{kl}\) & (50,200) ms/MB & Unit transferring cost between datacentre \(k\) and \(l\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Parameter settings for the experiments. To evaluate the improvement on time performance quantitatively, Figure 6 presents the speed-up of solving MCMF problems incrementally compared to solving them from draft. It can be found that the highest speed-up can be obtained when only very few tasks and hosts change. However, it decreases rapidly as the change percentage grows. Still, the value of speed-up is greater than 1 even when all tasks and hosts are modified. In general, there seems to be no significant difference between different load levels in both host settings. As we compare Figure 6a,b horizontally, bigger speed-up can be obtained in a bigger problem scale (13,654 hosts) when the percentage is less than 10%. It means that solving MCMF problems incrementally using NS is well suited for large scale scheduling problems. #### 5.3.2 Time in Reassigning Tasks

Runtime of assigning tasks based on the generated optimal flow is given in Figure 7. Figure 7a shows the results when setting the number of hosts at 1000. It can be found that time used to assign tasks in Inc is proportional to the percentage of changed tasks and hosts in all three load levels. The larger the number of tasks, the bigger the slope of growth. On the contrary, runtime of assigning tasks in nInc increases very slightly. In general, Inc is much faster than nInc especially when only a small proportion of tasks and hosts change. Figure 5: Runtime of NS when solving MCMF problems incrementally in different load levels. In the legends of figure, number denotes how many tasks are considered, and nInc or Inc indicates the corresponding MCMF problem is solved from draft or incrementally, respectively. (**a**) 1000 hosts. (**b**) 13,654 hosts. Figure 6: Speed-up of solving MCMF problems incrementally compared to solving them from draft. (**a**) 1000 hosts. (**b**) 13,654 hosts. However, situation seems to be much different in Figure 7b. Firstly, we can observe that the difference between Inc and nInc is much smaller. Moreover, after changing certain percentage of tasks and hosts, 18%, for example, when number of tasks is set at 5800, assigning tasks incrementally is even slower. In fact, only constant time complexity is introduced in Inc compared to nInc, except that a sort procedure with time complexity \(|\mathbb{T}|\cdot\text{log}(|\mathbb{T}|)\) is needed in Inc (See lines 1 in Algorithm 1). This extra overhead can, thus, reduce the overall gains of Inc when the value of \(|\mathbb{T}|\) is very large. To evaluate the time performance quantitatively, speed-up of assigning tasks incrementally is given in Figure 8. In can be found that speed-up when setting the number of hosts at 1000 in Figure 8a is greater than 1 for all three levels with less than 20% changed tasks and hosts. However, assigning tasks incrementally consumes more time compared to the traditional method. This means that assigning tasks incrementally is only suitable when only a small proportion of tasks change.