1. Introduction
With the rapid emergence and sharp growth of Internet of Things (IoT), enormous computation and communication requirements are induced, exceeding the capacity of current data centers and mobile networks [
1,
2,
3,
4]. Mobile edge computing, e.g., cloudlet-based mobile edge computing [
5] and fog computing [
6,
7], introduces promising solutions to overcoming this challenge in a distributed manner. In mobile edge computing, ubiquitous communication and computation resource provisioning is enabled by shifting computation resources to the edge of the Internet, i.e., wireless access networks [
8,
9,
10,
11]. Due to the advantages of low latency and high bandwidth, many efforts have been devoted to exploring the potentials of mobile edge computing in practical applications, such as IoT [
12] caching [
13,
14,
15], security services [
16] and vehicular networks [
17]. However, the resources of mobile edge computing are limited, especially in the scenario with dense population. To deal with this problem, cloud-edge interoperation frameworks have been proposed to provision scalable services [
18,
19].
In this paper, the cloud-assisted multi-cloudlet framework is introduced, as shown in
Figure 1. A cloudlet is a multi-core computer or a cluster of well-connected computers [
5]. Each sensor is able to offload its computation task to a cloudlet via a wireless AP, or to the remote cloud through the base station and Internet core. Due to the constrained computation resources of cloudlets and limited communication resources of wireless APs, the computation offloading decision of one sensor can have a significant influence on the processing delay and energy consumption of other sensors with identical computation offloading decisions. As processing delay and energy consumption of computation tasks are critical quality of service (QoS) metrics of IoT sensors, coordinating the computation offloading decisions of different IoT sensors is of vital importance.
This paper investigates the computation offloading decision problem of IoT sensors in the cloud-assisted multi-cloudlet framework. Many existing works have focused on computation offloading problems, including computation offloading problems of mobile devices [
20,
21,
22,
23], mobile data traffic offloading problems [
24,
25] and service migration problems [
26]. Solving the computation offloading problem of IoT sensors in the cloud-assisted multi-cloudlet framework is challenging. First, IoT sensors are owned by different users with diversified interests. As IoT sensors with identical computation offloading decisions interact with each other, how to coordinate the computation offloading decisions of different sensors is challenging. This work solves the computation offloading decision problem of IoT sensors based on game theory, which is widely adopted to analyze systems with multiple selfish individuals [
27]. Another challenge is that the cloud-assisted multi-cloud framework has heterogeneous computation and communication resources. Cloud resources can be provided on demand while computation resources of cloudlets are constrained. Each time one sensor changes its computation offloading decision, the computation and communication resources obtained by this sensor are changed simultaneously. Furthermore, due to the heterogeneous mobile networks (i.e., wireless access network and cellular network) in this framework, IoT sensors can have distinct energy consumption models when making different computation offloading decisions.
In this work, the computation offloading decision problem of IoT sensors is analyzed based on game theory. In more detail, the computation offloading decision problem of IoT sensors is formulated as a computation offloading game. To analyze the property of this game, the tool of potential game is introduced. Based on the definition of potential game, the condition of Nash equilibrium is derived, and the Computation Offloading Decision (COD) algorithm is further designed by leveraging the finite improvement property of potential game. In the COD algorithm, the improvement range is optimized in each improvement iteration, such that the computation complexity of the algorithm is significantly reduced. We implement extensive simulations to evaluate the COD algorithm. Simulation results demonstrate that the COD algorithm can effectively reduce the system cost (defined as the average weighted sum of processing delay and energy consumption of all sensors), compared with the random-selection algorithm and the cloud-first algorithm. Furthermore, the COD algorithm can scale well with increasing IoT sensors.
This paper is organized as follows.
Section 2 presents the system model and
Section 3 provides problem formulation and analysis. Algorithm design is presented in
Section 4 and simulation results are illustrated and analyzed in
Section 5. Finally, this work is concluded in
Section 6.
3. Problem Formulation and Analysis
In the cloud-assisted multi-cloudlet framework, IoT sensors contend for the computation and communication resources of the cloudlets and wireless APs to meet the QoS requirements of IoT applications. Since IoT sensors are owned by different individuals that pursue diversified interests, decentralized computation offloading decisions should be made to mimic the selfish property of the sensor users. As systems consisting of multiple selfish individuals are usually analyzed based on game theory [
27], this work formulates the computation offloading problem of multiple IoT sensors as a computation offloading game. The details are presented as follows.
3.1. Computation Offloading Game
In the cloud-assisted multi-cloudlet framework, the computation offloading problem of IoT sensors is formulated as a computation offloading game. The players are the IoT sensors that have computation tasks to offload. The strategy of each player
n (
) is the computation offloading decision
(
). Denote by
the computation offloading decisions of all IoT sensors except
n, i.e.,
For each IoT sensor, the processing delay and energy consumption of the computation task are important QoS metrics, thus the cost function of IoT sensor
n is defined as
Here, represents the weight parameter of energy consumption over processing delay, which is assigned by sensor n based on its interest.
According to the results in
Section 2, when sensor
n offloads the computation task to a cloudlet via a wireless AP (i.e.,
), the cost function of sensor
n can be represented as
When sensor
n offloads the computation task to the cloud (i.e.,
), the cost function is
3.2. Analysis
Based on game theory, a Nash equilibrium of a game is defined as in Definition 1 [
27].
Definition 1. A strategy profileis a Nash equilibrium, if for anyand any, it is satisfied that According to Definition 1, when the computation offloading game of IoT sensors reaches Nash equilibrium, the strategy of each player is the best computation offloading decision that minimizes its cost function, given the strategies of all the other players. Thus, no player has the motivation to violate the current computation offloading decision.
For the computation offloading game of IoT sensors, each IoT sensor chooses the computation offloading strategy to minimize its cost function selfishly. Since the sensors offloading to the identical cloudlet via the wireless AP contend for the computation and communication resources, when one sensor
n changes its strategy from
to
, the cost of sensor
m that has the strategy of
(i.e.,
) is influenced. Denote by
the current computation offloading decision of sensor
m and define
as
Then,
represents the smallest difference between all the other strategies and the current strategy of sensor
m. Denote by
the sensor that has the smallest
, i.e.,
When sensor n changes its strategy from to , the costs of sensors that offload computation tasks to increase due to the reduced computation and communication resources allocated to these sensors. It is intuitive that sensor is most likely to change its current computation offloading strategy, and the strategy is only changed when new sensors with larger choose to offload the computation tasks to (i.e., ). When sensor chooses a new computation offloading strategy , it may further motivate sensors with the computation offloading strategy of and smaller to change the computation offloading strategies.
According to the above analysis, when one sensor changes its computation offloading strategy, a chain reaction of strategy changes can be incurred. In the following work, we further explore the properties of the computation offloading game and analyze the existence of Nash equilibrium.
4. Algorithm Design
This section first derives the condition of Nash equilibrium by introducing the concept of a potential game [
30]. Then, the Computation Offloading Decision (COD) algorithm is designed by exploiting the property of the computation offloading game.
4.1. Condition of Nash Equilibrium
According to [
30], a potential game is defined as follows:
Definition 2. The computation offloading game of IoT sensors is a potential game if there exists a functionsuch that if for any n,and, ifthere is The functionis called potential function.
It is indicated from Definition 2 that in a potential game, when any IoT sensor
changes its computation offloading decision from
to
so as to reduce its cost function, the value of the potential function also decreases. When the potential game reaches a Nash equilibrium, the potential function can not be further reduced. It has been proved that any finite potential game has a Nash equilibrium [
30]. Therefore, if we want to derive the condition of Nash equilibrium in the computation offloading game of IoT sensors, we simply need to investigate the condition of a potential game.
Theorem 1. The computation offloading game of IoT sensors is a potential game if for every sensor, there is Proof. Substitute Equation (
20) into Equation (
13), and it is derived that when sensor
n offloads the computation task to a cloudlet (i.e.,
), the cost function is
Define
as
where
is represented in Equation (
14). Then, it can be proved that there exists a potential function
in two cases:
Case 1: if
,
, then
and
In this case, if , it is satisfied that .
Case 2: if
,
, then
and
In this case, if , is satisfied too.
Therefore, if the condition in Equation (
20) is satisfied in the computation offloading game of IoT sensors, the game is a potential game with the potential function presented in Equation (
23). ☐
4.2. Computation Offloading Decision Algorithm
It has been proved that the computation offloading game of IoT sensors is a potential game when the condition in Equation (
20) is satisfied. In a potential game, the Nash equilibrium can always be achieved after finite improvement iterations, which is called finite improvement property [
30]. This part provides the design of the Computation Offloading Decision (COD) algorithm by exploiting the finite improvement property of the computation offloading game. The details are shown in Algorithm 1.
Denote by the better strategy set of sensor n in the tth iteration: if , then . represents the improvement decision of sensor n in the tth iteration and is the improvement range of cost function defined as .
Algorithm 1 Computation Offloading Decision (COD) algorithm |
Input: |
Computation tasks of sensors (). |
Output: |
Computation offloading strategy of sensors (). |
Initialization |
Each sensor initially offloads its computation task to the cloud, (). |
- 1:
Compute the cost of each sensor n when offloading the computation task to the cloud, , based on Equation ( 14). - 2:
for each improvement iteration t do - 3:
for each sensor do - 4:
obtain the computation and communication resources allocated to sensor n when offloading the computation task to each cloudlet according to . - 5:
compute the better strategy set based on Equations ( 13) and ( 14). - 6:
choose the improvement decision from to minimize the cost function. - 7:
end for - 8:
if the better strategy set of all sensors then - 9:
each sensor n with competes for the improvement opportunity, and the sensor with larger is endowed with higher priority of winning the contention. - 10:
if sensor n wins the contention then - 11:
. - 12:
end if - 13:
else - 14:
break; - 15:
end if - 16:
end for
|
It is indicated in Definition 2 that the potential function decreases when each player changes its strategy to reduce its cost function. In addition, the computation offloading game of IoT sensors has a finite improvement property. As in each improvement iteration sensors with larger are endowed with a higher priority of winning the improvement opportunity (as presented in step 9), the improvement range of the potential function is optimized in each iteration. Therefore, the number of improvement iterations is reduced and the COD algorithm can have good scalability.
5. Simulations and Results
In this section, extensive simulations are conducted to evaluate the COD algorithm. Consider the simulation scenario in which there are
N IoT sensors, each of which has a computation task
to offload. The simulations take the face recognition application in [
31] as the example of the IoT computation tasks. As IoT sensors have heterogeneous computation requests, the data load
and computation requirements
follow normal distribution in these simulations, with the parameters of (420, 42) KB and (2, 0.2) Giga CPU cycles, respectively. There are 10 cloudlets, each of which has the computation capacity of 24 GHz. IoT sensors can offload computation tasks to each cloudlet via a wireless AP. The transmission rates of these wireless APs follow normal distribution, with the expectation of 5 Mbps and the standard deviation of 1 Mbps. When offloading the computation task to the cloud, a T2.nano instance is provided to serve each sensor, the computation rate of which is 2.4 GHz [
32]. The upload rate of each sensor to the base station is 2 Mbps. The round trip delay from the base station to the cloud is 50 ms [
33,
34]. The energy consumption parameters are based on the measurement results in [
29], as shown in
Table 1.
The performance of the COD algorithm is compared with the random-selection algorithm and the cloud-first algorithm. In the random-selection algorithm, each IoT sensor randomly selects a computation offloading decision among the cloudlets and the cloud. In the cloud-first algorithm, all IoT sensors offload the computation tasks to the cloud.
5.1. Performance of the COD Algorithm
Defining the system cost as the average cost of all IoT sensors,
then the system costs of the three algorithms are illustrated as
Figure 2a.
As shown in
Figure 2a, the COD algorithm can significantly reduce the system cost compared with the random-selection algorithm and the cloud first algorithm. In the cloud-assisted system, the base station provides abundant communication resources and the cloud has scalable computation resources. Thus, the system cost of the cloud-first algorithm remains almost unchanged with increasing sensor number.
When the sensor number is small, the cloudlets can provide sufficient computation resources and the wireless APs have abundant communication resources, offloading computation tasks to cloudlets yields lower costs than offloading to the cloud. In the COD algorithm and the random-selection algorithm, part of IoT sensors offload computation tasks to cloudlets, thus the system costs are lower than the cloud-first algorithm. As sensor number increases, the computation resources of cloudlets and the communication resources of wireless APs become scarce. The system costs of the COD algorithm and the random-selection algorithm increase rapidly with increasing sensor number. In the COD algorithm, the IoT sensor with the largest improvement range is endowed with the highest priority to update the computation offloading strategy in each iteration. Thus, the system cost of the COD algorithm increases slower than the random-selection algorithm, and finally approaches the result of the cloud-first algorithm.
To evaluate the scalability of the COD algorithm, simulations are further implemented to record the number of improvement iterations with different sensor numbers. The results are shown in
Figure 2b. It is indicated that the number of iterations increases approximately linearly with the number of sensors. As revealed in Algorithm 1, the computation complexity of each improvement iteration is O(
NK). Therefore, the computation complexity of the COD algorithm approaches O(
N2K), and the COD algorithm scales well with increasing sensor number.
5.2. Influence of Different Parameters
This part evaluates the influence of different parameters on the results of the COD algorithm. Simulations are conducted to record the number of sensors offloading to the cloud (the overall number of sensors
n = 100). The results are illustrated as
Figure 3a,b.
Figure 3a presents the influence of the size of trasmitted data block during computation offloading. In the random-selection algorithm, the number of sensors offloading to the cloud almost remains unchanged, since computation offloading strategies of sensors are selected randomly. As the communication resources of wireless APs are limited, the costs of sensors increase with growing data block when offloading the computation tasks to cloudlets. Therefore, increasing sensors offload the computation tasks to the cloud in the COD algorithm.
Figure 3b illustrates the influence of weight parameter of energy consumption over processing delay (
). In this simulation, the transmitted data block is 420 KB, and the sensor number
n = 100. According to [
29], the energy consumption when transmitting the data block via the base station is higher than transmitting via wireless APs. As
increases, energy consumption occupies more in the cost of sensors. Thus, in the COD algorithm, the number of sensors offloading to the cloud (via the base station) decreases with increasing
.