In MEC the computational offloading is used to speed up the process of computation by providing local access to data and resources to the users. It decides whether offloading is required or not on edge servers according to user and system requirements to prevent energy consumption. The offloading that can perform on the local server without MEC servers then that offloading mechanism is called local offloading whereas if the computation offloading is processed by MEC completely then it is called the fully offloading technique [46].
4.2 Various Metrics used in offloading
MEC provides different performance metrics and parameters to calculate the performance of various offloading techniques. In this section, different metrics and parameters are presented like energy consumption, delay, cost, response time, etc. These metrics are already used by various researchers to compute performance analysis of their work as discussed in the literature review section.
I. Energy Consumption: In Cloud computing offloading requires a lot of energy because it involves sending the task from the device to the server, executing the task in the ES, and returning results to the device [47]–[49]. Offloading can be performed fully or partially, the code's resource-intensive component should be identified in advance. The offloading based on partial computation is composed of two components: a resource-hungry component handled remotely and a resource-full component handled locally. CPU cycles fm determine whether the performance of a CPU increases or decreases energy consumption fm 's value is limited by fmax (the maximum value can limit the mobile's computational ability).
a). Energy consumption for Local Execution (EL)
Computing efficiency is directly related to energy consumption during local execution. A CPU cycle consumes the following amount of energy ςfm2. The energy consumption for executing task T with by fm CPU cycles can be derived as [50]
$${E}^{L}=\varsigma dc{f}_{m}^{2}$$
1
b). Energy consumption for Full Offloading
Full offloading can be divided into two types, namely, a single-user MEC system and a multiuser MEC system.
i) Single-user MEC system (\({E}^{F,s}\)): The simplest case has only one device and one ES.
$${E}^{F,s}=\varsigma dc{F}_{e}^{2} + p\frac{d}{{r}^{s}}$$
2
where,
ς = effective switched capacitance,
Fe = resource computing capacity of ES,
d = data size of computation task,
c = required number of CPU cycles for computing one bit of computation task,
p = transmission power of the device,
rs = wireless transmission data rate between device and ES.
ii) Multi-user ( \({E}_{i}^{F,m}\) ): Multiple devices can be associated with the same ES in a multi-user MEC system and offload their tasks to the ES at the same time.
$${E}_{i}^{F,m}=\varsigma {d}_{i}{c}_{i}{\left({f}_{e}^{i}\right)}^{2}+{p}_{i}\frac{{d}_{i}}{{r}_{i}^{m}}$$
3
Where,
\({d}_{i}\) = data size of the computation task on device i,
\({c}_{i}=\) number of CPU cycles for computing one bit of the computation task,
\({f}_{e}^{i}\) = computational resources that the ES allocates to device i,
Pi = transmission power of device i,
\({r}_{i}^{m}\) = wireless transmission data rate between device i and ES.
c). Energy consumption for Partial Offloading (Ep): There are three sections to completing the task: (a). The first section shows the amount of energy consumed locally to process the quantity (1 − λ) d, (b). The energy used to process the quantity λd on the ES is represented in the second section, and (c). The energy consumption of wireless transmission is represented in the third section.
$${E}^{P}=\varsigma \left(1-\lambda \right)dc{f}_{m}^{2}+\varsigma \lambda dc{F}_{e}^{2}+ p\frac{\lambda d}{r}$$
4
II Latency or Execution Delay (D)
It depicts the time taken to complete the task by server.[51]. The quantity of the data to be offloaded, the wireless channel's bandwidth, the ESs and MDs' CPU speeds, and the number of CPU cycles for each byte of received data are all important thoughts. The and are represented as a bandwidth allocated to send and receive the mobile n's request to or from a server, respectively. Then and which are sending and receiving transmission delay of vth task of mobile u, respectively, can be formulated as follows
$${D}_{uv}^{S}= \frac{{d}_{uv}^{S}}{{BD}_{n}^{S}}$$
5
$${D}_{uv}^{R}= \frac{{d}_{uv}^{R}}{{BD}_{n}^{R}}$$
6
Where \({d}_{uv }^{S}\)and \({d}_{uv }^{R}\)represent the size of data sent and received by the vth job of mobile n, respectively. The edge processing latency can also be expressed as follows:
$${D}_{uv}^{server }= \frac{{d}_{uv}^{S}{N}_{uv}^{c}}{{f}^{server}}$$
7
For each bit of received data, where fserver and \({N}_{uv}^{c}\) are the ES processing rate and the number of processing cycles, respectively. As a result, the total latency of execution offloading can be calculated using the following equation:
$${D}_{uv}^{offload}={D}_{uv}^{S}+{D}_{uv}^{R}+{D}_{uv}^{server }+{D}^{\left(wait\right)}$$
8
Where Dwait is the request's total waiting time. The following equation is presented for estimating delay for local execution:
$${D}_{uv}^{local}=\frac{{d}_{uv}^{S}{N}_{uv}^{c}}{{f}^{local}}+ {D}^{\left(wait\right)}$$
9
Where \({f}^{local}\) is the processing rate of local MD.
III Response time: Offloading tasks to remote servers and receiving the appropriate response from them is a measure of performance in MEC offloading. The system's response time and latency differ in some ways. Generally, response time refers to the time between submitting a request and receiving an appropriate response. The latency, on the other hand, is defined as the time it takes for the destination to receive the transmitted request. There are two popular networking commands for measuring response times: ping and traceroute [52]. According to above definition, the response time is calculated by adding the Equations (8) and (9) given as follows:
\({T}_{uv}^{response}= {P}_{OS}\) \({D}_{uv}^{offload} + (1- {P}_{OS }) {D}_{uv}^{local}\) (10)
where POS (∈{0, 1}) is the probability of offloading to the server.
IV Cost
It depicts the expense incurred with the transmission media, server execution, and receipt of a response from the source of the request. These costs are determined by the task's location, task response time, and task demand [53]. Because spent energy and delay are the most important components in computing total cost, making a trade-off between these two relevant metrics is critical. As a result, overall execution costs are regarded similarly to the two previously described measures, which comprise local and remote execution costs, as well as processing and buffering delays. Various publications consider cost in combination with other metrics such as safety as a form of cost-awareness, cost-trade-off, or cost-guarantee [54], [55]. The execution cost of each task on the server is determined in the offloading scope. In Eq. (11), the cost is determined by the task deployment location, task response time, and task demand. Total execution costs in MEC contexts comprise both local and distant execution costs, which take into account processing and buffering delays. We'll look at an example of determining the overall cost of unloading in the following section. The following is the predicted delay time spent per job in local computation (i.e., the sum of execution and local buffering time)
\({D}_{K}^{L}\left({x}_{K}\right)= \frac{1}{({\mu }_{m}-{\lambda }_{a }{\stackrel{-}{x}}_{k})}\) , k = 1, 2, 3, ……, N (11)
\({\stackrel{-}{x}}_{k} \triangleq\) 1- \({x}_{k}\) (12)
where,
\({x}_{K}\) = Offloading frequency of user k,
\({\stackrel{-}{x}}_{k}\) = local computing probability,
\({\mu }_{m}\) = user k's computation service rate (jobs per second),
\({\mu }_{a}\) = average CPU cycles needed by the computation job,
\({\lambda }_{a }\) = arrival time of a job is calculated using a Poisson process,
\({f}_{m}\) = MD's CPU cycle frequency,
\({L}_{a}\) = size of the data input (in Bytes), and
\({B}_{a}\) = (Cycles per bit) processing density.
The energy required for local computing is then as follows:
\({E}_{k}^{L}= {k}_{m}{f}_{m}^{2}{\mu }_{a }\) , k = 1, 2, …., N, (14)
Where,
\({k}_{m}{f}_{m}^{2}\) = the power usage of a MD while performing one CPU cycle, and km is the energy consumption coefficient, which varies depending on chip design.
By using (11) and (14), the total weighted cost of local computing is as follows:
\({C}_{k}^{L}\left({x}_{k}\right) = {C}_{k}^{e}.{E}_{K}^{L} + {C}_{k}^{d} {D}_{k}^{L}\left({x}_{k}\right), k=\text{1,2},....N,0<\) \({C}_{k}^{e}\) < 1,\(0< {C}_{k}^{d} <1\) (15)
where the units of \({C}_{k}^{e}\)and \({C}_{k}^{d}\), as the weights of computation energy and delay, are respectively. The equations based on delay time for offloading to the AP for remote execution and the required energy for offloading, are as follows respectively:
Where,
\({\beta }_{k} =\) the transmission rate of user k,
\({P}_{tr}\) = The transmission power of each user.
Except for requests with a higher priority (H) than those with a lower priority (L), the access point's queue algorithm is supposed to be FCFS. The executed remotely at the following time:
$${D}_{H}^{R}\left(X\right) = \frac{1}{{\mu }_{B} -\sum _{{I}_{j = H}}{\lambda }_{a}{X}_{j}} , X\triangleq ({X}_{1},{X}_{2},....{X}_{N})$$
18
where,
\({\lambda }_{a}{X}_{j}\) = the Poisson process of job arrival of the mobile device at access point and
\((\sum _{{I}_{j = H}}{\lambda }_{a}{X}_{j} )\) = for multiple mobile devices with higher priority and also
\({\mu }_{B}\) = fB/µa is the computing service rate of MEC server (i.e., jobs/seconds).
Additionally, for L we have,
$${D}_{L}^{R}\left(X\right) = \frac{{\mu }_{B} {D}_{H}^{R}\left(X\right) }{{\mu }_{B} - \sum _{{I}_{j=L}}{\lambda }_{a}{X}_{j} - \sum _{{I}_{j = H}}{\lambda }_{a}{X}_{j} }$$
19
Using the previously described equations, we can calculate total remote expenses for user k as follows:
$${C}_{k}^{R}\left({i}_{k} , X\right) = {c}_{k}^{e} {E}_{k}^{R}\left({x}_{k}\right) + {c}_{k}^{d}\left({D}_{k,1}^{R}\left({x}_{k}\right)\right)+ {D}_{{i}_{k}}^{R}\left(X\right))$$
20
Calculating the total cost of computation yields the following:
\({C}_{k}({i}_{k} , X) = {\stackrel{-}{x}}_{k}\) \({C}_{k}^{L}\left({x}_{k}\right) + {x}_{k}{C}_{k}^{R}\left({i}_{k} , X\right)\) (21)
IV Quality of Service (QoS) and Quality of Experience (QoE)
QoS-based and QoE-based metrics are preserved differently in MEC offloading. Mostly, QoE refers to the variety of service features and the experience of the user. A specific service's requirements, objectives, and observations relate to a particular environment. To measure Quality of Experience (QoE), the Mean Opinion Score (MOS), the Standard Deviation of Opinion Scores (SOS), and the Net Promoter Score (NPS) have been used by authors [56]. In general, QoE refers to the user-centered estimation of the services' requirements, intentions, and perceptions in a specific context. Additionally, offloading in MEC environments can help optimize the use of resources, time, and services. To run this application efficiently, the application needs to be sized based on the service access rate, the resources needed, and the time it will take to run the application.
V Execution time
a) The local execution time for a computing task T
$${T}^{L} = \frac{dc}{{f}_{m}}$$
22
b) Execution time for Full Offloading (\({T}^{F}\)):
i) For Single-User (\({T}^{F,s}\))
$${T}^{F,s} = \frac{dc}{{F}_{e}} + \frac{d}{{r}^{s}}$$
23
ii) For Multi-User ( \({T}_{i}^{F,m }\) )
$${T}_{i}^{F,m }=\frac{{d}_{i}{c}_{i}}{{f}_{e}^{i}} + \frac{{d}_{i}}{{r}_{i}^{m}}$$
24
c) Execution time for Partial Offloading (\({T}^{P}\))
$${T}^{P }=\frac{(1-\lambda )dc}{{f}_{m}} + \frac{\lambda dc}{{F}_{e}}$$
25
Based on various metrics that are used for computation offloading in the MEC system, the energy consumption and execution delay metrics are mostly used. According to the assessment, the percentage of distribution of various metrics used in offloading mechanism has been shown in Fig. 6.