I Introduction
Resource and interactionintensive applications such as realtime computer vision and augmented reality will increasingly dominate our daily lives
[13]. Due to the limited computation capabilities and restricted energy supply of end user equipments, many resourcedemanding tasks that cannot be executed locally end up being offloaded to centralized cloud data centers. However, the additional delays incurred in routing data streams from UEs to distant clouds significantly degrade the performance of realtime interactive applications. To address this challenge, mobile edge computing (MEC) emerges as an attractive alternative by bringing computation resources to edge servers deployed close to the end users (e.g., at base stations), striking a good balance between cost efficiency and low latency access.Delay and cost are hence two crucial criteria when evaluating the performance of MEC networks. Offloading intensive tasks to the cloud reduces overall resource cost (e.g., energy consumption) by taking advantage of more efficient and less energyconstrained cloud servers, at the expense of increasing endtoend delay. In order to optimize such costdelay tradeoff, MEC operators have to make critical decisions:

Task offloading: decide which service tasks should be processed at the UEs (locally) and which at the edge cloud, and in which servers;

Packet routing and scheduling: decide how to route incoming packets to the appropriate servers assigned with the execution of the corresponding tasks;

Resource allocation: determine the amount of computation resources to allocate for task execution (at both UEs and edge servers) and the amount of communication resources (e.g., transmission power) to allocate for the transmission of data streams through the MEC network.
Some of these problems have been addressed in existing literature. We refer interested readers to [13, 1] and references therein for an overview of recent MEC studies. For example, the task offloading problem for minimizing average delay under UE battery constraints is addressed in [5]; the dual problem of minimizing energy consumption subject to worstcase delay constraints is studied in [6]; [11] investigates the same problem under an objective function that trades off the two criteria. However, most existing works on MEC focus on simplified versions of a subset of the problems listed above. That is, single task offloading, assignment of task requests to edge servers without explicit multihop routing, and computation resource allocation without joint optimization of computation and communication resources.
On the other hand, recent works in the cloud networking literature have addressed the optimization of more complex services composed of multiple tasks/functions (e.g., service function chains) that can be executed at multiple cloud locations [12, 2, 4]. However, this line of work has focused on static wireline networks, without taking into account aspects such as uncertain channel conditions, timevarying service demands, and delay optimization, critical to MEC networks.
Driven by the advent of increasingly complex services and heterogeneous MEC networks, and leveraging recent advances in the use of Lyapunov control theory for distributed computing networks [8, 9], in this work we focus on the design of dynamic control policies for multihop MEC networks (see Fig. 1) hosting multitask services (see Fig. 2). Our contributions can be summarized as follows:

We develop an efficient algorithm for dynamic MEC network control that jointly solves the problems of multitask offloading, multihop routing, and joint computationcommunication resource allocation.

We show how the algorithm allows tuning the costdelay tradeoff while guaranteeing throughputoptimality.

We provide numerical simulations that validate our theoretical claims in practical MEC settings.
Ii System Model
Consider a MEC network as shown in Fig. 1. Let and denote the set of UEs and edge servers, respectively, with . The UEs can communicate with the edge cloud via wireless channels, while wired connections are constructed between nearby edge servers and the core cloud;^{1}^{1}1While, in line with most works on MEC, we do not consider cooperation between UEs, i.e., we assume UEs do NOT compute/transmit/receive packets irrelevant to their own, it is straightforward to extend the proposed model to include cooperation between UEs. wireless and wireline links are collected in and , respectively. A communication link with node as the transmitter and as the receiver is denoted by . The incoming and outgoing neighbors of node are collected in the sets and , respectively; specially, denotes the set of wireless outgoing neighbors of node .
Time is divided into slots of appropriate length , chosen such that the uncontrollable processes ( channel state information (CSI), packet arrivals, etc) are independent and identically distributed (i.i.d.) across time slots. Each time slot is divided into three phases. In the sensing phase, neighboring nodes exchange local information (e.g., queue backlog) and collect CSI. Then, in the outgoing phase, decisions on task offloading, resource allocation, and packet scheduling are made and executed by each node. Finally, during the incoming phase, each node receives incoming packets from neighbor nodes, local processing unit, and (possibly) sensing equipment.
The following parameters characterize the available computation resources in the MEC network:

: the possible levels of computational resource that can be allocated at node ;

: the compute capability (e.g., computing cycles) when resources are allocated at node ;

: the setup cost to allocate computational resources at node ;

: the computation unit operational cost (e.g., cost per computing cycle) at node .
Similarly, for the wireline transmission resources on links :

: the possible levels of transmission resources that can be allocated on link ;

: the transmission capability (e.g., bits per second) of transmission resources on link ;

: the setup cost of allocating transmission resources on link ;

: the transmission unit operational cost (e.g., cost per packet) on link .
Finally, we assume that each node has a maximum power budget for wireless transmission, and each unit of energy consumption leads to a cost of at node . More details on the wireless transmission are presented in the next subsection.
Iia Wireless Transmission Model
This section focuses on the wireless transmissions between the UEs and edge cloud. We employ the channel model proposed in [3], as is depicted in Fig. 1. Massive antennas are deployed at each edge server, and with the aid of beamforming techniques, it can transmit/receive data to/from multiple UEs simultaneously using the same band. The interference between different links can be neglected, given that the UEs are spatially well separated. Different edge servers are separated by a frequency division scheme, where a bandwidth of is allocated to each edge server. Each UE is assumed to associate with only one edge server at a time.
The transmission power of each wireless link is assumed to be constant during a time slot, and we define as the power allocation decision of node . The packet rate of link then follows
(1) 
where denotes the channel gain, which is assumed to be i.i.d. over time; is the noise power. Recall that each node has a maximum transmission power of , and it follows
(2) 
For each UE , a binary vector is defined to indicate its decision of task offloading, where the link is activated if the corresponding element . It then follows that
(3) 
Finally, we define the aggregated vectors as and , respectively.
Remark 1
The length of each time slot is set to match the channel coherence time, which is on the order of milliseconds for millimeter wave communication (e.g., slowly moving pedestrian using subGHz band). On this basis, the change in network topology (and hence path loss) is assumed to be negligible between adjacent time slots.
Remark 2
While out of the scope of this paper, the use of wireless transmissions via broadcast can potentially increase route diversity, thus enhancing network performance when aided by techniques such as superposition coding [9].
IiB Service Model
Let denote the set of available services, where each service is completed by sequentially performing tasks (functions) on the input data stream. All data streams are composed of packets of equal size , which can be processed individually. We denote by the number of packets of service exogenously arriving at node at time , assumed to be i.i.d. across time and with mean value .
We denote by the scaling factor of the th function of service , i.e., the ratio of the output stream size to the input stream size; and by its workload, i.e., the required computation resource (number of computing cycles) to process a unit of input data stream.
For a given service , a stage packet refers to a packet that is part of the output stream of function , or the input stream of function . Hence, a service input packet (exogenously arriving to the network) is a stage packet, and a service output packet (fully processed by the sequence of functions) is a stage packet.
IiC Queueing System
Based on the above service model, the state of a packet is completely described by a tuple , where is the destination of the packet (i.e., the user requesting the service), is the requested service, and the current service stage. We refer to a packet in state as a commodity packet. A distinct queue is created for each commodity at every node , with queue length denoted by , where the overall set of MEC queue sizes denoted by .
To indicate the number of packets that each node plans to compute and transmit, corresponding flow variables are defined.^{2}^{2}2The planned flow does NOT take the number of available packets into consideration, i.e., a node can plan to compute/transmit more packets than it actually has. It is defined in this way for mathematical convenience. For commodity , we denote by the number of packets node plans to send to its central processing unit (CPU), the number of packets node expects to collect from its CPU, and the number of packets node plans to transmit to node . Flow variables, collected in , must satisfy: 1) nonnegativity: ;
2) service chaining constraints:
(4) 
3) capacity constraints:
(5a)  
(5b) 
4) boundary conditions: , , ,
(6) 
The queueing dynamics is then given by^{3}^{3}3The inequality is due to the definition of planned flow, i.e., the last line in (IIC) can be larger than the packets that node actually receives.
(7) 
where .
Finally, we set and to indicate the only stage packets can arrive exogenously to the network and only stage packets can exit the network.
IiD Problem Formulation
Two metrics will be considered to evaluate the performance of the MEC network: resource cost and average delay.
The instantaneous resource cost at time is given by
(8) 
which includes computation, wired transmission, and wireless transmission costs.
On the other hand, the average delay is derived according to Little’s theorem [10] as
(9) 
where ,^{4}^{4}4Note that our average delay metric is computed normalizing queue sizes by corresponding scaling factors, out of consideration for fairness. Additional priority weights may be used to indicate servicespecific latency requirements, independent of stream sizes. and denotes the longterm average of the random process .
We then formulate the dynamic MEC network control problem as that of making operation decisions over time to:
(10a)  
(10b)  
(10c) 
where (10b) is a necessary condition for network stability.
Bearing this goal in mind, in the next section we propose a parameterdependent tunable control policy that allows, not only finding the minimum average resource cost that guarantees MEC stability, but also computing alternative operating points that allow trading off increased resource cost for reduced average delay .
Iii MEC Network Control
In this section, we derive our proposed MEC network control (MECNC) policy by applying Lyapunov optimization theory to problem (10).
Iiia Lyapunov DriftPlusPenalty (Ldp)
Let the Lyapunov function of the MEC queuing system be defined as , where denotes a diagonal matrix with as its elements. The standard Lyapunov optimization procedure is to 1) observe the current queue status , as well as the CSI , and then 2) minimize an upper bound of the driftpluspenalty function
(11) 
where parameter controls the tradeoff between the drift and penalty , and the upper bound is given by^{5}^{5}5The inequality holds under the mild assumption that there exists a constant that bounds the arrival process, i.e., for .
LDP  
(12) 
where , and the weights are given by
(13a)  
(13b) 
and is a constant that is irrelevant to queue status and decision variables (see [8] for the details of derivation).
The control algorithm developed in this paper aims to minimize the upper bound (IIIA), which includes three parts (last three lines), relating to computation, wired transmission, and wireless transmission, respectively. Each part can be optimized separately, with the solutions to the first two parts provided in [8] and the third problem addressed in the following.
The goal is to minimize the last term in (IIIA) subject to (2), (3), and (5b). Note that the objective function is linear in , which leads to Max Weight mannered solution, i.e., finding the commodity with largest weight:
(14) 
If , no packets will be transmitted, and thus no power will be allocated; otherwise, the optimal flow assignment is
(15) 
when , and otherwise. Substituting the above result into the objective function leads to a reduced problem with respect to (w.r.t.) and , i.e.,
(16) 
subject to (2) and (3). Note that we can rearrange the above objective function according to the transmitting node as
(17) 
which enables separate decision making at different nodes. The optimal solution for the UEs and edge servers is presented in next section, based on the following proposition.
Proposition 1
The solution to the following problem
(18) 
is , where is the minimum positive value that makes (2) satisfied.
User  Edge Server  

Computation  
Wired Links  No wired transmission between users  
Wireless Links 
IiiB MEC Network Control (Mecnc) Algorithm
In this section, we present the MECNC algorithm, which optimizes (IIIA) in a fully distributed manner.
IiiB1 Computing Decision
For each node :

Calculate the weight for each commodity:
(19) 
Find the commodity with the largest weight:
(20) 
The optimal choice for computing resource allocation is
(21) 
The optimal flow assignment is
(22) when , and otherwise, with denoting the indicator function.
IiiB2 Wired Transmission Decision
For each link :

Calculate the weight for each commodity:
(23) 
Find the commodity with the largest weight:
(24) 
The optimal choice for computing resource allocation is
(25) 
The optimal flow assignment is
(26) when , and otherwise.
IiiB3 Wireless Transmission Decision
For each wireless link , find the optimal commodity and the corresponding weight by (14); then,

for each edge server : determine the transmission power by Proposition 1;

for each UE : since it only associates with one edge server and noting the fact that generally each user can only access a limited number of edge servers, we can decide the optimal edge server by bruteforced search. More concretely, for any edge server , assume that UE associates with it, i.e., let if , and otherwise in (17), and solve the onevariable subproblem by Proposition 1, which gives the optimal transmission power and the corresponding objective value . By comparing the values, the optimal edge server to associate with is .
IiiC Performance Analysis
We first define the stability region as the collection of all admissible arrival vectors such that there exists some control policy to stabilize the network (i.e., satisfying (10b)). For any admissible , denote by the minimum (or infimum) cost that can be achieved, which serves as a benchmark to evaluate the proposed algorithm.
Theorem 1
For any arrival vector lying in the interior of , the MECNC algorithm can stabilize the queueing system, with the average cost and delay satisfying
(27)  
(28) 
where denotes a vector with all elements equal to that satisfies (since is in the interior of ).
Proof:
See Appendix B in [7].
Since the queueing system is stabilized, the proposed algorithm is throughput optimal. In addition, there exists an tradeoff between the upper bounds of the average delay and the incurred cost. By increasing the value of , the average cost can be reduced, while increasing the average delay (but still guaranteed), which accords with the motivation behind the definition of the LDP function (IIIA).
Iv Numerical Results
Consider the grid area shown in Fig. 5, which includes UEs and edge servers. Each edge server can cover UEs within its surrounding grid. We set the length of each time slot to . The UEs mobility is modeled by i.i.d. random walk (reflecting when hitting the boundary), with the oneslot displacement distributing in Gaussian (the average speed of the UEs under this setting).
Each user can request two services (there are two functions in each service), with the following parameters
where is the supportable input size (in one slot) given CPU resource. The size of each packet is , and the number of packets arriving at each UE is modeled by i.i.d. Poisson processes of parameter .
The available resources and corresponding costs are summarized in Table I. For wireless transmission, millimeter wave communication is employed, operating in the band of , and a bandwidth of is allocated to each edge server; the 3GPP pathloss model
for urban microcell is adopted, and the standard deviation of the shadow fading is
; the antenna gain is . The noise has a power spectrum density of .Iva Stability Region
First, we simulate the stability region for the described MEC network, using different values of in the MECNC algorithm. As varies, the stable average delay is recorded (if exists) based on a longterm ( time slots) observation of the queueing system. If the average delay is constantly growing even at the end of the time window, the average delay is defined as , which implies that the network is not stable under the given arrival rate.
As depicted in Fig. 5, the average delay rises as the arrival rate increases, which blows up when approaching . This critical point can be interpreted as the boundary of the stability region of the MEC network. On the other hand, if all the computations are constrained to be executed at the UEs, the stability region is reduced to . That is, a gain of is achieved with the aid of edge servers. Last but not least, note that different values lead to identical critical points, although they result in different average delay performance, which validates the throughputoptimality of the MECNC algorithm.
IvB CostDelay Tradeoff
Next, we study the delay and cost performance of the MEC network, when tuning the parameter . The arrival rate is set as (i.e., packets per slot).
The results are shown in Fig. 5. Evidently, the average delay grows almost linearly with , while the cost reduces as grows (with a vanishing rate at the end), which support the tradeoff between the delay and cost bound. In addition, we observe two regions of significant cost reduction, i.e., and . The first reduction happens when UEs start offloading local tasks to the edge cloud; while the second one results when edge servers stop cooperating and most tasks are allocated to the edge server closer to the respective UEs, significantly reducing the transmission cost within the edge cloud, while increasing average delay (since load is not balanced between edge servers in favor of delay performance). A more detailed cost breakdown is presented in [7].
Based on the tradeoff relationship, we can tune the value of to optimize the performance of practical MEC networks. For example, the value leads to an average delay of , which is acceptable for realtime applications; while a cost of , which reduces the gap to the optimal cost by (compared with when ).
Service  Service  

Function  Function  Function  Function  
Finally, we observe the offloading ratios for different computation tasks and various values in Table II. As expected, a growing value of puts more attention on the average cost, motivating the UEs to offload service tasks to the cloud. In addition, we find that for all listed values of , Service tasks tend to have a higher offloading ratio. An intuitive explanation is that Service is more computeintensive, while resulting in lower communication overhead than Service , and thus more preferable for offloading.
V Conclusive Remarks
In this paper, we leveraged recent advances in the use of Lyapunov optimization theory to study the stability of distributed computing networks, in order to address key open problems in MEC network control. We designed a dynamic control algorithm, MECNC, that makes joint decisions about multitask offloading, packet routing/scheduling, and computation/communication resource allocation. Numerical experiments were carried out on the stability region, costdelay tradeoff, and task assignment performance of the proposed solution, proving to be a promising paradigm to manage next generation MEC networks.
References
 [1] (201703) Mobile edge computing: A survey on architecture and computation offloading. IEEE Communications Surveys & Tutorials 19 (3), pp. 1628–1656. Cited by: Fig. 2, §I.
 [2] (201511) On orchestrating virtual network functions in NFV. In 11th Int. Conf. on Network and Service Management (CNSM), Barcelona, Spain, pp. 50–56. External Links: Document Cited by: §I.
 [3] (201310) Joint spatial division and multiplexing – The largescale array regime. ieee_j_it 59 (10), pp. 6441–6463. Cited by: §IIA.
 [4] (201611) A survey on service function chaining. Journal of Network and Computer Applications 75 (1), pp. 138–155. Cited by: §I.
 [5] (201803) Task offloading for mobile edge computing in software defined ultradense network. ieee_j_jsac 36 (3), pp. 587–597. Cited by: §I.
 [6] (201806) Energyefficient admission of delaysensitive tasks for mobile edge computing. ieee_j_com 66 (6), pp. 2603–2616. Cited by: §I.
 [7] Mobile edge computing network control: Tradeoff between delay and cost. arXiv preprint. Cited by: §IIIC, §IVB.
 [8] (201810) Optimal dynamic cloud network control. ieee_j_net 26 (5), pp. 2118–2131. Cited by: §I, §IIIA, §IIIA.
 [9] (201812) Optimal control of wireless computing networks. ieee_j_wcom 17 (12), pp. 8283–8298. Cited by: §I, Remark 2.
 [10] (2010) Stochastic network optimization with application to communication and queueing systems. Morgan & Claypool, San Rafael, CA, USA. Cited by: §IID.
 [11] (201901) Joint task offloading and resource allocation for multiserver mobileedge computing networks. ieee_j_vt 68 (1), pp. 856–868. Cited by: §I.
 [12] (201505) The cloud service distribution problem in distributed cloud networks. In Proc. IEEE Int. Conf. Commun., London, UK, pp. 344–350. External Links: Document Cited by: §I.
 [13] (201312) A survey of mobile cloud computing: architecture, applications, and approaches. Wirel. Commun. Mob. Comput. 13 (18), pp. 1587–1611. Cited by: §I, §I.
Comments
There are no comments yet.