jto1Clustering-Based Energy Efficient Task Offloading For Sustainable Fog Computing
jto1Clustering-Based Energy Efficient Task Offloading For Sustainable Fog Computing
1, JANUARY-MARCH 2023
Abstract—Delay and energy efficient task offloading from device to fog nodes involves decision making challenges wherein an
integrated optimal scheme for preserving sustainability of the terminal nodes (TNs) and fog nodes (FNs) is extremely important. In this
paper, we propose a novel clustering based delay aware energy efficient task offloading scheme in a Software-Defined Networking
(SDN) based fog architecture. A bi-objective problem is formulated for optimum clustering of TNs with respect to FNs, selection of
offloading parameters and, joint delay and energy minimization. It is then tranformed to a scalarized single objective problem which has
a nested structure with the two problems: 1) optimal clustering and 2) optimal offloading for a given set of clusters. Based on this,
Optimal Clustering and Offloading Parameters (OCOP) algorithm is designed which has lesser time complexity than the usual
quadratic case. Through extensive simulations, we have shown that the use of explicit clustering in the proposed algorithm improves FN
participation and reduces activity time and energy levels thereby increasing sustainability of the FNs and TNs as compared with the
random case and a similar task offloading algorithm. Moreover, even cluster size distribution lowers our algorithm’s running time than
the quadratic case.
Index Terms—Fog computing, software defined network, task offloading, clustering, latency and energy minimization
2377-3782 © 2022 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See ht_tps://www.ieee.org/publications/rights/index.html for more information.
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY WARANGAL. Downloaded on January 02,2024 at 06:52:34 UTC from IEEE Xplore. Restrictions apply.
4) Simulation results: We perform extensive simulations
and compare the results with the most closely
related algorithm and the random clustering case.
The proposed algorithm outperforms them in terms
of participation of the number of FNs, activity time
of the fog layer, and the distribution of energy con-
sumption among the FNs and TNs.
The organization of the paper is as follows. Section 2
briefly reviews the existing works, Section 3 presents the
system model and problem formulation. The proposed
algorithm is presented in Section 4. The simulation results
along with their analyses are described in Section 5 followed
by the conclusion in Section 6.
2 RELATED WORKS
A limited number of works have been carried out on SDN
platform. For example, Akbar et al. [13] applied machine
learning based multiobjective optimization in an SDN-
enabled multihop scenario for obtaining Pareto optimal
paths for task offloading. [14] and [15] proposed offloading
in SDN-enabled vehicular fog computing. Zhang et al. [12]
proposed a Fair and Energy-Minimized Task Offloading
(FEMTO) algorithm for heterogeneous fog enabled IoT net-
work. They achieved a trade-off between low energy con-
sumption and delay with fair selection among multiple FNs
for task offloading from a TN. Other related recent works
on SDN are [6] and [20]. Misra and Saha [20] presented a
greedy based heuristic for multi-hop dynamic task offload-
ing problem in the SDN fog architecture with access points.
Chen and Hao [6] proposed an architecture of software-
defined ultra dense network and then reported a task off-
loading scheme that minimizes the delay while saving the
battery life of user’s equipment.
Contemporary papers employing clustering strategy are
[7], [8], [9], [10], [11]. Luo et al. [7] proposed a coalition game
Fig. 1. Results before and after clustering. Dotted lines in (a) denote the
formulation which selects an optimal execution mode at
one hop reachability and solid lines in (b) indicate the offloading each end device resulting in the micro clusters for coopera-
connection. tive task execution via horizontal offloading among end
devices in such clusters. Wang et al. [8] developed a cluster-
ing strategy to classify mobile vehicles into multiple cooper-
novel parameters, clustering guess probability ative vehicular edge servers according to various deciding
parameter and offloading parameter. These two criteria. Dautov and Distefano [9] extended the Apache
parameters help to find the best clustering strategy, NiFi stream processing middleware with the help of run-
optimal offloading task size and transmission power time clustering of edge devices. Bozorgchenani et al. [11]
for jointly optimizing energy consumption and presented Energy-Aware Offloading Clustering Approach
delay. (EAOCA) entirely in the fog layer with heterogeneous FNs.
2) Derivation of a single objective function: By scalarizing, And lastly, Asensio et al. [10] solved the problem of fog-
we derive a single objective function of the above cloud clustering to find the optimal control architecture in
joint optimization problem. We find a nested struc- the fog-cloud scenario. However, all such works are differ-
ture in the objective function. The outer problem ent from our proposed scheme. They apply clustering
aims to find the best clustering and the inner, opti- approach for horizontal offloading among either the end
mal task size and the transmission power. devices or the FNs rather than vertical offloading from TNs
3) Proposal of a task offloading algorithm: Next, we present to FNs. The work which is closest to our approach is
the proposed algorithm called optimal clustering FEMTO [12]. Although this algorithm does not follow any
and offloading parameters (OCOP) algorithm. Clus- clustering approach, the result of fairly selecting the right
tering is made adaptive to the changes in the task FN for a TN with the best offloading parameters is in fact
sizes. The algorithm exhibits an improvement over one way of clustering TNs with respect to FNs just as we
the usual quadratic time complexity for clustering. have. A summary of the comparisons with the above related
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY WARANGAL. Downloaded on January 02,2024 at 06:52:34 UTC from IEEE Xplore. Restrictions apply.
58 IEEE TRANSACTIONS ON SUSTAINABLE COMPUTING, VOL. 8, NO. 1, JANUARY-MARCH 2023
TABLE 1
Comparison Table of Literature on Clustering
References End device layer Delay Energy Consumption Explicit Clustering strategy Offloading paramters
Luo et al. [7] ✓ ✓ ✓ No None
Wang et al. [8] ✗ ✓ ✗ No None
Dautov and Distefano [9] ✗ ✓ ✗ No None
Asensio et al. [10] ✗ ✓ ✗ No Transmission power
Bozorgchenani et al. [11] ✗ ✗ ✓ No None
Zhang et al. [12] ✓ ✓ ✓ No Both1
Our proposed scheme ✓ ✓ ✓ Yes Both
TABLE 3
Definitions
Notation Description
Cðek Þ The choosing set of FNs for TN ek , Eq. (1)
Cluster mapping of TNs to FNs, Eq. (3)
} Continuous cluster mapping of TNs to FNs, Eq. (4)
c Vector of offloading parameters, Eq. (10)
D Function for } 7! , Eq. (9)
Gðr=RÞ PDF of scaled FN distances r=R around a TN,
Eq. (5)
Dðek Þ Ascending ordered set of distances to reachable
FNs for TN ek
DTproc =DFproc Processing delay, Eq. (13)/(14)
Dtrans Transmission delay, Eq. (15)
Dwait Queue wait time at a FN, Eq. (17) Fig. 2. Illustration of the definition of choosing sets.
T F
Eproc =Eproc Processing energy consumption, Eq. (22)/(25)
T
Etrans Transmission energy consumption, Eq. (23) ¼ ½f3 f2 f1 f2 f1 f2 f3 T ;
v Power supply indicator of a FN, Eq. (26)
e
E Historic energy consumption pattern of a FN, the clusters are ff1 ; e3 ; e5 g; ff2 ; e2 ; e4 ; e6 g; ff3 ; e1 ; e7 g
Eq. (27)
Since the number of TNs are generally quite larger than the
number of FNs i.e., N M, the vector will always have
multiple TNs mapped to the same FN forming a cluster con-
algorithm sections. We also provide a summary of com- taining those TNs and that FN. The search space of of size
monly used notations in Table 2 and definitions in Table 3. N M is huge, so we create a continuous cluster mapping }
Definition 1: The choosing set Cðek Þ for each TN ek is defined as and map it to . We call } the clustering guess probability
the ordered set of all the FNs within its one hop reachability parameter and introduce a function DðÞ which transforms
where the order is the distance. } to . As the name suggests, } is a collection of guess
probabilities from all the TNs and is expressed as a vector
Mathematically the same can be expressed as
} ¼ ½}1 }2 . . . }N T s.t. 0 < }i < 1; 8ei (4)
Cðek Þ ¼ ffk1 ; fk2 ; . . . ; fkL g; 8ki 2 f1; 2; . . . ; Mg
To understand what the guess probabilities are, consider
s.t., distðek ; fk1 Þ < distðek ; fk2 Þ < < distðek ; fkL Þ (1)
that for each TN a normal distribution is chosen over the
where, distðÞ is the distance function. ratio of a random variable r and the one hop radius R i.e.,2
r=R N ð0; s 2 Þ, where r denotes the distances at which
Illustration 1: As an example, consider Fig. 2 which illustrates a FNs could possibly be present with respect to a TN. The
particular arrangement of three FNs ff1 ; f2 ; f3 g and seven guess probability for a TN then implies that it guesses the pres-
TNs fe1 ; e2 ; e3 ; e4 ; e5 ; e6 ; e7 g. An encircled shaded region indi- ence of an FN at a distance corresponding to that probability.
cates that the TNs and FNs in this region are within one hop Mathematically, let the kth component of the vector } be }k ,
reachability. The choosing sets for each TN are then then the TN ek guesses the presence of an FN at the distance b
such that the following equality holds for b and }k ,
Cðe4 Þ ¼ ff3 ; f2 ; f1 g
Cðe5 Þ ¼ ff1 g; Cðe6 Þ ¼ ff2 g; Cðe7 Þ ¼ ff3 g b 1
ðb=RÞ2
}k ¼ G ¼ pffiffiffiffiffiffi e 2s2 (5)
Cðe1 Þ ¼ ff3 ; f1 g; Cðe2 Þ ¼ ff2 ; f3 g; Cðe3 Þ ¼ ff2 ; f1 g (2) R s 2p
where GðÞ denotes the Gaussian probability distribution
function (PDF) of N ð0; s 2 Þ, the presence of FNs around TN
ek . In other words, the TN guesses distance,
3.2.1 Clustering Guess Probability Parameter
vffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
!
Now we describe the method of cluster formation used in u
u 1
the proposed scheme. Using the choosing sets for each TN, 1 t
b ¼ RG ð}k Þ ¼ Rs 2 ln pffiffiffiffiffiffi (6)
we construct an arbitrary vector of dimension N which }k s 2p
maps each TN to an FN as follows:
According to the definition of the random variable r=R, the
mapped to ei presence of each FN can be anywhere in the open range ð0; RÞ.
z}|{ But for the implementation of the proposed algorithm, we
¼ ½fk1 fk2 . . . fki . . . fkN T
|{z} must find a closed range inside this open range. To do this, we
from Cðei Þ can assume without any loss of generality that each of the near-
where, fk1 2 Cðe1 Þ; fk2 2 Cðe2 Þ; . . . ; fkN 2 CðeN Þ (3) est FNs can neither be present farther than distance g nor can
the farthest FNs be farther than R g for all TNs. Then we can
This vector provides the clusters of the TNs surrounding
the FNs. For example, as per Fig. 2, for some clustering vec- 2. Z N ð0; s 2 Þ means that the random variable Z follows a normal
tor say, distribution with mean 0 and variance s 2 .
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY WARANGAL. Downloaded on January 02,2024 at 06:52:34 UTC from IEEE Xplore. Restrictions apply.
60 IEEE TRANSACTIONS ON SUSTAINABLE COMPUTING, VOL. 8, NO. 1, JANUARY-MARCH 2023
x 2 Dðei Þ, %1
i ½x ¼ Fi Cðei Þ, s.t.,
x ¼ distðei ; fm Þ; 8fm 2 Fi .
The DðÞ function discretizes } to based on the afore-
said definitions as follows:
h i
j ¼ Dð} Þj ¼ %1 1
j ½RghDðej Þ; RG ð}j Þi (9)
1
at transmission power pji . The FN fj receives tasks from all
the TNs like eji through an MIMO antenna system and cre- Dji ¼ max DTproc ½eji ;Dtrans ½eji ; fj
ates a queue of the same. In the queue, tasks with lesser
amount of permitted delay are kept more towards the front þ ðDwait ½eji þ DFproc ½eji ; fj Þ ; (18)
of the queue so that they can be processed and completed
before their shorter deadlines. Hence, if dji is the maximum or,
allowed delay for the task from eji then the offloaded tasks
in the queue of the FN are ordered from front to back such
that, Dji ¼ max DTproc ½eji ; Dtrans ½eji ;fj þ
X
i
dj1 dj2 dj3 . . . djNj (12) DFproc ½ejs ; fj : (19)
s¼1
and, T
Eproc ½eji ¼ ð1 aji Þtji s½eji ½eji (22)
T
Etrans ½eji ; fj ¼ Dtrans ½eji ; fj pji : (23)
s½fj
DFproc ½eji ; fj ¼ aji tji (14)
n½fj Hence
Dtrans ½eji ; fj ¼ aji tji =r½eji ; fj ; (15) here EjT is the total energy consumption at the TNs of the
jth cluster. Energy consumed in processing the offloaded
g½eji ; fj pji
r½eji ; fj ¼ Blog 2 1 þ (16) tasks from all the TNs at fj denoted by Eproc F
½fj is
Bn0 expressed as
tance between eji and fj . g 1 ; g 2 are the path loss exponent We now present two definitions for problem formulation,
and the path constant respectively [31]. inspired from [12] and [25] as follows.
The delay Dwait ½eji is the waiting time in the queue of fj
due to processing of all the tasks from TNs ejs ð8s < iÞ that Definition 5: The number v½fj takes values in the set
come before eji in the order of processing tasks in the queue f1; 2; 3; 4g. An FN can have either an external power supply
of fj . It is expressed as, (EPS) or an internal power source (IPS), a battery for example.
Also it can be in two states, passive (when it is sleeping) or
X
i1 active (when it is not in sleep mode)
Dwait ½eji ¼ DFproc ½ejs ; fj (17) 8
s¼1 >
> 1 when FN has an EPS and is passive.
<
2 when FN has an EPS and is active.
v½fj ¼ (26)
When FNs use serial processing, we add Dwait to DFproc to >
> 3 when FN has an IPS and is passive.
:
correct the processing time at the FNs. But when tasks are 4 when FN has an IPS and is active.
processed in parallel then Dwait ¼ 0 and we use the usual
DFproc to measure the processing delay. Hence the total time
for processing the task from eji including the offloading Definition 6: The historic time average energy consumption
latency is denoted by Dji which is the maximum of the local summarizes the pattern of average energy consumption of a
and offloading latency device with time, in a number with the dimensions of energy
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY WARANGAL. Downloaded on January 02,2024 at 06:52:34 UTC from IEEE Xplore. Restrictions apply.
62 IEEE TRANSACTIONS ON SUSTAINABLE COMPUTING, VOL. 8, NO. 1, JANUARY-MARCH 2023
over all the TNs in the clusters either in processing or trans- |fflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl{zfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflfflffl}
Pouter
mitting and, the energy consumption at the FNs, depending
e
on their operational circumstances v½ , E½t; . The bi-objec- Since } does not impose any explicit range in the values
tive problem corresponding to Eqs. (28), (29), (30), and (31) taken by c it only decides its structure, we can write Cð} Þ
is as follows: as C noting that c’s structure is now defined according to
} or equivalently by ¼ Dð} Þ.
minðfD ; fE Þ (32)
} ;c Pinner : finner ð} Þ ¼ min fðDð} Þ; cÞ ¼ min f ðcÞ
c2C c2C
s.t., } 2 P; c 2 C (33) Pouter : min finner ð} Þ:
(37)
} 2P
where Eq. (33) is based on the bounds in Eqs. (7) and (11). Note that Pinner is nested in Pouter , and for some given } ,
fðDð} Þ; cÞ is rewritten as f ðcÞ.
4 PROPOSED SCHEME 1) Optimization of Pinner : For solving Pinner we can either
The basic idea of the proposed scheme is as follows. We first apply a non-gradient, heuristic based technique or a rigor-
transform the bi-objective problem (32) to a single objective ous Hessian based non-linear optimization technique. The
optimization problem and bifurcated it into two nested computations using first option would incur numerous
problems namely Pinner and Pouter . The problem Pinner errors due to the heuristic nature of the technique. While
defined over c finds the optimum fraction of task size to be the latter option would demand large computational
offloaded and transmission power for a given set of clusters. resources making the algorithm slower for online applica-
The problem Pouter defined over } finds the optimal choice tion. Therefore, the limited memory bound constrained
of FNs for all TNs forming best clusters of TNs surrounding Broyden Fletcher Goldfarb Shanno (L-BFGS-B) algorithm
FNs. Both the problems Pinner and Pouter are optimized with
the joint objective of delay and energy minimization. 4. Please refer to [32] for the proof of this theorem.
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY WARANGAL. Downloaded on January 02,2024 at 06:52:34 UTC from IEEE Xplore. Restrictions apply.
YADAV ET AL.: CLUSTERING-BASED ENERGY EFFICIENT TASK OFFLOADING FOR SUSTAINABLE FOG COMPUTING 63
[33], [34] is used which is faster than the Hessian based tech- clusters in DðPi Þ witnessed by the ith particle so far and, P g ,
niques without involving too many approximations. It only the global best position yields the best set of clusters in
requires the function and its gradient at every point in the DðP g Þ that all the particles over all stages would have wit-
search space. A derivation of the gradient is provided in nessed until now. Therefore, as we move on to higher stages
Appendix B, available in the online supplemental material. we get better and better set of clusters in the swarm all of
2) Optimization of Pouter : Next for solving Pouter , we apply which are nearer to the most optimal set of clusters. After
particle swarm optimization (PSO). The motivation behind the PSO stages end we apply the D function to P g giving us
the use of a heuristic approach is that } depends exclusively the optimal choice of FNs for each TN or in other words, the
on and its presence in a huge search space of size N M turns best clusters of TNs surrounding FNs.
the optimization problem into an NP-complete problem.
a) Fitness Function: The fitness function for the applica- Algorithm 1. OCOP Algorithm
tion of PSO over Pouter is finner ð} Þ (refer Eq. (37)).
Input: All constant value parameters in the Table-2 and the
b) Particle Representation: The particle representation for
global view at the SDN-controller in the fog layer. The
the ith particle Xi } . Its dimension is the same as that of time counter (TSC s) at the SDN-controller. And, a dictio-
} i.e., N. The rth component of the position of the ith parti- nary of previous clustering events with key G and value as
cle in the swarm at the sth stage i.e., Xir ðsÞ 2 ½Gð1 a pair ð ; c Þ.
g=RÞ; Gðg=RÞ ½0; 1 provides us the guess distance // Offloading Segment
RG1 ðXir ðsÞÞ (cf. Definition 2) made by the rth TN for the 1: From the real time generated tasks trt compute Grt .
sth stage while selecting a FN in the process of cluster for- 2: Perform task offloading on the clusters obtained at
mation. So, the initial position of the ith particle in this minG2½Grt h;Grt þh jGrt Gj.
swarm Xi ð0Þ denotes one of the collection of initial guesses 3: if TSC 0 ðmodulo tÞ then
made by the TNs and DðXi ð0ÞÞ maps these guesses to an ini- 4: Perform Steps 7 through 11 with random t and parallely
tial cluster mapping creating one of the set of initial non- offload tasks as per the optimal pair found in step 2.
optimal clusters. Let us now illustrate the particle represen- // offloading and preprocessing clusters
tation by means of the same example as given in Illustration 5: end if
1 and explain how we can obtain the clusters. 6: Perform offloading as per the optimal pair found in
step 2, then Goto step 1.
Illustration 2: Suppose for the case of Fig. 2, with choosing sets // Clustering Segment
as in Eq. (2) 7: Initialize random t and find the load variable G.
8: Initialize Cðek Þ; Dðek Þ; 8ek using definitions-1, 4.
Xi ð0Þ ¼ ½0:27 0:48 0:35 0:29 0:26 0:25 0:3T : 9: Apply Global-best PSO algorithm to obtain with appro-
priate values of v; b1 and b2 using Eqs. (39) & (40) at every
The guess distance array obtained using RG1 ðXir ð0ÞÞ, for
stage, where the particle representation is } and the fitness
each r, if R ¼ 10 m and s 2 ¼ 0:5 is, function is finner ð} Þ defined below.
10: For any } 2 P, perform the following steps to get finner ð} Þ:
guess distance ¼ ½8:58 4:02 6:9 8:15 8:8 9:02 7:94T : 1. Apply the D function with the help of Dðek Þ8ek to gen-
Lastly, if the distance sets corresponding to Eq. (2) are erate , as in Eq. (7).
2. Define f ðcÞ; rc f ðcÞ for some c. See Appendix B,
Dðe4 Þ ¼ f5; 7; 9g available in the online supplemental material.
Dðe5 Þ ¼ f3g; Dðe6 Þ ¼ f4g; Dðe7 Þ ¼ f5g 3. Apply L-BFGS-B with input f ðcÞ; rf ðcÞ, C, to obtain
finner ð} Þ ¼ minc f ðcÞ and c .
Dðe1 Þ ¼ f5; 7g; Dðe2 Þ ¼ f4; 8g; Dðe3 Þ ¼ f6; 9g; (38) EndFor
11: Store ¼ Dð} Þ obtained from Global-best PSO and corre-
then using the definition of D function we can argue, since e1
sponding c from L-BFGS-B for key G.
guesses a distance of 8.58 which is greater than all the entries
in Dðe1 Þ, it has to choose from the whole set one FN with equal
probability, let’s say it chooses f3 at 5. Similarly for e2 the c) Movement of the particle: In order to solve Pouter , we
guess distance is just greater than 4 and less than 8 in Dðe2 Þ, apply the Global-best PSO variant [35], [36] which has faster
so it chooses f2 at 4. Continuing this forms the initial cluster convergence and works well for box-constrained problem
DðXi ð0ÞÞ, as considered in this paper. Following are the equations
governing the movement of the particle in the swarm,
DðXi ð0ÞÞ ¼ ½f3 f2 f2 f2 f1 f2 f3 T
Vij ðtÞ ¼ mVij ðt 1Þ þ k1 Z 1 ðPij Xij ðt 1ÞÞ
ff1 ; e5 g; ff2 ; e2 ; e3 ; e4 ; e6 g; ff3 ; e1 ; e7 g:
þ k2 Z 2 ðPjg Xij ðt 1ÞÞ (39)
direction. k1 ; k2 are acceleration constants and Z 1 ; Z 2 are complexity T ðN; MÞ of the OCOP algorithm (Clustering
two random variables uniformly distributed in [0,1], used segment) has a lower bound of VðN lg M þ N 2log N M Þ (see
to tune the rate of convergence and steer the particle Appendix D, available in the online supplemental material)
towards the optima respectively. and an upper bound of OðN 2 Þ ) T ðN; MÞ ¼ QðN k Þ; 1
k < 2. Since in our algorithm N M 1 ) 1 log N M
4.2 Algorithm Design of OCOP 0, so 1 2 log N M 2. Further the upper bound is
Here we present the proposed OCOP algorithm given as reached not when M N but only when all TNs form just
Algorithm 1. This is an online offloading algorithm which one cluster which is impossible due to sparse spatial distri-
finds optimal clustering and offloading parameters. The bution of FNs and the limited reachability of the TNs, there-
algorithm is explained stepwise as follows. Step 1 obtains fore, 1 k < 2. Hence, our approach is better than the
the real time task distribution t from the global view of the usual OðNMÞ approach which in the worst case, when M
SDN-controller P and finds the corresponding real time load N tends to OðN 2 Þ time complexity.
variable GðtÞ ¼ N i¼1 ti =N. The load variable is used as key
to store preprocessed optimal clustering and offloading pair 5 SIMULATION RESULTS
ð ; c Þ. This is because the optimal value fð ; c Þ as a func- Simulation Setup.
tion of t is monotonically increasing with respect to GðtÞ (see
Simulations were carried out over the Google co-labora-
Appendix C for proof, available in the online supplemental
tory Tesla K80 GPU. The OCOP algorithm was run for a
material). Step 2 finds the nearest key value in the prepro-
single instance of task distribution vector t generated ran-
cessed dictionary to the previously obtained real time load
domly. Python parallel global multi-objective optimization
variable. Steps 3-6 offload the tasks and in parallel prepro-
(pygmo-2.16.0) library coupled with Non-Linear optimiza-
cess more dictionary elements for later use. The condition tion (NLopt-2.6.2) were used for application of global best
for a preprocessing event is defined in multiples of t PSO and L-BFGS-B algorithms. The PSO was carried out for
8 ! 1000 iterations with 55 particles out of which 11 particles
1 X
Nj
>
> s½fj were processed in parallel. The L-BFGS-B algorithm was
>
> max a tk ; case5 1:
< j2f1;...;Mg Nj k¼1 n½fj k run in each PSO iteration for 1000 variants, each starting at
t¼ !! distinct initial points. They were evolved for some finite
>
> s½fj
>
> ak tk ; case 2: number of iterations where a batch of 100 variants was
: max max
j2f1;...;Mg k2f1;...;Nj g n½fj processed in parallel in each iteration. A virtual network of
a set of TNs and a set of FNs deployed randomly over an
area of 100 100 m2 was used with one hop reachability
As, in the case when TNs were allowed to process only radius of R ¼ 40 m for each device. A wireless transmission
locally they would on an average take t time for the com- link with 10 MHz bandwidth, noise power spectral density
plete execution of all their tasks. Steps 7-11 find the optimal n0 ¼ 173 dBm/Hz, path loss factor 38:46 þ 20log 10 ðdistð:ÞÞ
clustering and offloading parameters concurrent to offload- dB and MIMO antenna system was assumed. Gaussian
ing in step 4 as follows. Step 7 initializes the random task distribution (refer Section 3.1) was used for the presence
distribution vector and corresponding load variable. Step 8 of FNs under 40 m with respect to each TN, having
initializes each TN’s choosing set and corresponding dis- mean 0 and variance 0.5. Table 4 summarizes the values
tance set obtained from the SDN-controller’s global view. of the rest of the parameters in the simulation setting.
Steps 9 and 10 solve Pouter and Pinner as delinted in Sec- The OCOP algorithm for two types of processing at the
tion 4.1. Finally in step 11, we add the new key (random FNs, serial or parallel was compared with random clus-
load variable of step 7) and its pair (the obtained optimal tering and offloading parameters’ case with the same
parameters) to the dictionary. two processing scenarios and with, FEMTO [12] (cf. Sec-
tion 2) as the base algorithm.
4.3 Computational Complexity of OCOP Energy Distribution and Usage Efficiency. In order to mea-
The step 7 in Algorithm 1 takes OðNÞ time and the initiali- sure the efficiency of energy quantitatively, here we define
zation step 8 takes essentially constant time due to the pres- the energy distribution metric mDE (Joules/M-Bytes) as the
ence of a global view of the interconnection of the TNs and average amount of energy consumption in one of the partic-
the FNs in the SDN-controller. Step 9 runs for a constant ipant FN (or TN) per amount of data offloading to the FNs.
number of stages and the P updations for all the particles If E f (or E t ) is the total energy consumption at FNs (or TNs)
takes linear time of OðPNÞ. Then in the same stage, the fit- in Joules, P f M (or P t ¼ N) is the number of participant
ness function is computed for which step 10.1 takes FNs (or TNs) and T o is the average amount of data offload-
OðN lg MÞ (using binary search for Definition 3) time in the ing (in M-Bytes) then mDE is expressed as
worst case when all FNs are reachable. Computation of the
i term for f ðcÞ in step 10.2 and the ji component of the
jth th Ef Et
mDE ¼ mFN
DE ¼ þ mTN ¼ : (41)
PNjsame step takes Oði 1Þ time, in total it P f :T o P t :T o
DE
gradientPin the
takes 2 M j¼1 i¼1 Oði 1Þ time. Lastly, step 10.3 has a run-
time of OðmNÞ per stage, if m is the length of the memory The metric mDE indicates the distribution of the energy
per stage in the L-BFGS-B method [34]. Hence, the time among the participant FNs or TNs that is required to carry
out the given average amount of data offloading. For sus-
5 case-1:serial processing in FNs, case-2: parallel processing in FNs tainability, our objective is to maintain higher amount of
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY WARANGAL. Downloaded on January 02,2024 at 06:52:34 UTC from IEEE Xplore. Restrictions apply.
YADAV ET AL.: CLUSTERING-BASED ENERGY EFFICIENT TASK OFFLOADING FOR SUSTAINABLE FOG COMPUTING 65
Fig. 4. Plot of the metric mDE for four scenarios. Scenario I: N ¼ 500; M ¼ 100, Scenario II: N ¼ 750; M ¼ 150, Scenario III: N ¼ 1000; M ¼ 250, &
Scenario IV: N ¼ 1000; M ¼ 500.
TABLE 4 TABLE 5
Simulation Parameters Percentage Delay Violations
Fig. 5. Plot showing the radial distance at which TNs are present when all the FNs are fixed at the origin. All TNs marked with the same shape and
color are in the same cluster.
Fig. 6. The plot displays sorted log of FN activity time versus FN index fj . The colored lines in the legends indicate the log of FN activity time T ½fj .
Dots at the peak indicate the log of fog layer activity time TF . log ð0Þ is marked as 2 in these plots.
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY WARANGAL. Downloaded on January 02,2024 at 06:52:34 UTC from IEEE Xplore. Restrictions apply.
YADAV ET AL.: CLUSTERING-BASED ENERGY EFFICIENT TASK OFFLOADING FOR SUSTAINABLE FOG COMPUTING 67
[9] R. Dautov and S. Distefano, “Stream processing on clustered edge [31] G. Lee, W. Saad, and M. Bennis, “An online secretary framework
devices,” IEEE Trans. Cloud Comput., vol. 10, no. 2, pp. 885–898, for fog network formation with minimal latency,” in Proc. IEEE
Apr.–Jun. 2022. Int. Conf. Commun., 2017, pp. 1–6.
[10] A. Asensio et al. “Designing an efficient clustering strategy for [32] M. Sniedovich, Dynamic Programming: Foundations and Principles,
combined fog-to-cloud scenarios,” Future Gener. Comput. Syst., 2nd ed. Boca Raton, FL, USA: CRC Press, 2010. [Online]. Avail-
vol. 109, pp. 392–406, 2020. able: https://books.google.co.in/books?id¼KtSVtDs5yFYC
[11] A. Bozorgchenani, D. Tarchi, and G. E. Corazza, “An energy-aware [33] R. H. Byrd, P. Lu, J. Nocedal, and C. Zhu, “A limited memory
offloading clustering approach (EAOCA) in fog computing,” in Proc. algorithm for bound constrained optimization,” SIAM J. Sci. Com-
Int. Symp. Wireless Commun. Syst., 2017, pp. 390–395. put., vol. 16, no. 5, pp. 1190–1208, 1995.
[12] G. Zhang, F. Shen, Z. Liu, Y. Yang, K. Wang, and M. Zhou, [34] J. Nocedal and S. J. Wright, Numerical Optimization. New York,
“FEMTO: Fair and energy-minimized task offloading for fog- NY, USA: Springer, 2006.
enabled IoT networks,” IEEE Internet Things J., vol. 6, no. 3, [35] P. Kuila and P. K. Jana, “Energy efficient clustering and routing
pp. 4388–4400, Jun. 2019. algorithms for wireless sensor networks: Particle swarm optimi-
[13] A. Akbar, M. Ibrar, M. A. Jan, A. K. Bashir, and L. Wang, “SDN- zation approach,” Eng. Appl. Artif. Intell., vol. 33, pp. 127–140,
enabled adaptive and reliable communication in IoT-fog environ- 2014.
ment using machine learning and multiobjective optimization,” [36] Y. del Valle, G. K. Venayagamoorthy, S. Mohagheghi, J.-C. Her-
IEEE Internet Things J., vol. 8, no. 5, pp. 3057–3065, Mar. 2021. nandez, and R. G. Harley, “Particle swarm optimization: Basic
[14] Y. Zhai et al., “An energy aware offloading scheme for interdepen- concepts, variants and applications in power systems,” IEEE
dent applications in software-defined IoV with fog computing Trans. Evol. Comput., vol. 12, no. 2, pp. 171–195, Apr. 2008.
architecture,” IEEE Trans. Intell. Transp. Syst., vol. 22, no. 6,
pp. 3813–3823, Jun. 2021. Anirudh Yadav received the BTech degree in
[15] S. Misra and S. Bera, “Soft-VAN: Mobility-aware task offloading computer science and engineering from the Indian
in software-defined vehicular network,” IEEE Trans. Veh. Technol., Institute of Technology (Indian School of Mines)
vol. 69, no. 2, pp. 2071–2078, Feb. 2020. Dhanbad, India, in 2020. He is currently working
[16] M. Aazam, S. U. Islam, S. T. Lone, and A. Abbas, “Cloud of Things toward the MS degree in physics qunatum com-
(CoT): Cloud-fog-IoT task offloading for sustainable Internet of puting with the University of Wisconsin-Madison,
Things,” IEEE Trans. Sustain. Comput., vol. 7, no. 1, pp. 87–98, Madison, Wisconsin. His current research inter-
Jan.–Mar. 2022. ests include fog computing, quantum computing,
[17] S. Chen, X. Zhu, H. Zhang, C. Zhao, G. Yang, and K. Wang, and machine learning.
“Efficient privacy preserving data collection and computation off-
loading for fog-assisted IoT,” IEEE Trans. Sustain. Comput., vol. 5,
no. 4, pp. 526–540, Oct.–Dec. 2020.
[18] C. Zhu et al. “Folo: Latency and quality optimized task allocation
in vehicular fog computing,” IEEE Internet Things J., vol. 6, no. 3,
pp. 4150–4161, Jun. 2019. Prasanta K. Jana (Senior Member, IEEE) received
[19] Y. Yang, Z. Liu, X. Yang, K. Wang, X. Hong, and X. Ge, “POMT: the MTech degree in computer science from the Uni-
Paired offloading of multiple tasks in heterogeneous fog networks,” versity of Calcutta, Kolkata, India, in 1988, and the
IEEE Internet Things J., vol. 6, no. 5, pp. 8658–8669, Oct. 2019. PhD degree from Jadavpur University, Kolkata,
[20] S. Misra and N. Saha, “Detour: Dynamic task offloading in soft- India, in 2000. He is currently a professor with the
ware-defined fog for IoT applications,” IEEE J. Sel. Areas Commun., Department of Computer Science and Engineering,
vol. 37, no. 5, pp. 1159–1166, May 2019. Indian Institute of Technology (Indian School of
[21] Y. Zu, F. Shen, F. Yan, L. Shen, F. Qin, and R. Yang, “SMETO: Sta- Mines), Dhanbad, India. He has contributed 199
ble matching for energy-minimized task offloading in cloud-fog research publications, coauthored five books, three
networks,” in Proc. IEEE 90th Veh. Technol. Conf., 2019, pp. 1–5. book chapters and produced 15 PhDs. As a recogni-
[22] M. Mukherjee, M. Guo, J. Lloret, R. Iqbal, and Q. Zhang, tion of his outstanding research contributions, he
“Deadline-aware fair scheduling for offloaded tasks in fog com- has been awarded Canara Bank Research Publication Award in the year
puting with inter-fog dependency,” IEEE Commun. Lett., vol. 24, 2015 and 2017. His current research interests include wireless sensor net-
no. 2, pp. 307–311, Feb. 2020. works, cloud computing, fog computing, and machine learning.
[23] Z. Liu, X. Yang, Y. Yang, K. Wang, and G. Mao, “DATS: Disper-
sive stable task scheduling in heterogeneous fog networks,” IEEE
Internet Things J., vol. 6, no. 2, pp. 3423–3436, Apr. 2019. Shashank Tiwari received the BTech degree in
[24] Y. Yang, S. Zhao, W. Zhang, Y. Chen, X. Luo, and J. Wang, “DEBTS: computer science and engineering from the Indian
Delay energy balanced task scheduling in homogeneous fog Institute of Technology (Indian School of Mines),
networks,” IEEE Internet of Things J., vol. 5, no. 3, pp. 2094–2106, Dhanbad, India, in 2020. He is currently working as
Jun. 2018. a software development engineer (SDE) with Sam-
[25] G. Zhang, F. Shen, N. Chen, P. Zhu, X. Dai, and Y. Yang, “DOTS: sung Noida. His research interests include areas of
Delay-optimal task scheduling among voluntary nodes in fog fog computing, reinforcement learning, natural lan-
networks,” IEEE Internet of Things J., vol. 6, no. 2, pp. 3533–3544, guage processing, and deep learning.
Apr. 2019.
[26] Y. Yang, K. Wang, G. Zhang, X. Chen, X. Luo, and M.-T. Zhou,
“MEETS: Maximal energy efficient task scheduling in homogeneous
fog networks,” IEEE Internet Things J., vol. 5, no. 5, pp. 4076–4087,
Oct. 2018.
[27] Z. Zhu, T. Liu, Y. Yang, and X. Luo, “BLOT: Bandit learning-based Abhay Gaur ireceived the BTech and MTech
offloading of tasks in fog-enabled networks,” IEEE Trans. Parallel degrees in computer science and engineering
Distrib. Syst., vol. 30, no. 12, pp. 2636–2649, Dec. 2019. from the Indian Institute of Technology (Indian
[28] M. Mukherjee et al. “Task data offloading and resource allocation School of Mines) Dhanbad, India, in 2021. His
in fog computing with multi-task delay guarantee,” IEEE Access, current research interests include fog computing,
vol. 7, pp. 152 911–152 918, 2019. deep learning architectures, and reinforcement
[29] J. Du, L. Zhao, J. Feng, and X. Chu, “Computation offloading and learning.
resource allocation in mixed fog/cloud computing systems with
min-max fairness guarantee,” IEEE Trans. Commun., vol. 66, no. 4,
pp. 1594–1608, Apr. 2018.
[30] Y. Liu, F. R. Yu, X. Li, H. Ji, and V. C. M. Leung, “Distributed
resource allocation and computation offloading in fog and cloud " For more information on this or any other computing topic,
networks with non-orthogonal multiple access,” IEEE Trans. Veh.
please visit our Digital Library at www.computer.org/csdl.
Technol., vol. 67, no. 12, pp. 12 137–12 151, Dec. 2018.
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY WARANGAL. Downloaded on January 02,2024 at 06:52:34 UTC from IEEE Xplore. Restrictions apply.