# Predictive Migration Performance in Vehicular Edge Computing Environments
## 3 Proactive Approach to MEC Resource Management
The number of hosts per datacentre was selected to provide the simulation scenario with a resource pool that, on one hand, covers the service demands of the least dense scenario and, on the other hand, provides enough capacity to deal with the most densely configured traffic workload without exceeding the road capacity. Therefore, we configured each MEC datacentre with 5, 7, 9, 11, or 13 MEC hosts, making a global number of 45, 63, 81, 99, or 113 hosts, respectively. These values were chosen to represent all possible scenarios with enough capacity to deal with the urban traffic workload considered. The simulations parameters defined in CloudSim and more information related to the numerical input of the simulation scenarios are detailed in Table 2.

MEC applications and services are normally deployed on edge datacentres as virtualised entities; we then defined them as virtual machines (VMs) in CloudSim that are managed by the MEC orchestrator. The resource management process runs, firstly, a VM placement step that defines where to allocate each VM in the associated MEC datacentre, and then it goes through several VM migration steps in which the allocation can be optimised to reduce the MEC delay as the vehicle moves through the coverage area. Figure 4: Integration process of the urban simulation environment. ## 5 Results and Discussion

As the large amount of data obtained by the simulations can be depicted in different ways for better understanding, we analysed the performance of our predictive approach from several points of view: edge service allocation performance, edge service migration performance, edge service delay analysis, and the study of the relation between delay and prediction accuracy. We chose to show, on one hand, the number of edge-service-first allocations, and then migrations performed while vehicles moved from one coverage area to another one during the simulation time. On the other hand, we selected two different metrics to show in two sets of images, i.e., (a) average delay versus number of vehicles, which gives us a general overview of delay results in the complete set of simulations, and (b) delay variation versus prediction error, which marks how the accuracy in the prediction affects the latency in edge services. Let us divide the result analysis and discussion into three sections that consider different metrics. ### Edge Service Allocation Performance

The placement process is activated when a vehicle enters an MEC coverage area and it establishes a connection with a base station of the 5G network topology. The searching process for a host to which a client's service can be allocated is then started. This allocation can be done optimally if the selected host is located in the MEC datacentre that is directly linked to the base station. It might also happen that all the resources of the closest datacentre are busy, and then the host search continues in contiguous datacentres, leading to longer propagation times, as one or more hops throughout the network topology are then required. Figure 5 represents the number of allocations during the simulation time, showing the distance between the allocated service and the MEC host in terms of the \"optimal\", \"1 hop\", \"2 hops\", or \"cloud\" distance for the highest workload we consider in our study based on the number of hops required to send the information between the different parts of the underlying three-layer fat tree network topology. It is clear that the datacentre infrastructure determines the impact of the latency, as in the scenario of 45 hosts (see in Figure 5a), where some of the services end up being placed in the cloud, as there are not enough resources in either the local MEC datacentre or the contiguous ones. This situation is solved by increasing the number of computing elements, as shown in Figure 5d, which considers 117 hosts, and it can be observed that almost all services are optimally allocated.