distributed online optimization of fog computing for ... · index terms—fog computing,...

14
2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.2979353, IEEE Internet of Things Journal 1 Distributed Online Optimization of Fog Computing for Internet-of-Things under Finite Device Buffers Chenshan Ren, Xinchen Lyu, Wei Ni, Hui Tian, Wei Song, and Ren Ping Liu Abstract—Lyapunov optimization has shown to be effective for online optimization of fog computing, asymptotically approaching the optimality only achievable off-line. However, it is not directly applicable to the Internet-of-Things, as inexpensive sensors have small buffers and cannot generate sufficient backlogs to activate the optimization. This paper proposes an enabling technique for Lyapunov optimization to operate under finite buffers without loss of asymptotic optimality. This is achieved by optimizing the biases (namely, “virtual placeholders”) of the buffers to create sufficient backlogs. The optimization of the placeholders is proved to be a new three-layer shortest path problem, and solved in a distributed manner by extending the Bellman-Ford algorithm. The sizes of the virtual placeholders decline fastest along the shortest paths from the sensors to the data center, thereby preventing unnecessary detours and reducing end-to-end delays. Corroborated by simulations, the proposed approach is able to operate under the conditions the direct application of Lyapunov optimization fails, and significantly increase the throughput and reduce the delays in other cases. Index Terms—Fog computing, Internet-of-things, Lyapunov optimization, finite device buffers. I. I NTRODUCTION By equipping everyday objects with sensors, electronics, and network connectivity, Internet-of-Things (IoT) can bring the world of ubiquitous and pervasive intelligence into reali- ty [1]. By enabling the edge devices with storage and comput- ing capabilities and conducting big data analytics at the point of capture, fog computing can achieve the promising beneficial features of IoT and is regarded as the enabling technology of the emerging resource-hungry and data-intensive IoT services, such as augmented reality, video surveillance, and industrial automation [2]–[4]. Fig. 1 shows an illustrative example of fog computing for IoT services, where a number of IoT devices, connected to an edge cloud through wireless interfaces, produce big data destined for a data center. By leveraging the embedded computing capacity of edge servers (such as switches, routers, and gateways), the data from the IoT devices can be processed while being routed to the data center [1]. However, online This work was supported in part by NSFC under Grant 61790553 and in part by the Promotion Plan for Young Teachers Scientific Research Ability of the Minzu University of China under Grant 2020QNPY105. (Corresponding author: Hui Tian.) C. Ren and W. Song are with Minzu University of China, China. X. Lyu is with the National Engineering Laboratory for Mobile Network Technologies, Beijing University of Posts and Telecommunications, China. W. Ni is with the Data61, CSIRO, Australia. H. Tian are with the State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, China. R. P. Liu is with the Global Big Data Technologies Center, University of Technology Sydney, Australia. Gateway Router Base station Data center Result routing Processing Task offloading Task queue Edge cloud Result queue IoT sensors Data queue Buffer size D() m t max D () i Qt () j R t Fig. 1. Fog computing in IoT networks. optimization of fog computing is intractable due to the sheer size of IoT, the prevalent randomness of data arrivals and background traffic, and the resultant coupling of optimal operations over time. The optimal operations of fog computing could be only achieved off-line by jointly but computationally prohibitively optimizing across an infinite time horizon and hence over an infinite number of optimization variables. We can take a new interpretation of the fog computing in IoT networks as a distributed cascaded queuing system, where each IoT device is equipped with a data buffer for the storage of sensory data. Each edge server maintains a task queue and a result queue for raw data and results, respectively. The raw data is uploaded from the buffer of the IoT devices to the task queues at the edge servers via wireless interfaces. The sinks (i.e., the data centers) have empty queues all the time. Lyapunov optimization [5] is a broadly used stochastic optimization technique in queuing systems, e.g., routing, with extensive applications to fog computing [6]–[11]. Given a long term, global objective (e.g., of route selection), the Lyapunov optimization can decouple the optimal decisions of individual network nodes over time and between the nodes. This is done by minimizing the upper bound of the Lyapunov drift- plus-penalty at each time slot to collectively maximize the utility/objective while guaranteeing the stability of all the queues of the nodes. A set of rules can be specified online, and each network node can evaluate their queue backlogs and their immediate neighbors’ queues against the rules to make the decisions. Collectively, the decisions of all nodes at all time slots can be proved to be asymptotically optimal. There exists an [O(V ), O(1/V )]-tradeoff between the queue lengths and optimality loss [5]. V is a configurable controllable parameter to adjust the weights (or priorities) of stability and optimality (i.e., system utility) in the Lyapunov drift-plus- Authorized licensed use limited to: CSIRO Information Technology Services. Downloaded on April 23,2020 at 06:34:36 UTC from IEEE Xplore. Restrictions apply.

Upload: others

Post on 12-Sep-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Distributed Online Optimization of Fog Computing for ... · Index Terms—Fog computing, Internet-of-things, Lyapunov optimization, finite device buffers. I. INTRODUCTION By equipping

2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.2979353, IEEE Internet ofThings Journal

1

Distributed Online Optimization of Fog Computingfor Internet-of-Things under Finite Device Buffers

Chenshan Ren, Xinchen Lyu, Wei Ni, Hui Tian, Wei Song, and Ren Ping Liu

Abstract—Lyapunov optimization has shown to be effective foronline optimization of fog computing, asymptotically approachingthe optimality only achievable off-line. However, it is not directlyapplicable to the Internet-of-Things, as inexpensive sensors havesmall buffers and cannot generate sufficient backlogs to activatethe optimization. This paper proposes an enabling technique forLyapunov optimization to operate under finite buffers withoutloss of asymptotic optimality. This is achieved by optimizing thebiases (namely, “virtual placeholders”) of the buffers to createsufficient backlogs. The optimization of the placeholders is provedto be a new three-layer shortest path problem, and solved in adistributed manner by extending the Bellman-Ford algorithm.The sizes of the virtual placeholders decline fastest along theshortest paths from the sensors to the data center, therebypreventing unnecessary detours and reducing end-to-end delays.Corroborated by simulations, the proposed approach is able tooperate under the conditions the direct application of Lyapunovoptimization fails, and significantly increase the throughput andreduce the delays in other cases.

Index Terms—Fog computing, Internet-of-things, Lyapunovoptimization, finite device buffers.

I. INTRODUCTION

By equipping everyday objects with sensors, electronics,and network connectivity, Internet-of-Things (IoT) can bringthe world of ubiquitous and pervasive intelligence into reali-ty [1]. By enabling the edge devices with storage and comput-ing capabilities and conducting big data analytics at the pointof capture, fog computing can achieve the promising beneficialfeatures of IoT and is regarded as the enabling technology ofthe emerging resource-hungry and data-intensive IoT services,such as augmented reality, video surveillance, and industrialautomation [2]–[4].

Fig. 1 shows an illustrative example of fog computingfor IoT services, where a number of IoT devices, connectedto an edge cloud through wireless interfaces, produce bigdata destined for a data center. By leveraging the embeddedcomputing capacity of edge servers (such as switches, routers,and gateways), the data from the IoT devices can be processedwhile being routed to the data center [1]. However, online

This work was supported in part by NSFC under Grant 61790553 and inpart by the Promotion Plan for Young Teachers Scientific Research Ability ofthe Minzu University of China under Grant 2020QNPY105. (Correspondingauthor: Hui Tian.)

C. Ren and W. Song are with Minzu University of China, China.X. Lyu is with the National Engineering Laboratory for Mobile Network

Technologies, Beijing University of Posts and Telecommunications, China.W. Ni is with the Data61, CSIRO, Australia.H. Tian are with the State Key Laboratory of Networking and Switching

Technology, Beijing University of Posts and Telecommunications, China.R. P. Liu is with the Global Big Data Technologies Center, University of

Technology Sydney, Australia.

Gateway Router

Base station

Data center

Result routing

Processing

Task offloading

Task queue

Edge cloud

Result queue

IoT sensors

Data queue

Buffer size

D ( )m t

maxD

( )iQ t( )jR t

Fig. 1. Fog computing in IoT networks.

optimization of fog computing is intractable due to the sheersize of IoT, the prevalent randomness of data arrivals andbackground traffic, and the resultant coupling of optimaloperations over time. The optimal operations of fog computingcould be only achieved off-line by jointly but computationallyprohibitively optimizing across an infinite time horizon andhence over an infinite number of optimization variables.

We can take a new interpretation of the fog computing inIoT networks as a distributed cascaded queuing system, whereeach IoT device is equipped with a data buffer for the storageof sensory data. Each edge server maintains a task queue anda result queue for raw data and results, respectively. The rawdata is uploaded from the buffer of the IoT devices to the taskqueues at the edge servers via wireless interfaces. The sinks(i.e., the data centers) have empty queues all the time.

Lyapunov optimization [5] is a broadly used stochasticoptimization technique in queuing systems, e.g., routing, withextensive applications to fog computing [6]–[11]. Given a longterm, global objective (e.g., of route selection), the Lyapunovoptimization can decouple the optimal decisions of individualnetwork nodes over time and between the nodes. This isdone by minimizing the upper bound of the Lyapunov drift-plus-penalty at each time slot to collectively maximize theutility/objective while guaranteeing the stability of all thequeues of the nodes. A set of rules can be specified online,and each network node can evaluate their queue backlogsand their immediate neighbors’ queues against the rules tomake the decisions. Collectively, the decisions of all nodesat all time slots can be proved to be asymptotically optimal.There exists an [O(V ),O(1/V )]-tradeoff between the queuelengths and optimality loss [5]. V is a configurable controllableparameter to adjust the weights (or priorities) of stability andoptimality (i.e., system utility) in the Lyapunov drift-plus-

Authorized licensed use limited to: CSIRO Information Technology Services. Downloaded on April 23,2020 at 06:34:36 UTC from IEEE Xplore. Restrictions apply.

Page 2: Distributed Online Optimization of Fog Computing for ... · Index Terms—Fog computing, Internet-of-things, Lyapunov optimization, finite device buffers. I. INTRODUCTION By equipping

2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.2979353, IEEE Internet ofThings Journal

2

penalty function.The optimization in this cascaded queuing system would

require sufficient differences among the queues (such as thequeues of the IoT devices, switches/routers, gateways, andthe data center in the context of this paper) to steer datafrom the IoT devices through edge servers to the data center.Unfortunately, inexpensive IoT devices can only have verylimited buffers, leading to insufficient queue differences fordriving data towards the data center. Moreover, the limitedbuffers of IoT devices do not align with the typical setting ofLyapunov optimization, where V needs to be large to achievethe asymptotic optimality. The reason is that it is necessaryto increase the queue lengths to reduce the optimality losswith inverse proportionality, as characterized by the typical[O(V ),O(1/V )]-tradeoff. To the best of our knowledge, noneof the existing Lyapunov optimization approaches can routedata from small, finite buffers to significantly large buffers [6]–[12].

This paper proposes an enabling technique for the Lya-punov optimization to operate under finite (limited) buffersof data sources, i.e., the practical IoT devices, and achieveboth (asymptotic) optimality and stability. This is done byoptimizing the biases (also known as “virtual placeholders”)of individual queues to create sufficient differences of thequeues to activate the Lyapunov optimization. In contrast to adirect application of Lyapunov optimization, the novelties ofthe paper are summarized as follows.

• We cast the Lyapunov optimization problem for distribut-ed online optimization of fog computing, first under theideal assumption of infinite buffers at the IoT devices.Asymptotically optimal solution can be achieved in adistributed fashion, provided there are sufficient queuesdifferences to activate the Lyapunov optimization.

• We optimize the virtual placeholders of all queues in adistributed manner, to create sufficient queue differencesand activate Lyapunov optimization under finite buffersettings. The optimal virtual placeholders is proved tobe a new three-layer shortest path problem, and solvedby extending the celebrated (decentralized) Bellman-Fordalgorithm.

• The sizes of the optimal virtual placeholders declinefastest along the shortest paths from the IoT devicesthrough edge servers to the data center, thereby prevent-ing unnecessary detours and reducing end-to-end delays.

• Corroborated by simulations, the proposed approach en-ables the Lyapunov optimization to operate under V ≥200 and achieve the asymptotic optimality. In contrast, thedirect use of the Lyapunov optimization does not supportV ≥ 20. Moreover, our approach can reduce end-to-enddelays by 90%, as compared to the direct application ofthe Lyapunov optimization, even when V = 5.

To the best of our knowledge, none of the existing studiesin fog computing or cloud computing [6]–[24] have takenthe limited finite buffers of practical IoT devices into account.In [12]–[23], mobile edge computation offloading was studiedto offload resource-hungry applications from mobile devices toedge cloud. In [6]–[11], [24], the orchestration of computing

resources was studied for efficiently handling big data amongnetwork devices. In [12], [23], Lyapunov optimization was ex-ploited to develop online optimal decisions of task offloading.In [12], with the focus on wireless components, the asymptoticoptimality of scheduling decisions can be achieved in thepresence of partial feedback. In [23], Lyapunov optimizationwas exploited to decouple task assignment among edge serversin fog computing, and to minimize the average task completiontime, subject to the mobile devices battery capacity, taskscompletion deadlines and fog node storage availability. Anonline learning algorithm was proposed to solve the per-slotproblem in the lack of complete local knowledge by applyingan upper confidence bound technique for multi-armed bandit.

In [6]–[11], [24], Lyapunov optimization was exploited todevelop online optimal decisions of resource management.In [6]–[8], the cooperations of mobile devices were optimizedwhere tit-for-tat incentive mechanism was designed to preventselfish behaviors of the devices. In [9], the distributed opti-mization of large-scale inhomogeneous fog computing wasdeveloped with the emphasize of establishing collaborativeregion for each individual edge server. In [10], given thenonuniform device cardinality (i.e., network connectivity) ofIoT devices and edge servers, graph matching technique wasapplied to decouple the spatial couplings of network operationsby exchanging information between neighboring network de-vices with asymptotically diminished optimality loss. In [11],by maintaining separate queues for different types of jobs,the scheduling of virtual machines (VMs) in cloud computingwas modeled as a multi-class queuing system. Both heuristicalgorithms (for the inter-queue and intra-queue schedulingof heterogeneous jobs) and queue-length-based policy wereproposed to minimize the average job completion time, and thecapacity region of the queue-length-based policy was analyzedby using Lyapunov drift function. In [24], deadline-awarescheduling of task offloading was proposed based on Lyapunovoptimization to minimize the long-term probability of violatingthe deadlines of tasks in fog computing. Each fog node wasdesigned to maintain two types of queues with high and lowpriorities for processing, and tasks were admitted into thequeues based on their deadline requirements and experienceddelay since being offloaded from end users.

However, the direct application of Lyapunov optimiza-tion [6]–[12], [23], [24] cannot address the problem of interestdue to the limited buffers of practical IoT devices. Placeholderhas been designed in conjunction with Lyapunov optimiza-tion [25]. As mentioned earlier, a new placeholder design is animportant contribution of this paper. It should be noted that theproposed design of placeholder is distinctively different fromthe existing studies (e.g., [25]), for the following reasons.• The proposed design of placeholders is to activate the

Lyapunov optimization under finite (limited) buffers, mo-tivated by the fact that limited buffer sizes would diminishthe differences of queues and disable the Lyapunov opti-mization. In contrast, the typical objective of placeholdersis to speed up convergence or improve the traditional[O(V ),O(1/V )]-tradeoff of Lyapunov optimization, asdone in [25].

• We discover the sizes of the virtual placeholders exhibit

Authorized licensed use limited to: CSIRO Information Technology Services. Downloaded on April 23,2020 at 06:34:36 UTC from IEEE Xplore. Restrictions apply.

Page 3: Distributed Online Optimization of Fog Computing for ... · Index Terms—Fog computing, Internet-of-things, Lyapunov optimization, finite device buffers. I. INTRODUCTION By equipping

2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.2979353, IEEE Internet ofThings Journal

3

a hierarchical graph structure, and exploit this finding tooptimize the virtual placeholders in a distributed manner.In contrast, in [25], the placeholders were configuredbased on the a-priori knowledge of the network, e.g., bypre-running the system until stabilization to obtain thesteady-state queue backlogs as the input to the design ofthe placeholders.

• We prove that the virtual placeholders can be cast as anew three-layer shortest path problem, and optimized in adistributed manner by extending the Bellman-Ford algo-rithm. This is beyond the existing placeholder techniquesin [25].

The rest of this paper is organized as follows. The systemmodel is presented in Section II. Section III elaborates onthe proposed distributed online approach which stochasticallyminimizes the time-average cost of fog computing, providedthe IoT buffers are sufficiently large. In Section IV, a newdecentralized algorithm is developed to optimize the virtualplaceholders and enable the proposed operations under limitedfinite buffers. Extensive simulations are provided in Section V,followed by conclusion in Section VI.

II. SYSTEM MODEL

As shown in Fig. 1, the system of interest consists of threetypes of nodes, namely, IoT devices, edge servers, and a datacenter. The IoT devices with wireless interface to an edgecloud generate large volumes of data destined for the datacenter (or sink), e.g., for big data analytics and services. Edgeservers can process the data collaboratively and deliver resultsto the data center. Let N = {0, . . . , N} denote the indexesof the data center and edge servers, where the data center islabeled by index 0 and the N edge servers are labeled from 1to N . Let M = {1, . . . ,M} be the set of IoT devices, and Mi

denote the set of the IoT devices connected to edge server i.The system operates on a slotted basis with slot duration T .Table I summarizes the notations used in this paper.

A. Network Model and Cascaded Queues

We consider a data queue Dm(t) with maximum buffer sizeDmax at each IoT device m to buffer sensory data, and anunprocessed data queue Qi(t) and a processed result queueRi(t) at each edge server i to buffer the data and results atthe edge server.

Fig. 1 also illustrates the data flows in the edge cloud. Frombottom to top, the sensory data can be uploaded from thebuffers Dm(t) of the IoT devices to the queues of unprocesseddata Qi(t) at the edge servers. The unprocessed data can beoffloaded to the queues of unprocessed data at its neighboringservers, or processed and placed into the result queue Ri(t).Any results are forwarded hop-by-hop to the data center. 1

1There can also be downstream data flows in the network, e.g., controlactions from edge servers and data center to IoT devices/actuators. The sizeof downstream data flows are typically a few bits (to control the statesof actuators), and much smaller than the sensory data/processed results togo upstream to the data center. As a result, the overhead of transmittingdownstream data flows is negligible as compared to upstream data flowsconsidered in this paper.

TABLE IDEFINITIONS OF NOTATIONS

Notation Definition

N Set of the data center and edge serversM Set of all the IoT devicesMi Set of IoT devices connected to edge server iT Slot durationAm(t) Size of data arriving at IoT device m at slot tKi(t) Available subchannels of edge server i at slot tcm(t) Channel capacity of IoT device m at slot tεm Cost for transmission per unit time of IoT device m at slot tCij(t) Capacity of link (i, j) during slot tεij(t) Cost of transmitting one bit of data over link (i, j) at slot tFi(t) Available computing resources of server i at slot tδi(t) Background task percentage of server iεi(t) Cost to run a CPU cycle of server i at slot tτm(t) Scheduled transmission duration of IoT device m at slot tfi(t) Computing resource allocation of server at slot tqij(t) Data forwarded from server i to server j at slot trij(t) Results dispatched from server i through server j at slot tDmax Maximum buffer size of IoT devicesDm(t) Data queue at IoT device m to buffer sensory data at slot tQi(t) Unprocessed data queue at each edge server i at slot tRi(t) Processed result queue at each edge server i at slot tρ CPU cycles for processing one bit of taskξ Ratio of results to unprocessed tasks

1) Data arrival and uploading at the IoT devices: LetAm(t) be the size of data arriving at data queue Dm(t) duringtime slot t, which is independent and identically distributed(i.i.d.)2 and upper bounded by Amax

m . The sensory data inDm(t) can be uploaded to the edge cloud via wireless links.Let Ki(t) ≤ L denote the number of subchannels at edgeserver i available for IoT data transmission during slot t. Inthe presence of background traffic, Ki(t) can change betweentime slots. Multiple IoT devices can be scheduled within asubchannel via time-division multiplexing. The wireless linksare assumed to undergo i.i.d. block fading, i.e., the channelcapacity in the uplink of IoT device m at slot t, cm(t) ≤ cmax,can change between times. cmax is the upper bound of the linkcapacity, given the finite transmit power of the device. Let εmdenote the cost for transmission per unit time, e.g., the transmitpower in terms of energy consumption.

2) Data dispatch, processing and result delivery in the edgecloud: The uploaded data can be partitioned, processed anddispatched among multiple servers. The topology of the edgeservers and the data center can be described by a graph G ={N,E}, where E collects the wired links between the edgeservers. Let Cij(t) ∈ (0, Cmax

ij ] be the capacity of link (i, j)at slot t, accounting for bi-directional transmissions over thelink. εij(t) denotes the cost of transmitting one bit of dataover link (i, j) with εminij ≤ εij(t) ≤ εmax

ij .Let Fi(t) = [1 − δi(t)]Fmax

i T be the computing resourcesof edge server i available for data processing during time slot

2In many cases, the assumption of i.i.d. data size is reasonable, since thedata are sensed from the ambient environment. The assumption can be relaxedto be non-i.i.d. by extending the per-slot drift ∆(t) in (27) to a T r-slot drift,i.e., ∆Tr (t) = E[L(t + T ) − L(t)] [5]. Let T r be the recurrence time ofa state in the a Discrete-Time Markov Chain (DTMC). By adopting DTMCanalysis, the stochastic process of ∆Tr (t) can be proved to be i.i.d. at theinterval of T r slots.

Authorized licensed use limited to: CSIRO Information Technology Services. Downloaded on April 23,2020 at 06:34:36 UTC from IEEE Xplore. Restrictions apply.

Page 4: Distributed Online Optimization of Fog Computing for ... · Index Terms—Fog computing, Internet-of-things, Lyapunov optimization, finite device buffers. I. INTRODUCTION By equipping

2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.2979353, IEEE Internet ofThings Journal

4

1=0.9T 2 =0.9T3=0.6T 4 =0.6T

T T T

T

Transmission

Schedules

Sub-channel 1

Sub-channel 2

Sub-channel 3

Fig. 2. An illustration on the generation of a feasible transmission schedulewith Ki = 3 subchannels and Mi = 4 IoT devices.

t, where Fmaxi is its computing capability and δi(t) is the

percentage of tasks running at the background of the server atthe time. Let εi(t) be the computation cost (per CPU cycle)of server i at slot t with εmini ≤ εi(t) ≤ εmax

i .

B. Causality Constraints and Queue Dynamics

Over the wireless links, τm(t) denotes the scheduled trans-mission duration of IoT device m during slot t. Considerinexpensive, narrow-band (NB) IoT devices [26], which canaccess at most one subchannel at a time. We have

0 ≤ τm(t) ≤ T , ∀m ∈M; (1)∑m∈Mi(t)

τm(t) ≤ Ki(t)T , ∀i ∈ N; (2)

where (1) indicates that any device can access at most one sub-channel according to the NB-IoT specification; and (2) statesthat the total length of the uplink schedules cannot exceed theavailability of the subchannels. By jointly considering (1) and(2), a feasible transmission schedule can be generated.

Fig. 2 provides an illustrative example to demonstrate thegeneration of a feasible transmission schedule, where the trans-mission duration τi(t) of edge server i is assumed to satisfy(1) and (2) at time slot t. In the example, there are Ki = 3available subchannels and Mi = 4 devices within the coverageof edge server i. The transmission durations of the four devicesare τ1 = 0.9T , τ2 = 0.9T , τ3 = 0.6T , and τ4 = 0.6T . Afeasible schedule assigns the transmission duration τm for eachIoT device m (m = 1, · · · , 4) to the Ki available subchannelswith slot length T per subchannel. The assignment can readilyfollow: (a) concatenate the transmission durations τ (e.g., inan increasing order of the device index) to be no more thanKiT in length in time; and (b) divide the length of KiTinto Ki non-overlapping slots with length T per slot. The Ki

slots can be accommodated in the Ki subchannels, a shownin Fig. 2. There is no overlapping between any devices, andeach device operates at the bandwidth of a single subchannelat any moment. Given τ satisfying (1) and (2), the generatedtransmission schedule is feasible.

The amount of data uploaded from IoT device m to itsconnected edge server i, denoted by dm(t), is proportionalto the transmission duration and upper bounded by the dataavailable in its buffer, i.e., dm(t) = min{Dm(t), cm(t)τm(t)}.

Hence, Dm(t) satisfies a causality condition as presented inthe following.

Dm(t+ 1) = [Dm(t)− dm(t)]

+ min{Am(t), Dmax −Dm(t) + dm(t)}.(3)

Here, (3) is the buffer size constraint, where the data arrival,i.e., min{Am(t), Dmax −Dm(t) + dm(t)}, indicates that thequeue backlogs cannot exceed the maximum buffer size Dmax

at any moment. Given (3), the actual queue lengths can by nomeans violate the finite buffer size of the IoT devices. Thisis different from the setting of most Lyapunov optimizationdesigns [6]–[12].

In the edge cloud, fi(t) is the computing resources of edgeserver i allocated for data processing at slot t, satisfying

0 ≤ fi(t) ≤ Fi(t), ∀i ∈ N. (4)

Let qij(t) denote the volume of data forwarded from serveri to server j at time slot t, and rij(t) denote the volume ofresults dispatched from server i through server j to the datacenter at the slot. We have

qij(t) + rij(t) + qji(t) + rji(t) ≤ Cij(t), ∀(i, j) ∈ E;qij(t) ≥ 0, rij(t) ≥ 0, ∀(i, j) ∈ E;

(5)

where the first inequality is because the link capacityCij(t) specifies the maximum data/results transmitted throughthe link.

The backlog of unprocessed data at edge server i at timeslot t, i.e., Qi(t), can be updated by

Qi(t+ 1) = max{Qi(t)− fi(t)/ρ−∑

j∈Nqij(t), 0}

+∑

j∈Nqji(t) +

∑m∈Mi

dm(t).(6)

Here, the first term max{Qi(t) − fi(t)/ρ −∑j∈N qij(t), 0}

in (6) accounts for the data in the data queue at server i,Qi(t), after part of the data have been processed, fi(t)/ρ, ordispatched out of the server,

∑j∈N qij(t). ρ is the number of

CPU cycles for processing one bit of data. The second term∑j∈N qji(t) is the data dispatched from other servers, and the

third term∑m∈Mi

dm(t) is the volume of data uploaded tothe edge server at the time slot.

Likewise, the backlog of results at server i at time slot t,i.e., Ri(t), can be updated by

Ri(t+ 1) = max{Ri(t)−∑

j∈Nrij(t), 0}

+∑

j∈Nrji(t) + ξfi(t)/ρ,

(7)

where ξfi(t)/ρ is the size of results injected into the queuevia data processing, and ξ is the ratio between the processedresult and its unprocessed data in terms of size. Note thatR0(t) = 0, ∀t, since the data center acts as the sink of data.

The system is stable, if and only if the following is met [5]

Dm(t) <∞, Qi(t) <∞, Ri(t) <∞, ∀i,m, (8)

where X(t) = limT→∞1T

∑T−1τ=0 E[X(τ)] denotes the time-

average of a stochastic process X(t).

Authorized licensed use limited to: CSIRO Information Technology Services. Downloaded on April 23,2020 at 06:34:36 UTC from IEEE Xplore. Restrictions apply.

Page 5: Distributed Online Optimization of Fog Computing for ... · Index Terms—Fog computing, Internet-of-things, Lyapunov optimization, finite device buffers. I. INTRODUCTION By equipping

2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.2979353, IEEE Internet ofThings Journal

5

III. FOG COMPUTING UNDER INFINITE IOT BUFFERS

The research approach we take is to first develop the(asymptotically) optimal solution for fog computing under theassumption of infinite buffers (as presented in this section), andthen design the virtual placeholders to relax the assumption insupport of finite limited buffers of practical IoT devices (aswill be presented in Section IV). The relaxation is rigorouslyverified to not compromise the asymptotic optimality of thesolution achieved under the assumption of infinite buffers.

A. Problem Statement and Reformulation

The overall cost of fog computing at time slot t, i.e.,ϕ(x(t)), can be given by

ϕ(x(t)) =∑

m∈Mεmτm(t)+

∑i,j∈N

ϕij(t)+∑

i∈Nϕi(t),

(9)where x(t) = {τm(t), fi(t), qij(t), rij(t),∀m, i, j} is theset of optimization variables of data uploading, process-ing, dispatch, and result delivery at time slot t. The costfor data delivery through link (i, j) at slot t, denoted byϕij(t) = εij(t)(qij(t) + rij(t)), is the total of the costsfor the forwarding raw data, i.e., εij(t)qij(t), and deliveringresults, i.e., εij(t)rij(t) over the link. Here, εij(t) is the costof transmitting a bit of data or result over link (i, j) at slott, and qij(t) and rij(t) are the volumes of raw data andresults dispatched from server i to server j at the slot. Thecost for data processing of server i at slot t, denoted byϕi(t) = εi(t)fi(t), is the product of the cost of running aCPU cycle of server i at the slot, i.e., εi(t), and the computingresources (i.e., the number of available CPU cycles) of theserver allocated for data processing at the slot, i.e., fi(t).

With the random wireless channels, data arrivals, and back-ground services, we target at minimizing the time-average costof fog computing while preserving the stability of the network,as given by

minXϕ(x(t))

s.t. (1)–(8), ∀t,(10)

where X is the set of all variables over all time slots.Minimizing the time-average cost of fog computing over

an infinite time horizon in (10) is challenging. The variablesare coupled in time due to the queue dynamics (3), (6) and(7). Moreover, the evolution of queue backlogs (6) and (7)can also result in strong couplings of variables in space(i.e., between different edge servers). For instance, the queuebacklogs of downstream edge servers depend on the output oftheir upstream counterparts in (6) and (7).

By applying the Lyapunov optimization, problem (10) canbe solved by minimizing problem (11) at each time slot overa large time horizon (see Appendix A), as given by

maxf(t),q̃(t),̃r(t),τ (t)

g(f(t)) + φ(q̃(t), r̃(t)) + η(τ (t))

s.t. (1), (2), (4), (5);(11)

where τ (t) = {τm,∀m ∈ M}, f(t) = {fi(t),∀i ∈ N},q̃(t) = {qij(t),∀i, j ∈ N}, and r̃(t) = {rij(t),∀i, j ∈ N}

are the decisions of data uploading, processing, dispatch, andresult delivery, respectively; and

g(f(t)) =∑

i∈N[(Qi(t)− ξRi(t))/ρ− V εi(t)]fi(t); (12a)

φ(q̃(t), r̃(t)) =∑

i,j∈NQi(t)[qij(t)− qji(t)]

+Ri(t)[rij(t)− rji(t)]− V εij(t)(qij(t) + rij(t));(12b)

η(τ (t)) =∑

i∈N,m∈Mi

[Dm(t)−Qi(t)]dm(t)− V εmτm(t).

(12c)

Here, V is a configurable coefficient to adjust the weights ofsystem stability and optimality (i.e., the time-average cost).

In the Lyapunv optimization, an upper bound of the a drift-plus-penalty is minimized at every time slot, as done in (11).Under the assumption of sufficiently large (infinite) buffers,Lyapunov optimization is able to asymptotically minimizethe time-average cost while achieving system stability, witha typical [O(V ),O(1/V )]-tradeoff between the steady-statequeue lengths and optimality loss. The proof of the asymptoticoptimality under infinite buffers will be given in Section IV-A.

Under the finite buffers of IoT devices, a trivial “optimal”solution could be simply to turn off all intermediate linksand reject all arrivals. This is because the differences ofqueues between the IoT devices and their downstream serversare insufficient to activate the Lyapunov optimization. Aswill be shown in Fig. 4, when V ≥ 20, a direct use ofLyapunov optimization is ineffective, resulting in zero systemthroughput and cost; leave alone achieving the asymptoticoptimality (which requires V � 0, as described in the typical[O(V ),O(1/V )] asymptotic optimality). We propose to placevirtual placeholders to enlarge the queues of individual devicesvirtually, thereby enabling the Lyapunov optimization andpreserving the asymptotic optimality under limited finite IoTbuffers. The details will be presented in Section IV-B.

B. Distributed Online Optimization under Infinite IoT Buffers

The reformulation from (10) to (11) is a direct application ofLyapunov optimization. Nevertheless, (11) provides a new andspecific problem and requires specific solutions, as developedin this Section. We observe in (11) that the decisions ondata processing, the decisions on data dispatch and resultdelivery, and the schedules of IoT data uploading are readyto be decoupled. g(f(t)) can be maximized subject to (4)for data processing; φ(q̃(t), r̃(t)) can be maximized subjectto (5) for data dispatch and result delivery; and η(τ (t)) canbe maximized subject to (1) and (2) for the schedules ofdata uploading.

1) Data Processing, Dispatch, and Result Delivery: From(12a), the optimization of data processing can be decoupledbetween edge servers. The problem of data processing at serveri can be formulated as

maxfi(t)

[(Qi(t)− ξRi(t))/ρ− V εi(t)]fi(t) s.t. (4), (13)

Authorized licensed use limited to: CSIRO Information Technology Services. Downloaded on April 23,2020 at 06:34:36 UTC from IEEE Xplore. Restrictions apply.

Page 6: Distributed Online Optimization of Fog Computing for ... · Index Terms—Fog computing, Internet-of-things, Lyapunov optimization, finite device buffers. I. INTRODUCTION By equipping

2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.2979353, IEEE Internet ofThings Journal

6

which is a weighted-sum maximization problem in linearprogramming [27]. The optimal decision of data processing is

fi(t) =

{Fi(t), if (Qi(t)− ξRi(t))/ρ− V εi(t) > 0;0, otherwise.

(14)From (12b), the optimization of data dispatch and result

delivery can be decoupled between different links, as given by

maxq̃ij(t),̃rij(t) φij(q̃ij(t), r̃ij(t)) s.t. (5), (15a)

where q̃ij(t) = {qij(t), qji(t)} and r̃ij(t) = {rij(t), rji(t)}are the decisions of bi-directional data dispatch and resultdelivery, respectively. φij(q̃ij(t), r̃ij(t)) = βij(t)qij(t) +βji(t)qji(t) + γij(t)rij(t) + γji(t)rji(t) can be obtained bydecoupling (12b) between links, and

βij(t) = Qi(t)−Qj(t)− V εij(t); (15b)γij(t) = Ri(t)−Rj(t)− V εij(t). (15c)

In (15), the objective φij(q̃ij(t), r̃ij(t)) = βij(t)qij(t) +βji(t)qji(t) + γij(t)rij(t) + γji(t)rji(t) is a weighted-sumcombination of the non-negative variables q̃ij(t) and r̃ij(t).The optimal solution for such subproblem is to maximizethe variable with the largest positive coefficient (or weight,e.g., βij(t) > 0 and γij(t) > 0) to meet the constraint (5)with equality, and set the rest of the variables to zero, asfollows. If max{βij(t), γij(t)} < 0 or max{βij(t), γij(t)} <max{βji(t), γji(t)}, server i neither dispatches data nor de-livers results over link (i, j) at the slot. Otherwise, server ioccupies the link. Particularly, if βij(t) > γij(t), server iwithholds from delivering results via server j, and the optimalsize of dispatched data is

qij(t) =

{Cij(t), if βij(t) > γij(t) and βij(t) > 0;0, otherwise.

(16a)If γij(t) ≥ βij(t), server i withholds from dispatching data toserver j, and the optimal size of result delivery is

rij(t) =

{Cij(t), if γij(t) ≥ βij(t) and γij(t) > 0;0, otherwise.

(16b)From (14) and (16), we find that the optimal decisions of

data processing, dispatch, and result delivery can be made ateach individual edge server in O(1) time-complexity. Thisis achieved by having each edge server i measure its localinformation, including Fi(t), εi(t), and εij(t), and exchangethe local queue backlogs of Qi(t) and Ri(t) with its immediateneighbors.

2) Data Uploading of IoT Devices: From (3), it is clearthat device m cannot send more data than the data availablein its buffer at any time. We have τm(t) ≤ Dm(t)/cm(t), and(1) can be rewritten as

0 ≤ τm(t) ≤ Tm(t), ∀m ∈M, (17)

where Tm(t) = min{Dm(t)/cm(t), T}. By rearranging (12c),each server i can optimize its own schedule τi(t) for itsassociated devices in Mi, as given by

maxτi(t)

∑m∈Mi

αim(t)τm(t)

s.t. (2) and (17),(18)

Algorithm 1 Online Optimization of IoT Data SchedulingFor IoT device m at slot t:

1: Report Dm(t), cm(t) and εm(t) to its associated edgeserver i;

For edge server i at time slot t:2: Locally measure Ki(t) and Qi(t);3: Collect reports from IoT devices;4: Schedule the IoT data uploading according to (21);

where

αim(t) = [Dm(t)−Qi(t)]cm(t)− V εm. (19)

Problem (18) is a linear knapsack problem, where αim(t)denotes the unit profit of the i-th “item” and Ki(t)T in (2)is the volume of the knapsack. Without loss of generality, weassume αim(t) ≥ αim′(t) for any m > m′, i.e., the devices areordered in terms of their unit profits. The optimal solution isgiven by packing the “items” with higher unit profit than thebreaking item until fulfilling the knapsack [28], i.e., τm(t) =Tm(t) if

∑mj=1 Tj(t) ≤ Ki(t)T . The breaking item is the

device to fulfill the knapsack (and hence, cannot be packed infull), and its index θ can be given by

θ = arg minm{∑m

j=1Tj(t) > Ki(t)T}. (20)

The optimal decisions of IoT schedules are

τm(t) =

Tm(t), if m < θ;Ki(t)T −

∑θ−1j=1 Tj(t), if m = θ;

0, otherwise.(21)

Solving (21) involves sorting the devices in descending orderof unit profit. The time-complexity of using a quicksortalgorithm [29] is O(Mi logMi), where Mi is the number ofdevices in the coverage of server i. Algorithm 1 summarizesthe proposed algorithm for producing the optimal schedulesof IoT data uploading.

IV. DISTRIBUTED OPTIMIZATION OF VIRTUALPLACEHOLDERS FOR SMALL IOT BUFFERS

From (14), (16) and (21), we can see that the data uploading,dispatch, processing, and result delivery are all driven bythe differences of backlogs between the IoT devices, edgeservers, and the data center. For instance, according to (16) and(21), the data uploading, dispatch, and processing can only beactivated when the parameters, αim(t), βij(t), and γij(t), arepositive (i.e., there must be positive differences of the backlogsbetween the upstream and downstream devices). It is importantto enlarge the differences of queues along the shortest paths todrive data flow to the data center. However, the queue lengthsat the IoT devices are practically constrained by their physicalbuffers Dmax, which can be much shorter than the queues atthe edge servers. Not only would this prevent achieving theasymptotic optimality of Lyapunov optimization, but wouldeven prevent the direct application of Lyapunov optimizationfrom functioning.

Authorized licensed use limited to: CSIRO Information Technology Services. Downloaded on April 23,2020 at 06:34:36 UTC from IEEE Xplore. Restrictions apply.

Page 7: Distributed Online Optimization of Fog Computing for ... · Index Terms—Fog computing, Internet-of-things, Lyapunov optimization, finite device buffers. I. INTRODUCTION By equipping

2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.2979353, IEEE Internet ofThings Journal

7

A. Optimality and Limitations of Lyapunov Optimization

We show the provisional asymptotic optimality of thesolutions developed in Section III-B, and the bounded in-stantaneous queue backlogs of the resultant fog computingsystem. Let ϕ(x(t)) denote the cost achieved by the solutionsdeveloped in Section III-B, and ϕopt be the cost of (10)minimized off-line by overlooking causality.

Theorem 1. The gap between ϕ(x(t)) and ϕopt is withinO(1/V ), as given by

ϕ(x(t))− ϕopt ≤ O(1/V ), (22)

i.e., ϕ(x(t)) is asymptotically optimal.

Proof: See Appendix B.From Theorem 1, the proposed approach is asymptotically

optimal, i.e., the optimality gap between the proposed ap-proach and the off-line optimum can asymptotically dimin-ish as V increases. Specifically, V in the tradeoff factor(1/V ) is a controllable parameter to balance the weights(or priorities) between reducing the penalty function (i.e.,system cost in the problem of interest) and stabilizing thequeues in the Lyapunov drift-plus-penalty function (27), i.e.,∆V (t) = ∆(t) + V E[Φ(x(t))].

By increasing V , we emphasize more on reducing thesystem cost. As a result, the gap of system cost between theproposed approach and the offline optimum can asymptoticallydiminish withinO(1/V ), as stated in Theorem 1. A large valueof V also requires increasingly large differences of backlogsbetween cascaded queues to activate the Lyapunov optimiza-tion (i.e., navigating data from the IoT devices through edgeservers to the data center). The queue backlogs would increaseto O(V ) to achieve the O(1/V ) close-to-optimal performance,as part of the typical [O(V ),O(1/V )]-tradeoff in the Lya-punov optimization.

Note that Theorem 1 is developed under the assumption ofinfinite buffers, and hence the queues can be sufficiently long.We can further show the instantaneous backlogs of all queuesare upper bounded in the following theorem.

Theorem 2. The queue backlogs at the edge servers arestrictly bounded at any slot t, i.e., Qi(t) ≤ Qmax

i andRi(t) ≤ Rmax

i , ∀i, t. The instantaneous upper bounds of thequeues, Qmax

i and Rmaxi , can be given by

Qmaxi = Dmax −

V εmcm

+ LTcmax +∑

j∈Ni

Cmaxji ; (23a)

Rmaxi = [Qmax

i − V ρεi]/ξ + ξF̂i/ρ+∑

j∈Ni

Cmaxji , (23b)

where Ni denotes the set of neighboring edge servers ofserver i.

Proof: See Appendix C.Limitations of Lyapunov optimization are revealed in The-

orem 2, where the upper bounds of the instantaneous queuebacklogs decrease linearly with V . Under finite buffer settings,it is revealed that, with the increase of V , the upper bounds ofthe queue backlogs are increasingly likely to become negative.In other words, Lyapunov optimization would stop working,and its nice properties (such as asymptotic optimality in

Theorem 1) would no longer hold. The virtual placeholders aredesigned to remove the assumption of infinite buffers from theLyapunov optimization, while preserving the nice properties,such as asymptotic optimality and system stability, under finiteIoT buffers. The details will be given in Section IV-B shortly.

Some recent works have applied (momentum) heavy-balliterations of stochastic gradient descent to speed up the conver-gence of Lyapunov optimization [30], [31]. By implementingLagrange multipliers decoupled from the actual queue back-logs for decision-making, an improved [O(V ),O(1/

√V )]-

tradeoff between the queue lengths and optimality loss canbe achieved [30]. However, these techniques would still sufferfrom the large V values, given the limited IoT buffers.The virtual placeholders designed in this section can readilyoperate in conjunction with the techniques [30], [31] to furtherspeed up the convergence (by injecting virtual placeholdersinto the Lagrange multipliers).

B. Virtual Placeholder Design

A virtual placeholder can be rigorously optimized for everyqueue to establish sufficient queue differences to drive the dataflow to the data center. The largest placeholders are placedat the IoT devices, hence making up for the limited finitebuffers of the IoT devices. The placeholders need to satisfythe following property [25].

Property 1. There exists a non-negative vector (i.e. placehold-er) Q0 = {Qi,0, Ri,0, Dm,0,∀i,m}, such that: if Q(0) � Q0,we have Q(t) � Q0 for all t ≥ 0.

Note that the existence of a non-negative placeholder perqueue, as stated in Property 1, does not require any specificcondition, since the queue backlogs are non-negative at anymoment. According to Property 1, the placeholder Q0 gives athreshold (or instantaneous lower bound) of the queue back-logs. Once the backlogs of the queues exceed Q0, the backlogscan by no means fall below Q0. In other words, the virtualplaceholders Q0 can be neither dispatched nor processed whilefollowing the operations in Section III-B. They are only usedto enlarge the differences between queues to accelerate dataprocessing and result delivery. Decoupled from the actualbacklogs, Q̃i(t), R̃i(t) and D̃m(t) are the effective backlogsafter placing the placeholders into the queues, as given by

Q̃i(t) = Qi(t) +Qi,0, ∀i; (24a)

R̃i(t) = Ri(t) +Ri,0, ∀i; (24b)

D̃m(t) = Dm(t) +Dm,0, ∀m. (24c)

Given the property of the virtual placeholders, the approachproposed in Section III-B can remain unchanged, except thatQi(t), Ri(t) and Dm(t) are replaced by the effective backlogsQ̃i(t), R̃i(t) and D̃m(t) in (24). The asymptotic optimalityproved in Theorem 1 is intact, since the placeholder Q0 atslot 0 does not affect the average utility in the long term; see(38) in Appendix B.

Authorized licensed use limited to: CSIRO Information Technology Services. Downloaded on April 23,2020 at 06:34:36 UTC from IEEE Xplore. Restrictions apply.

Page 8: Distributed Online Optimization of Fog Computing for ... · Index Terms—Fog computing, Internet-of-things, Lyapunov optimization, finite device buffers. I. INTRODUCTION By equipping

2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.2979353, IEEE Internet ofThings Journal

8

Corollary 1. Q0 satisfying Property 1 can be given by

Ri,0 =

{0, if i = 0;max{minj{Rj,0 + ∆ij}, 0}, otherwise;

(25a)

Qi,0 = max{minj{ξRi,0 + ∆i, Qj,0 + ∆ij}, 0}; (25b)

Dm,0 = max{Qi,0 + ∆im, 0}, m ∈Mi; (25c)

where ∆ij = V εminij − Cmax

ij ; ∆i = V ρεmini − F̂i/ρ; ∆i

m =V εm/c

max − cmaxT ; and ∆ij , ∆i and ∆im are restricted by

the gap between the minimum cost and maximum capacity oftransmission or processing for the servers and IoT devices,and can be adjusted by V .

Proof: See Appendix D.Recall that the objective of using placeholders here is to not

improve the [O(V ),O(1/V )]-tradeoff of Lyapunov optimiza-tion, but to unprecedentedly enable Lyapunov optimizationunder finite (limited) buffers. The weights (or distances) inthe formulated three-layer shortest-path problem, ∆ij , ∆i and∆im, all increase linearly with V . Although the traditionalO(V ) queue-length bound of Lyapunov optimization is not im-proved in Theorem 2, the placeholders specified in Corollary 1also grow at the rate of O(V ). This is the underlying reasonthat the actual queues do not violate the finite buffer sizesof practical IoT devices, while still preserving the asymptoticoptimality. As will be validated in Fig. 5, the O(V )-increasingplaceholders, under the typical O(V ) queue-length upperbounds, are sufficient to create the queue differences to activatethe Lyapunov optimization.

The virtual placeholders in Corollary 1 are “optimal” inthe sense that they are not only sufficient but necessary forProperty 1. On the one hand, the virtual placeholders satisfyProperty 1 would never be scheduled, hence keeping theasymptotically optimal solution developed under the assump-tion of infinite buffers intact, and preserving the asymptoticoptimality of the solution under finite buffer settings. Inthis sense, the virtual placeholders in Corollary 1 meet thesufficient condition for effective virtual placeholders. On theother hand, the proof of Corollary 1 indicates that one cannotincrease the weights between the placeholders, i.e., ∆ij , ∆i

and ∆im, (and hence, cannot increase the placeholders) without

violating Property 1; see Appendix D. The proof is based onthe worst-case scenario of the queue evolution. If the weights(and, in turn, placeholders) are further increased, some ofthe queue backlogs can drop below the placeholder sizes andviolate Property 1, as discussed in the proof. In this sense, theplaceholders in Corollary 1 hold the necessary condition foreffective virtual placeholders.

C. Three-layer Shortest Path Problem of Placeholders

As shown in Corollary 1, the placeholders in (25) exhibits arecurrent structure, i.e., the optimal placeholders are correlatedin the three-layer graph. The placeholders exhibit both inter-layer and intra-layer correlations in (25). This is becausethe processing and offloading decisions of individual nodes(optimized with the Lyapunov optimization and collectivelyachieving the asymptotic optimality) rely on the nodes’ queuebacklogs and their immediate neighboring nodes’; jointly

ij

/ij/i

R

Q j'

i j

D

0,0 =0R

0'

0

/im

i'

Fig. 3. An illustrative example of the three-layer placeholder graph formation.

optimizing the placeholders of neighboring nodes is criticalto encourage the nodes along the shortest paths to accepttasks and discourage the others. On the other hand, the dataqueue placeholders Qi,0 and the result queue placeholders Ri,0of edge server i depend on the corresponding placeholdersof its neighboring server j in the same layer, i.e., Qj,0 andRj,0, as stated in (25a) and (25b). By exploiting the optimalsubstructure of (25), the design of the placeholders can bereformulated as a three-layer shortest path problem, as shownin Fig. 3. The details are discussed in the following.

On the bottom layer, Ri,0 in (25a) shares the same optimalsubstructure as shortest path problems [32]. In particular, Ri,0depends on Rj,0 of server j ∈ Ni; and only R0,0 = 0 is knownin prior as the data center acts as the sink of the data. As aresult, Ri,0 in (25a) can be interpreted as the total distancefrom server i to the data center, measured by the total of theweights ∆ij on all hops of the shortest path.

We proceed to replace Qi,0 and Dm,0 with Q̂i,0 = Qi,0/ξ

and D̂m,0 = Dm,0/ξ to transform (25b) and (25c) as shortestpath problems from the nodes on the top and middle layers tothe sink R0,0 on the bottom layer, respectively, as given by

Q̂i,0 = max{minj{Ri,0 + ∆i/ξ, Q̂j,0 + ∆ij/ξ}, 0}; (26a)

D̂m,0 = max{Q̂i,0 + ∆im/ξ, 0}, m ∈Mi, (26b)

where, between the layers, Q̂i,0 corresponds to Ri,0 withweight ∆i/ξ for data processing; and D̂m,0 is adjacent to Q̂i,0with weight ∆i

m/ξ for data uploading.The new three-layer shortest path problem is illustrated in

Fig. 3, where the vertexes on the three layers correspond toRi,0, Q̂i,0 and D̂m,0, respectively. The solid lines representdata dispatch and result delivery in the edge cloud withweights ∆ij and ∆ij/ξ, and the dotted lines denote dataprocessing at server i with the weight ∆i/ξ and data uploadingfrom device m with weight ∆i

m/ξ.The three-layer shortest path problem can be solved by

finding the distance from the data center (i.e., the sink)with R0,0 = 0 to the node of virtual placeholders on thecorresponding layer. The distances from the sink R0,0 = 0

in the three-layer graph, i.e., Ri,0, Q̂i,0 and D̂m,0, can beobtained through the distributed single-source shortest pathalgorithms, e.g., the celebrated Bellman-Ford algorithm, where

Authorized licensed use limited to: CSIRO Information Technology Services. Downloaded on April 23,2020 at 06:34:36 UTC from IEEE Xplore. Restrictions apply.

Page 9: Distributed Online Optimization of Fog Computing for ... · Index Terms—Fog computing, Internet-of-things, Lyapunov optimization, finite device buffers. I. INTRODUCTION By equipping

2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.2979353, IEEE Internet ofThings Journal

9

Algorithm 2 Distributed Optimization of Virtual Placeholders1: Construct the three-layer placeholder graph, as illustrated

in Fig. 3;Virtual queue update at each device i: Distributed Bellman-

ford Algorithm [33]:2: Initialize Ri,0(0) =∞, Q̂i,0(0) =∞, and D̂m,0(0) =∞

except for R̂0,0(0) = 0, and the iteration index h = 1;3: repeat4: Update Ri,0(h), Q̂i,0(h), and D̂m,0(h) by (25a), (26a),

and (26b), respectively, where the right-hand sides ofthe equations take the values from iteration (h− 1);

5: h = h+ 1;6: until Ri,0(h) = Ri,0(h− 1), Q̂i,0(h) = Q̂i,0(h− 1), andD̂m,0(h) = D̂m,0(h− 1);

7: Attain Ri,0 = Ri,0(h), Qi,0 = ξQ̂i,0(h) and Dm,0 =

ξD̂m,0(h);8: Obtain the effective backlogs based on (24);

an approximation to the correct distance is gradually improvedby more accurate values until the eventual convergence to theoptimum [33]. After the three-layer shortest path problems aresolved, the placeholders Qi,0 and Dm,0 can be finally givenby ξQ̂i,0 and ξD̂m,0.

Algorithm 2 summarizes the distributed optimization of thevirtual placeholders. The algorithm runs one-off, before theplatform starts to operate. Once Steps 2–6 of Algorithm 2(i.e., the extended Bellman-Ford algorithm) completes, eachdevice is able to set its virtual placeholder (in Steps 7–8) andthe platform starts to operate (i.e., the operations developed inSection III-B).

Recall that the system of interest can be viewed as acascaded queuing system, where each IoT device is equippedwith a data buffer for the storage of sensory data, and eachedge server maintains a task queue and a result queue for rawdata and results. According to queuing theory [34], the averagedelay of processing a task is linear to the sum of the averagequeue backlogs along the path via which the task transversesfrom the input (i.e. the IoT device generating the task) to thesink (i.e., the data center). As a result, the two main factorsaffecting the average delay of the system are as follows.

1) Average Backlog of Each Queue: The average backlogsaccount for the queuing delay of a task from entering aqueue (e.g., task awaiting to be offloaded and processedin a task queue, and result awaiting to be delivered tothe data center in a result queue) till being delivered.

2) Path from a Device to the Data Center: Different pathsfrom the same input (i.e., the device generating thetask) to the sink (i.e., the data center) would involvedifferent queues (i.e., edge servers) and different numberof queues (and servers), resulting in different delays ofprocessing a task.

By meticulously designing the sizes of virtual placeholders, theproposed approach can significantly reduce the average delayof the system as compared to the no-placeholder counterpart.On one hand, the virtual placeholders can reduce the actualbacklogs in the queues (and, in turn, the queuing delay in each

queue). On the other hand, the sizes of the virtual placeholdersdepend on their distances to the sink and decline fastest alongthe shortest paths from the IoT devices through edge servers tothe data center. This leads data to flow along the shortest paths,hence preventing unnecessary detours and reducing end-to-enddelays.

V. SIMULATION RESULTS

Extensive simulations are carried out to evaluate the pro-posed approach in a network of N = 50 servers organizedin a complete ternary tree. The root is the data center, eachof the 33 leaf nodes (i.e., edge servers) is connected toN = 100 IoT devices, and the others act as intermediate edgeservers (such as gateways, routers, and switches) without IoTconnections. For each IoT device, sensory data are stored in abuffer with a maximum size of Dmax, and the data arrivalfollows a uniform distribution from 0.5 to 1.5Mbits [12].There are L subchannels per edge server for IoT transmissions.L follows a uniform distribution between 10 and 20; unlessotherwise specified. The capacity per subchannel is randomlyand uniformly distributed from 125 to 250kbps, accountingfor background traffic and time-varying channels [12]. TheIoT transmit power is set to 23dBm, following the 3GPPspecifications. The computing capacity of an edge serverranges from 3 to 15GHz with background computing taskuniformly distributed from 0 to 40% [9]. The link capacitybetween servers randomly and uniformly ranges from 10 to30Mbps. We run 10000 slots for each data point.

For comparison purpose, we also simulate: (a) a benchmarkapproach (denoted by “Benchmark”) which schedules IoT de-vices in a round-robin manner and all the data uploaded fromthe IoT devices are dispatched to the data center for process-ing, as typically done in traditional cloud computing; and (b)the direct application of Lyapunov optimization (denoted by“No Placeholder”), where there is no virtual placeholder. The“No Placeholder” approach follows the standard operations ofLyapunov optimizations which would be optimized under theassumption of infinite IoT buffers, as described in Section III.The only difference is that we enforce the maximum buffersize of the IoT buffers, i.e., Dmax. In other words, the part ofa queue longer than Dmax is removed (or overflown). Thereare no placeholders and the backlogs start to build up fromzero (at slot t = 0) until the maximum buffer size (as shownin Fig. 5).

The benchmark approach provides little scalability with theincrease of data, as it separately schedules IoT devices androutes data in the edge cloud with all the data processed at thedata center. Compared to the proposed approach with virtualplaceholders, the direct use of Lyapunov optimization fails tocreate sufficient queue differences along the shortest paths,which only operates under large IoT buffers and undergoesmuch longer delays. It is worth mentioning that the optimalcentralized offline scheme is computationally prohibitive tosimulate, due to the large number of variables over time andspace. Nevertheless, Theorem 1 proves that the optimality gapbetween the proposed Lyapunov optimization approach andthe centralized offline optimum would asymptotically diminishwith the increase of V .

Authorized licensed use limited to: CSIRO Information Technology Services. Downloaded on April 23,2020 at 06:34:36 UTC from IEEE Xplore. Restrictions apply.

Page 10: Distributed Online Optimization of Fog Computing for ... · Index Terms—Fog computing, Internet-of-things, Lyapunov optimization, finite device buffers. I. INTRODUCTION By equipping

2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.2979353, IEEE Internet ofThings Journal

10

0 50 100 150 200 250V0

10

20

30

40

50

60

70

80

90

Sys

tem

Thr

ough

put (

Mbp

s)

Proposed, Dmax

=30Mbits

Proposed, Dmax

=60Mbits

No Place-holder, Dmax

=30Mbits

No Place-holder, Dmax

=60Mbits

Benchmark

No virutal place-holder

Proposed

(a) System throughput

0 50 100 150 200 250V0

50

100

150

200

250

300

350

400

450

500

Sys

tem

Cos

t Proposed, Dmax

=30Mbits

Proposed, Dmax

=60Mbits

No Place-holder, Dmax

=30Mbits

No Place-holder, Dmax

=60Mbits

Benchmark

Proposed

No virtual place-holder

(b) System cost

Fig. 4. The steady-state system throughput and cost as the parameter Vincreases from 1 to 250. Note that the proposed direct application of Lyapunovoptimization cannot operate for V ≥ 20 in Fig. 4(a), and hence incurs nocost in Fig. 4(b).

Fig. 4 plots the steady-state system throughput and costachieved by the proposed approach with virtual placeholders,the proposed approach without virtual placeholders (i.e., thedirect application of Lyapunov optimization), and the bench-mark approach, as the parameter V increases from 1 to 250,where the IoT buffer sizes Dmax = 30 or 60Mbits. Wesee in Fig. 4(a) that when Dmax = 60Mbits, the proposedapproach with virtual placeholders can always achieve themaximum system throughput of 86.4Mbps after draining theresources at the data center and servers. In the case thatDmax = 30Mbits, the system throughput first increases withV and then stabilizes at the maximum under Dmax = 60Mbitswhen V ≥ 12. This is because there exist negative parts (i.e.,the link rates and computing capacities) in ∆ij , ∆i and ∆i

m forthe sizes of virtual placeholders, and these static parts wouldlead to insufficient virtual placeholders under small V valueswhen Dmax = 30Mbits. In Fig. 4(b), the system cost of theproposed approach with virtual placeholders decreases with Vand stabilizes when V ≥ 200. This validates the asymptoticoptimality of the approach, as dictated in Theorem 1, i.e., theoptimality loss against the global optimum would diminishwith the growth of V . Compared with the proposed approach,the benchmark approach only achieves 11% system throughputbut suffers 35% system cost.

(a) Effective backlogs

(b) System throughput

Fig. 5. The change of the effective queue backlogs of IoT devices andthe system throughput over time. When V = 20, the virtual placeholdersexceed the buffers Dmax = 60Mbits, and by no means can the direct use ofLyapunov optimization establish enough queue backlogs to function.

It is worth pointing out in Fig. 4 that the direct use ofLyapunov optimization without virtual placeholders cannotoperate properly due to the limited buffer sizes of IoT devices,and the system throughput quickly diminishes with the growthof V . We can see in both Figs. 4(a) and 4(b) that the directuse of Lyapunov optimization cannot process any data, whenV ≥ 10 in the case that Dmax = 30Mbits and when V ≥ 20in the case that Dmax = 60Mbits. This is because, when V islarge, the buffer sizes of IoT devices are even smaller than theminimum data sizes required to enable the system (which isthe virtual placeholders optimized in Section IV), as will beshown in Fig. 5 shortly.

Fig. 5 shows the evolution of the effective backlogs ofIoT devices and system throughput, as t increases from 0to 1500, where Dmax = 60Mbits and V = {10, 20}. Wecan see in Fig. 5(a) that the backlogs of the direct use ofLyapunov optimization and the benchmark approach increaseand stabilize at the IoT buffer size. The effective backlogsof Lyapunov optimization with virtual placeholders exhibit asimilar phenomenon but stabilize at much larger values thanDmax. This is because virtual placeholders can compensatefor the limited buffers of the IoT devices and create sufficientbacklog differences to drive the distributed online Lyapunov

Authorized licensed use limited to: CSIRO Information Technology Services. Downloaded on April 23,2020 at 06:34:36 UTC from IEEE Xplore. Restrictions apply.

Page 11: Distributed Online Optimization of Fog Computing for ... · Index Terms—Fog computing, Internet-of-things, Lyapunov optimization, finite device buffers. I. INTRODUCTION By equipping

2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.2979353, IEEE Internet ofThings Journal

11

100 200 300 400 500 600 700 800 900 1000Buffer Size of IoT Devices, D

max (Mbits)

0

10

20

30

40

50

60

70

80

90

Sys

tem

Thr

ough

put (

Mbp

s)

Proposed, V={50,100}No Place-holder, V=50No Place-holder, V=100Benchmark

Fig. 6. The system throughput as the buffer sizes of IoT devices Dmax

increase. When V = 100, the direct use of Lyapunov optimization requiresthe buffers to be at least 850Mbits which is not practical in inexpensiveIoT devices.

optimization; see (24). As a result, in Fig. 5(b), the systemthroughput of the proposed approach with virtual placeholderscan be significantly improved. The corresponding time tostabilize the system can be substantially reduced.

We also see in Fig. 5(a) that the virtual placeholders (i.e., thesufficient backlogs to drive the distributed online optimization)increase with V , due to the typical [O(V ),O(1/V )]-tradeoffbetween the queue lengths and optimality loss of Lyapunovoptimization. In the case that V = 20, the virtual placeholdersexceed the maximum IoT buffer Dmax = 60Mbits, and byno means can the direct use of Lyapunov optimization, asdeveloped in Section III, establish enough queue backlogs tofunction. This is also validated in Fig. 5(b) that the directuse of Lyapunov optimization only operates when the IoTbacklogs exceed the corresponding virtual placeholders in thecase that V = 10, and no data can be processed when V = 20.

Fig. 6 evaluates the system throughput of the three ap-proaches, as Dmax (the IoT buffer size) increases, whereV = {50, 100}. We can see that the proposed approach withvirtual placeholders can always achieve the maximum systemthroughput of 86.4Mbps, as already validated in Fig. 4(a).As Dmax increases, the direct use of Lyapunov optimizationachieves increasingly high system throughput and stabilizes atthe maximum network capacity, in both the cases that V = 50and 100. With the increase of V , increasingly large IoT buffersizes are required to achieve the maximum system throughputin the direct use of Lyapunov optimization. In particular, whenV = 100, the algorithm requires the IoT buffer sizes to beat least 850Mbits which may not be practical in inexpensiveIoT devices.

Fig. 7 evaluates the steady-state system throughput andaverage delay, as the number of subchannels per edge serverL increases from 5 to 20, where Dmax = {30, 60}Mbits. Itshould be noted that, for evaluating the average delays of boththe proposed approach with virtual placeholders and the directuse of Lyapunov optimization without virtual placeholders,V is set to 5 according to Fig. 4. Fig. 7(a) shows that thethroughput of the proposed approach with virtual placeholderscan be 8 times higher than the 9Mbps throughput of the

5 10 15 20Number of Subchannels per Edge Server, L

0

10

20

30

40

50

60

70

80

90

Sys

tem

Thr

ough

put (

Mbp

s)

Proposed, Dmax

=30Mbits

Proposed, Dmax

=60Mbits

No Place-holder, Dmax

=30Mbits

No Place-holder, Dmax

=60Mbits

Benchmark

No virutal place-holder

Proposed

(a) System throughput

5 10 15 20Number of Subchannels per Server, L

0

10

20

30

40

50

60

70

80

90

100

Ave

rage

del

ay (slot

)

Proposed, Dmax

=30Mbits

Proposed, Dmax

=60Mbits

No Place-holder, Dmax

=30Mbits

No Place-holder, Dmax

=60MbitsProposed

No virutal place-holder

(b) Average delay

Fig. 7. The steady-state system throughput and average delay, as L increasesfrom 5 to 20, where Dmax = {30, 60}Mbits and V = 5. It should be notedthat the benchmark approach can lead to congestions around the data centerand hence unbounded growth of delays, e.g., over 1000slots, and therefore isnot plotted.

benchmark, and increases with the number of subchannels andstabilizes at the maximum throughput of 86.4Mbps, since anincreasing amount of data can be transmitted from the IoTdevices to the servers for remote processing. The placeholderdesign is also shown to help increase the throughput, especiallyin the case where the buffer storage Dmax = 30Mbits is smalland the initial queue differences play a key role of drivingdata to flow and be processed.

In Fig. 7(b), the use of virtual placeholders allows for asubstantial reduction in the average delay of fog computing by90%, as compared to the direct use of Lyapunov optimization.This is achieved by driving data along the shortest path,and the delay is relatively stable for different numbers ofsubchannels L. In contrast, the delay of the direct use ofLyapunov optimization grows when Dmax = 60Mbits, dueto the increase of system throughput in Fig. 7(a), whichapproaches the processing capacity and leads to unnecessaryrouting among busy servers and subsequently the growth ofthe queuing delay. The throughput of the benchmark approachis only 8Mbps independent of the value of L, limited by thecapacity of the data center. Under such throughput, the systemis not stable and experiences excessive delays over time.

Authorized licensed use limited to: CSIRO Information Technology Services. Downloaded on April 23,2020 at 06:34:36 UTC from IEEE Xplore. Restrictions apply.

Page 12: Distributed Online Optimization of Fog Computing for ... · Index Terms—Fog computing, Internet-of-things, Lyapunov optimization, finite device buffers. I. INTRODUCTION By equipping

2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.2979353, IEEE Internet ofThings Journal

12

This is the consequence of separate operations of wirelesstransmission and processing in the benchmark approach.

VI. CONCLUSION

This paper enables Lyapunov optimization to operate un-der finite buffers of IoT devices without loss of asymptoticoptimality, by optimizing virtual placeholders of individualqueues. Sufficient differences can be therefore establishedto drive the online optimization. The optimization of thevirtual placeholders is proved to be a three-layer shortest pathproblem, and achieved in a distributed manner by extendingthe Bellman-Ford algorithm. Corroborated by simulations, theproposed approach can significantly increase the throughputand achieve asymptotically minimized time-average cost, ascompared to the direct application of Lyapunov optimization.

APPENDIX A

Let ∆V (t) denote the drift-plus-penalty function to mini-mize the time-average system cost while preserving the systemstability at slot t, as given by [5]

∆V (t) = ∆(t) + V E [ϕ(x(t))] , (27)

where ∆(t) = L(t+1)−L(t) is the Lyapunov drift to measurethe stability of the network, and L(t) = 1

2{∑i∈N[Qi(t)

2 +Ri(t)

2]+∑m∈MDm(t)2} is the quadratic Lyapunov function

of the network [5].

Lemma 1. ∆V (t) is upper bounded by

∆V (t) ≤ U + V E [ϕ(x(t))] +∑m∈M

Dm(t)E[Am(t)− dm(t)]

+∑i∈N

Qi(t)E[∑m∈Mi

dm(t)− fi(t)/ρ+∑j∈N

(qji(t)− qij(t))]

+∑i∈N

Ri(t)E[ξfi(t)/ρ+∑j∈N

(rji(t)− rij(t))],

(28)where

U =1

2{[∑i∈N

(ξ + 1)Fmaxi /ρ+MTcmax +

∑i,j∈N

Cmaxij ]2

+ [∑m∈N

(Amaxm )2 + (cmaxT )2]}.

(29)

Proof: Take squares on both sides of (3), (6) and (7), andthen exploit (max[α− β, 0] + γ)2 ≤ α2+β2+γ2+2α(γ−β),∀α, β, γ ≥ 0. We have

Dm(t+ 1)2 −Dm(t)2 ≤ Am(t)2

+ dm(t)2

+ 2Dm(t)[Am(t)− dm(t)];(30a)

Qi(t+ 1)2 −Qi(t)2 ≤ [fi(t)/ρ+∑j∈N

qij(t)]2

+ [∑j∈N

qji(t) +∑m∈Mi

dm(t)]2

+ 2Qi(t)[∑j∈N

(qji(t)− qij(t)) +∑m∈Mi

dm(t)− fi(t)/ρ];

(30b)

Ri(t+ 1)2 −Ri(t)2 ≤ [∑j∈N

rji(t) + ξfi(t)/ρ]2

+ [∑j∈N

rij(t)]2 + 2Ri(t)[ξfi(t)/ρ+

∑j∈N

(rji(t)− rij(t))].

(30c)

Plugging (30) into (27), we can achieve (28) with U satisfying

2U ≥∑m∈N

E[Am(t)2

+ dm(t)2] +∑i∈N

E{[fi(t)/ρ+∑j∈N

qij(t)]2

+ [∑j∈N

qji(t) +∑m∈Mi

dm(t)]2 + [∑j∈N

rij(t)]2

+ [∑j∈N

rji(t) + ξfi(t)/ρ]2}.

(31)In particular, the second term of the right-hand-side (RHS) of(31) is upper bounded by∑

i∈N

E{[fi(t)/ρ+∑j∈N

qij(t)]2 + [

∑j∈N

qji(t) +∑m∈Mi

dm(t)]2

+ [∑j∈N

rij(t)]2 + [

∑j∈N

rji(t) + ξfi(t)/ρ]2}

(a)

≤E{∑i∈N

{[fi(t)/ρ+

∑j∈N

qij(t)] + [∑j∈N

qji(t) +∑m∈Mi

dm(t)]

+ [∑

j∈Nrij(t)] + [

∑j∈N

rji(t) + ξfi(t)/ρ]}2}

(b)

≤E{{[∑

i∈N

(1 + ξ)fi(t)/ρ]

+∑i,j∈N

[qij(t) + rij(t) + qji(t)

+ rji(t)]

+[ ∑m∈M

dm(t)]}2}

(c)

≤E{{[∑

i∈N

(1 + ξ)fi(t)/ρ]

+∑i,j∈N

Cij(t) +[ ∑m∈M

dm(t)]}2}

(d)

≤ [∑i∈N

(1 + ξ)Fmaxi /ρ+

∑i,j∈N

Cmaxij +MTcmax]2,

(32)where the inequalities (a) and (b) are achieved by applying(∑i αi)

2 ≥∑i α

2i , ∀αi ≥ 0 and reorganizing the terms.

The inequality (c) is due to the link capacity constraint(5), i.e., qij(t) + rij(t) + qji(t) + rji(t) ≤ Cij(t). Theinequality (d) can be obtained by replacing the expectationswith their maximums, i.e., fi(t) ≤ Fmax

i , Cij(t) ≤ Cmaxij ,

and dm(t) ≤ Tcmax. The RHS of the inequality (d) is the firstterm of U in Lemma 1. Likewise, we can obtain the secondterm of U by bounding the first term of RHS of (31).

From Lyapunov optimization, (10) can be rewritten as (11)by minimizing (28) at any slot t under the per-slot constraints(1), (2), (4) and (5). We can see that the first term of U ,i.e., [

∑i∈N(1 + ξ)Fmax

i /ρ +∑i,j∈N Cmax

ij + MTcmax]2, isindependent of the optimization variables, where Fmax

i , Cmaxij ,

and cmax are the maximums (i.e., constant) of the computingresources, capacity of inter-server links, and channel capac-ity of IoT devices. The terms related to the optimizationvariables (fi(t), Cij(t) and dm(t)) are upper bounded andreplaced by their respective maximums, i.e., fi(t) ≤ Fmax

i ,Cij(t) ≤ Cmax

ij , and dm(t) ≤ Tcmax. As a result, both U

Authorized licensed use limited to: CSIRO Information Technology Services. Downloaded on April 23,2020 at 06:34:36 UTC from IEEE Xplore. Restrictions apply.

Page 13: Distributed Online Optimization of Fog Computing for ... · Index Terms—Fog computing, Internet-of-things, Lyapunov optimization, finite device buffers. I. INTRODUCTION By equipping

2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.2979353, IEEE Internet ofThings Journal

13

and Am(t) are independent of the optimization variables andsuppressed. This concludes the proof.

APPENDIX B

Let π denote a feasible control policy. From (28), we have

∆V (t) ≤ U + V E[ϕ(x(t))|π]

+∑m∈M

Dm(t)E[Am(t)− dm(t)|π]

+∑i∈N

Qi(t)E[∑m∈Mi

dm(t)− fi(t)/ρ+∑j∈N

(qji(t)− qij(t))|π]

+∑i∈N

Ri(t)E[ξfi(t)/ρ+∑j∈N

(rji(t)− rij(t))|π].

(33)According to the Slater’s condition [5], for any σ > 0, thereexists one stationary control policy π∗ (which is independentof the queue backlogs), such that

E[ϕ(x(t))|π∗] ≤ ϕopt + σ;E[Am(t)− dm(t)|π∗] ≤ σ;E[∑m∈Mi

dm(t)− fi(t)/ρ+∑j∈N(qji(t)− qij(t))|π∗] ≤ σ;

E[ξfi(t)/ρ+∑j∈N(rji(t)− rij(t))|π∗] ≤ σ;

(34)Plugging (34) into (33) and then taking σ → 0, we have

∆V (t) ≤ U + V ϕopt. (35)

Taking expectations on both sides of (35), we have

E[L(t+ 1)− L(t)]− V E[ϕ(x(t))] ≤ U + V ϕopt. (36)

Summing up (36) over {0, 1, · · · , T − 1} leads to

E[L(T )]−E[L(0)] + V∑T−1

t=0E[ϕ(x(t))] ≤ UT + V Tϕopt.

(37)With E[L(T )] ≥ 0 and L(0) = 0, we can obtain

ϕ(x(t)) =1

TlimT→∞

∑T−1

t=0E[ϕ(x(t))] ≤ ϕopt +

U

V. (38)

This concludes the proof.

APPENDIX C

We starts by proving (23a) through mathematical induction.(23a) holds at slot t = 0, since Qi(0) = 0. Assume that(23a) holds at slot t. According to (19), if Qi(t) ≥ Dm(t)−V εm/cm, dm(t) = 0 and we have Qi(t + 1) ≤ Qi(t) +∑j∈Ni

Cmaxji . Otherwise, if Qi(t) < Dm(t) − V εm/cm, the

maximum uploaded data at this slot is LTcmax, and hence,Qi(t + 1) ≤ Dm(t) − V εm/cm + LTcmax +

∑j∈Ni

Cmaxji ,

i.e., this holds at slot (t + 1). By replacing Dm(t) with itsmaximum Dmax, the proof of (23a) is concluded.

Likewise, we can prove (23b) through mathematical in-duction. Assume that (23b) holds at slot t. According to(14), if Ri(t) ≥ [Qmaxi − V ρεi]/ξ, we have Ri(t + 1) ≤Ri(t)+

∑j∈Ni

Cmaxji . Otherwise, if Ri(t) < [Qmaxi −V ρεi]/ξ,

the processed result at slot t cannot exceed ξF̂i/ρ, resulting inRi(t+ 1) ≤ [Qmaxi − V ρεi]/ξ + ξF̂i/ρ+

∑j∈Ni

Cmaxji . The

proof of (23b) is concluded.

APPENDIX D

Note that Ri,0 = 0 satisfies Property 1, due to the fact thatRi(t) ≥ 0 based on (7). Then, we only need to show thatRi,0 = minj{Rj,0 + ∆ij} satisfies Property 1 to concludethe proof of (25a). This can be achieved by mathematicalinduction. Suppose that Ri(t) ≥ minj{Rj,0 + ∆ij} holds atslot t. According to (16b), if Ri(t) ≤ minj{Rj,0 + V εmin

ij },γij(t) ≤ 0 for its neighbors, i.e., Ri(t + 1) ≥ Ri(t), sinceno result can be dispatched from server i. Otherwise, ifRi(t) > minj{Rj,0 + V εmin

ij }, the size of results dispatchedfrom server i cannot exceed the maximum link capacity Cmax

ij ,and hence, Ri(t+1) ≥ minj{Rj,0 +∆ij}. This concludes theproof of (25a).

We proceed to show that Qi,0 = minj{ξRi,0 + ∆i, Qj,0 +∆ij} satisfies Property 1. Similar to the proof of (25a), byexploiting (16a), the second term Qi,0 ≤ minj{Qj,0 + ∆ij}can be proved through mathematical induction. For the firstterm, suppose that Qi(t) ≥ ξRi,0∆i holds at slot t. Accord-ing to (14), if Qi(t) ≤ ξRi,0 + V ρεmin

i , no data will beprocessed and Qi(t + 1) ≥ Qi,0(t). Otherwise, if Qi(t) >ξRi,0 + V ρεmin

i , the processed data cannot exceed F̂i/ρ, andQi(t+ 1) ≥ ξRi,0 + ∆i. This concludes the proof of (25b).

Likewise, (25c) can be proved by exploiting (21) throughmathematical induction. Assume that Dm(t) ≥ Qi(t) + ∆i

m

holds at slot t. According to (21), if Dm(t) ≤ Qi(t) +V εm/c

max, αim(t) ≤ 0 and device m will not be scheduled,i.e., Dm(t + 1) ≥ Dm(t). Otherwise, if Dm(t) > Qi(t) +εm/c

max, the uploaded data cannot exceed cmaxT , and hence,Dm(t+ 1) ≥ Qi(t) + ∆i

m. The proof of (25c) is concluded.

REFERENCES

[1] X. Lyu, H. Tian, L. Jiang, A. Vinel, S. Maharjan, S. Gjessing, andY. Zhang, “Selective offloading in mobile edge computing for the greeninternet of things,” IEEE Netw., vol. 32, no. 1, pp. 54–60, Jan 2018.

[2] Y. Mao, C. You, J. Zhang, K. Huang, and K. B. Letaief, “A surveyon mobile edge computing: The communication perspective,” IEEECommun. Surveys Tuts., vol. 19, no. 4, pp. 2322–2358, Fourthquarter2017.

[3] X. Lyu, H. Tian, W. Ni, R. P. Liu, and P. Zhang, “Adaptive centralizedclustering framework for software-defined ultra-dense wireless network-s,” IEEE Trans. Veh. Technol., vol. 66, no. 9, pp. 8553–8557, Sept 2017.

[4] X. Lyu, C. Ren, W. Ni, H. Tian, and R. P. Liu, “Cooperative computinganytime, anywhere: Ubiquitous fog services,” IEEE Wireless Commun.,vol. to appear, 2019.

[5] M. J. Neely, “Stochastic network optimization with application tocommunication and queueing systems,” Synthesis Lectures on Commu-nication Networks, vol. 3, no. 1, pp. 1–211, 2010.

[6] L. Pu, X. Chen, J. Xu, and X. Fu, “D2D fogging: An energy-efficient andincentive-aware task offloading framework via network-assisted D2Dcollaboration,” IEEE J. Sel. Areas Commun., vol. 34, no. 12, pp. 3887–3901, 2016.

[7] Y. Cui, J. Song, K. Ren, M. Li, Z. Li, Q. Ren, and Y. Zhang, “Softwaredefined cooperative offloading for mobile cloudlets,” IEEE/ACM Trans.Netw., vol. 25, no. 3, pp. 1746–1760, June 2017.

[8] X. Lyu, W. Ni, H. Tian, R. P. Liu, X. Wang, G. B. Giannakis, andA. Paulraj, “Distributed online optimization of fog computing for selfishdevices with out-of-date information,” IEEE Trans. Wireless Commun.,vol. 17, no. 11, pp. 7704–7717, Nov 2018.

[9] X. Lyu, C. Ren, W. Ni, H. Tian, and R. P. Liu, “Distributed optimizationof collaborative regions in large-scale inhomogeneous fog computing,”IEEE J. Sel. Areas Commun., vol. 36, no. 3, pp. 574–586, March 2018.

[10] C. Ren, X. Lyu, W. Ni, H. Tian, and R. P. Liu, “Distributed onlinelearning of fog computing under nonuniform device cardinality,” IEEEInternet Things J., vol. 6, no. 1, pp. 1147–1159, Feb 2019.

Authorized licensed use limited to: CSIRO Information Technology Services. Downloaded on April 23,2020 at 06:34:36 UTC from IEEE Xplore. Restrictions apply.

Page 14: Distributed Online Optimization of Fog Computing for ... · Index Terms—Fog computing, Internet-of-things, Lyapunov optimization, finite device buffers. I. INTRODUCTION By equipping

2327-4662 (c) 2020 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/JIOT.2020.2979353, IEEE Internet ofThings Journal

14

[11] M. Guo, Q. Guan, W. Chen, F. Ji, and Z. Peng, “Delay-optimal schedul-ing of vms in a queueing cloud computing system with heterogeneousworkloads,” IEEE Transactions on Services Computing, 2019.

[12] X. Lyu, W. Ni, H. Tian, R. P. Liu, X. Wang, G. B. Giannakis, andA. Paulraj, “Optimal schedule of mobile edge computing for internet ofthings using partial information,” IEEE J. Sel. Areas Commun., vol. 35,no. 11, pp. 2606–2615, Nov 2017.

[13] C. You, K. Huang, H. Chae, and B. H. Kim, “Energy-efficient resourceallocation for mobile-edge computation offloading,” IEEE Trans. Wire-less Commun., vol. 16, no. 3, pp. 1397–1411, March 2017.

[14] K. Zhang et al., “Energy-efficient offloading for mobile edge computingin 5G heterogeneous networks,” IEEE Access, vol. 4, pp. 5896–5907,2016.

[15] W. Labidi, M. Sarkiss, and M. Kamoun, “Joint multi-user resourcescheduling and computation offloading in small cell networks,” in 2015IEEE WiMob, Oct 2015, pp. 794–801.

[16] S. Sardellitti, G. Scutari, and S. Barbarossa, “Joint optimization of radioand computational resources for multicell mobile-edge computing,”IEEE Trans. Signal Info. Process. Netw., vol. 1, no. 2, pp. 89–103, June2015.

[17] K. Wang, K. Yang, and C. Magurawalage, “Joint energy minimizationand resource allocation in c-ran with mobile cloud,” IEEE Trans. CloudComput., pp. 1–1, 2017.

[18] O. Muz, A. Pascual-Iserte, and J. Vidal, “Optimization of radio andcomputational resources for energy efficiency in latency-constrainedapplication offloading,” IEEE Trans. Veh. Technol., vol. 64, no. 10, pp.4738–4755, Oct 2015.

[19] X. Lyu, H. Tian, W. Ni, Y. Zhang, P. Zhang, and R. P. Liu, “Energy-efficient admission of delay-sensitive tasks for mobile edge computing,”IEEE Trans. Commun., vol. 66, no. 6, pp. 2603–2616, June 2018.

[20] X. Chen, “Decentralized computation offloading game for mobile cloudcomputing,” IEEE Trans. Parallel Distrib. Syst., vol. 26, no. 4, pp. 974–983, April 2015.

[21] X. Chen, L. Jiao, W. Li, and X. Fu, “Efficient multi-user computationoffloading for mobile-edge cloud computing,” IEEE/ACM Trans. Netw.,vol. 26, no. 4, pp. 974–983, April 2015.

[22] X. Lyu, H. Tian, C. Sengul, and P. Zhang, “Multiuser joint taskoffloading and resource optimization in proximate clouds,” IEEE Trans.Veh. Technol., vol. 66, no. 4, pp. 3435–3447, 2017.

[23] J. Yao and N. Ansari, “Task allocation in fog-aided mobile iot bylyapunov online reinforcement learning,” IEEE Transactions on GreenCommunications and Networking, 2019.

[24] M. Mukherjee, M. Guo, J. Lloret, R. Iqbal, and Q. Zhang, “Deadline-aware fair scheduling for offloaded tasks in fog computing with inter-fogdependency,” IEEE Communications Letters, 2019.

[25] L. Huang and M. J. Neely, “Delay reduction via Lagrange multipliers instochastic network optimization,” IEEE Trans. Autom. Control, vol. 56,no. 4, pp. 842–857, 2011.

[26] M. R. Palattella, M. Dohler, A. Grieco, G. Rizzo, J. Torsner, T. Engel,and L. Ladid, “Internet of things in the 5G era: Enablers, architecture,and business models,” IEEE J. Sel. Areas Commun., vol. 34, no. 3, pp.510–527, March 2016.

[27] G. Dantzig, Linear programming and extensions. Princeton UniversityPress, 2016.

[28] D. Pisinger, “Algorithms for knapsack problems,” 1995.[29] T. H. Cormen, Introduction to algorithms. MIT Press, 2009.[30] J. Liu, A. Eryilmaz, N. B. Shroff, and E. S. Bentley, “Heavy-ball:

A new approach to tame delay and convergence in wireless networkoptimization,” in IEEE INFOCOM, April 2016, pp. 1–9.

[31] T. Chen, Q. Ling, and G. B. Giannakis, “Learn-and-adapt stochastic dualgradients for network resource allocation,” IEEE Trans. Control Netw.Sys., pp. 1–1, 2017.

[32] D. P. Bertsekas, D. P. Bertsekas, D. P. Bertsekas, and D. P. Bertsekas,Dynamic programming and optimal control. Athena scientific Belmont,MA, 1995, vol. 1, no. 2.

[33] D. B. West et al., Introduction to graph theory. Prentice hall UpperSaddle River, 2001, vol. 2.

[34] A. O. Allen, Probability, statistics, and queueing theory. Academicpress, 2014.

Chenshan Ren received her B.E. degree from Zhengzhou University in 2013,and Ph.D. degree from Beijing University of Posts and Telecommunicationsin 2019. She is currently a lecturer with Minzu University of China (MUC).Her research interests include fog computing, software-defined networking,edge caching and radio resource management.

Xinchen Lyu received the B.E. degree from Beijing University of Postsand Telecommunications (BUPT) in 2014, and the dual Ph.D. degrees fromBUPT and University of Technology Sydney in 2019. He is currently anassociate researcher with BUPT. His research interests include stochasticnetwork optimization with applications to fog computing, machine learning,software-defined networking, edge caching and radio resource management.

Wei Ni received the B.E. and Ph.D. degrees in Electronic Engineering fromFudan University, Shanghai, China, in 2000 and 2005, respectively. Currentlyhe is a Team Leader at CSIRO, Sydney, Australia. He is also an adjunctprofessor at the University of Technology Sydney (UTS), and holds honorarypositions at the University of New South Wales (UNSW) and MacquarieUniversity (MQ). Prior to this he was a postdoctoral research fellow atShanghai Jiaotong University (2005 – 2008), Research Scientist and DeputyProject Manager at the Bell Labs R&I Center, Alcatel/Alcatel-Lucent (2005– 2008), and Senior Researcher at Devices R&D, Nokia (2008-2009). Hisresearch interests include optimization, game theory, graph theory, as wellas their applications to network and security. He serves as Vice Chair ofIEEE NSW VTS Chapter and Editor for IEEE Trans. Wireless Commun.since 2018, served as Editor for Hindawi Journal of Engineering from 2012– 2015, Secretary of IEEE NSW VTS Chapter from 2015 – 2018, TrackChair for VTC-Spring 2017, Track Co-chair for IEEE VTC-Spring 2016, andPublication Chair for BodyNet 2015. He also served as Student Travel GrantChair for WPMC 2014, a Program Committee Member of CHINACOM 2014,a TPC member of IEEE ICC14, ICCC15, EICE14, and WCNC10.

Hui Tian received her M.S. in Micro-electronics and Ph. D degree in circuitsand systems both from Beijing University of Posts and Telecommunications,China, in 1992 and 2003, respectively. Currently, she is a professor at BUPT,the Network Information Processing Research Center director of State KeyLaboratory of Networking and Switching Technology and the MAT directorof Wireless Technology Innovation Institute (WTI). Her current researchinterests mainly include radio resource management, cross layer optimization,M2M, cooperative communication, mobile social network, and mobile edgecomputing.

Wei Song received the Ph.D. degree in traffic information engineering andcontrol from Beijing Jiaotong University, in 2010. He was an AssistantProfessor with the Research Institutes of Information Technology, TsinghuaUniversity, from 2011 to 2012. He was also a Visiting Scholar with theNew Jersey Institute and Technology from 2017 to 2018. He is currentlyan Associate Professor with the School of Information Engineering, and aresearcher of national language resource monitoring and research center ofminority languages, Minzu University of China. He is also the Director ofthe Media Computing Laboratory. His research interests include multimedianetworks, image processing, content delivery network and natural languageprocessing.

Ren Ping Liu is a Professor at the School of Electrical and Data Engineeringin University of Technology Sydney, where he leads the Network SecurityLab in the Global Big Data Technologies Centre. He is also the ResearchProgram Leader of the Digital Agrifood Technologies in Food Agility CRC, agovernment/research/industry initiative to empower Australia’s food industrythrough digital transformation. Prior to that he was a Principal Scientist atCSIRO, where he led wireless networking research activities. He specialisesin protocol design and modelling, and has delivered networking solutions toa number of government agencies and industry customers. Professor Liu wasthe winner of Australian Engineering Innovation Award and CSIRO Chairmanmedal. His research interests include Markov analysis and QoS scheduling inWLAN, VANET, IoT, LTE, 5G, SDN, and network security. Professor Liuhas over 100 research publications, and has supervised over 30 PhD students.

Professor Liu is the founding chair of IEEE NSW VTS Chapter and aSenior Member of IEEE. He served as Technical Program Committee chairand Organising Committee chair in a number of IEEE Conferences. Ren PingLiu received his B.E.(Hon) and M.E. degrees from Beijing University of Postsand Telecommunications, China, and the Ph.D. degree from the University ofNewcastle, Australia.

Authorized licensed use limited to: CSIRO Information Technology Services. Downloaded on April 23,2020 at 06:34:36 UTC from IEEE Xplore. Restrictions apply.