# End-to-End Performance Evaluation of MEC Deployments in 5G Scenarios
## 4 Performance Evaluation  
In this section, we assess the performance of a MEC-enabled service in various system deployments. Our aim is to highlight the impact and contribution of the different system components (i.e., RAN, CN, MEC host) on the E2E service performance. The application scenario we consider is an infotainment service, provided in a Cellular Vehicle-to-Everything (C-V2X) environment, whose logical view is shown in Figure 6. Each vehicle carries a user client that runs within a UE and connects to a MEC host through the cellular network. The client periodically issues a request for an infotainment service. The server is realized as a MEC app residing in a MEC host and responds to requests by sending the client a transcoded version of a prerecorded video stream. On each request, the client specifies one of the video formats reported in Table 1, a higher video quality corresponding to a higher bandwidth. The MEC app is composed of two parts: a request handler and a streamer. The former receives and processes the service requests, identifying the video and its format, and notifies the streamer. The latter transcodes and transmits the video stream, one frame each 40 ms. Video frames are finally received at the client, which collects them and computes metrics. In our co-simulation framework, the client is implemented as a UDP application running on a UE on Simu5G, whereas the infotainment server is implemented as an MEC app within CoFluent. \begin{table}
\begin{tabular}{l l l} \hline \hline
**Video Format** & **Bitrate** & **Frame Size (Fixed)** \\ \hline
240p & 400 kbps & 2000 Bytes \\
720p & 2400 kbps & 12,000 Bytes \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Video Formats. Figure 6: Logical view of the infotainment application. We define frame latency as the time between the transmission of a video frame from the MEC app and its reception at the UE. This measures the \"age\" of the information received by the user, and can be further divided into a MEC latency, i.e., from the generation of a video frame at the MEC app to its packets leaving the MEC server, a CN latency, i.e., the time it takes these packets to reach the gNB/eNB, and a RAN latency, i.e., the time between the arrival of a video frame at the gNB/eNB and its reception at the UE. We consider a RAN composed of 57 cells, deployed according to the hexagonal tessellation shown in the left part of Figure 7 (we show only the first two tiers of cells for readability). Each site hosts three co-located BSs and each BS radiates towards the center of the respective hexagon. The inter-site distance is 500 m. UEs are deployed according to an urban-grid vehicular scenario, shown in the right part of Figure 7, which corresponds to the area defined by the dashed rectangle to the left. BSs outside that area are simulated as external cells. In order to assess the impact of different 4G/5G and MEC deployments, we consider three scenarios, coherently with the phases previously described in Section 2.2:  
* Baseline LTE deployment (Figure 8, top): the BSs are LTE eNBs and the MEC app is co-located with the S-GW and the P-GW in a centralized EPC site. We assume a one-way latency between the RAN and the MEC of 15 ms [17]. * 5G NSA deployment (Figure 8, center): the BSs are again LTE eNBs and each of the three central cells also has a gNB placed in the center of the hexagons, connected to the corresponding eNB via X2 and radiating power according to an omnidirectional pattern. The LTE eNBs are connected to a distributed EPC site in proximity of the RAN. Both S-GW and P-GW, as well as the MEC, are considered as virtual network functions (VNFs). Since the path between the RAN and the MEC involves two VNFs, we assume a one-way latency of 200 \(\upmu\)s [32]. For the X2 interface, we assume 5 ms latency [33; 34]. * 5G SA deployment (Figure 8, bottom): the BSs are gNBs connected to a distributed 5G Core (5 GC). Again, the MEC is a VNF connected to (at least) a UPF, acting as PDU session anchor in the 5 GC, and terminating to the data network.