Cost Aware Workflow Offloading in Edge Cloud Computing
Cost Aware Workflow Offloading in Edge Cloud Computing
[Link]
Abstract
The edge-cloud computing continuum effectively uses fog and cloud servers to
meet the quality of service (QoS) requirements of tasks when edge devices cannot
meet those requirements. This paper focuses on the workflow offloading problem
in edge-cloud computing and formulates this problem as a nonlinear mathematical
programming model. The objective function is to minimize the monetary cost of
executing a workflow while satisfying constraints related to data dependency
among tasks and QoS requirements, including security and deadlines. Additionally,
it presents a genetic algorithm for the workflow offloading problem to find near-
optimal solutions with the cost minimization objective. The performance of the
proposed mathematical model and genetic algorithm is evaluated on several real-
world workflows. Experimental results demonstrate that the proposed genetic
algorithm can find admissible solutions comparable to the mathematical model and
outperforms particle swarm optimization, bee life algorithm, and a hybrid heuristic-
genetic algorithm in terms of workflow execution costs.
Mohammad Ashjaei and Saad Mubeen have contributed equally to this work.
* Somayeh Abdi
[Link]@[Link]
Mohammad Ashjaei
[Link]@[Link]
Saad Mubeen
[Link]@[Link]
1
Assistant Professor, Department of Computer Engineering, Eslam Abad-E-Gharb Branch,
Islamic Azad University, Eslam Abad‑E‑Gharb, Iran
2
Department of Networked and Embedded Systems, Mälardalen University, Västerås, Sweden
13
Vol.:(0123456789)
S. Abdi et al.
1 Introduction
With the prosperity of the internet of things (IoT), the edge-cloud computing
continuum has received considerable attention in the business and research
communities as it integrates fog/cloud servers to meet the QoS requirements of
the user demands, such as deadlines [1, 2]. This computing paradigm provides
distributed and scalable computing resources to address some of the challenges
of cloud computing, such as high latency, unpredictable bandwidth, and security
issues, by locating fog servers closer to the edge devices [3]. When computing
demands extend beyond an edge device, real-time tasks can be offloaded to the
fog servers located closer to the edge devices which leads to reducing the latency
associated with sending data [4, 5]. However, the storage and computing capacity
of fog servers are limited, and compute-intensive tasks should be offloaded to
the cloud to reduce the computational burden of fog servers. This computing
paradigm provides additional computational power, storage capacity, scalability,
and resilience which are crucial requirements for various systems such as
industrial IoT [6], smart healthcare [7], smart grids [8], smart cities [9], flying
vehicles such as drones [10], and autonomous vehicles [11]. In these systems, as
the level of autonomy increases, more computationally intensive tasks need to be
performed, and edge devices alone are insufficient to meet the requirements of the
tasks.
Workflow offloading is a prominent problem in edge-cloud computing.
A workflow refers to a set of tasks with data dependencies between them that
perform a specific function. Workflow offloading refers to selecting appropriate
computing resources from the fog or cloud layer to execute workflow tasks while
meeting their QoS requirements and data dependencies [12]. QoS requirements
in workflow scheduling refer to the quality of service criteria that must be met
for tasks. In this paper, meeting the deadline of a workflow and the security
requirements of tasks are considered as QoS requirements. Fog servers are located
closer to the edge devices and users; by offloading tasks with high-security
concerns to the fog server, sensitive data do not need to travel through the entire
network to reach a central cloud server. It reduces the risk of unauthorized access
during transmission. In some cases, compliance requirements necessitate that
certain types of data remain within a specific geographic location or under strict
control. Fog computing enables compliance with these regulations by keeping
high-security data local, rather than transmitting it to a distant cloud server.
Therefore, the unique advantages of fog computing, such as reduced transmission
risks, localized control, and compliance with privacy regulations, make it an
appropriate computing layer for executing tasks with high-security requirements
[3, 13–15]. Workflow offloading can also consider the security requirements
of tasks, allowing tasks with high-security concerns to be offloaded to the fog
servers, while tasks with low-security concerns can be offloaded to the cloud.
Offloading tasks to the proper computing resources in the fog or the cloud
layer have been a challenge. Such task offloading significantly impact on meeting
QoS requirements of tasks and utilizing the limited capacity of fog servers. To
13
Cost‑aware workflow offloading in edge‑cloud computing using…
13
S. Abdi et al.
The rest of this paper is organized as follows. Section 2 reviews the related works in
the area of task offloading in edge-cloud computing. Section 3 introduces the system
model and workflow model. Section 4 presents the proposed mathematical model for
the workflow offloading problem, including the objective function and constraints of
the model. Section 5 presents the proposed genetic algorithm. The simulation results
of the proposed approaches are reported in Sect. 6, and finally, Sect. 7 concludes the
paper.
2 Related work
13
Cost‑aware workflow offloading in edge‑cloud computing using…
paper assumes that several tasks can be assigned to the same fog node and the
proposed algorithm identifies the order of executing tasks on the assigned nodes.
The proposed BLA algorithm starts with generating an initial population randomly
and uses crossover and mutation operators to generate offspring solutions. The work
in [28] formulates the problem of Bag-of-Tasks (BoT) scheduling as a permutation-
based optimization problem and proposes a scheduling algorithm that minimizes the
monetary cost under a deadline constraint. It uses a modified version of the genetic
algorithm to generate different permutations for tasks at each scheduling round.
Then, the tasks are assigned to VMs that have sufficient resources and achieve the
minimum execution cost. The work in [29] proposes a task scheduling method based
on reinforcement learning, a Q-learning algorithm, to minimize the completion time
of parallel tasks. It considers the delay of transmission, execution, and queuing time
to formulate the completion time of tasks. It also applies digital twins to simulate
the results of different actions made by an agent, so that one agent can try multiple
actions at a time, or, similarly, multiple agents can interact with the environment in
parallel.
Some research has focused on offloading dependent tasks to fog or cloud servers.
The work in [30] formulates the workflow scheduling in edge-cloud computing with
the objective of makespan optimization with mathematical programming. It also
presents a heuristic algorithm that finds near-optimal solutions for the scheduling
problem. The mentioned heuristic algorithm prioritizes tasks based on their
workload and data dependency among tasks then selects a proper edge or cloud
server based on the earliest finish time policy. The work in [31] proposes multi-
objective workflow offloading in Multi-access Edge Computing (MEC) based on a
Meta-Reinforcement Learning (MRL) algorithm. The objective is to minimize task
latency, resource utilization rate, and energy consumption when a local scheduler
decides to offload the tasks to the MEC host. The work in [32] proposes a genetic
algorithm that minimizes the makespan of dependent tasks. The work in [33]
proposes a genetic algorithm that minimizes the energy consumption and makespan
of the workflows that are generated by IoT devices. Nonetheless, these works do not
consider the complexity emerging from the heterogeneity of fog and cloud resources
and workflow requirements such as required memory, or security constraints.
Cost modeling is another critical improvement criterion in edge-cloud comput-
ing [37], and some related works focus on task offloading with cost minimization
objectives. The work in [34] proposes a mathematical model for task offloading in
edge-cloud computing with the objective of energy and computational cost optimi-
zation. It only considers the computational cost of tasks, and the data transfer cost is
not considered. The mentioned paper also proposes a branch-and-bound method for
solving the proposed mathematical model. The work in [35] proposes a framework
for resource provisioning in cloud computing with the cost minimization objective
under deadline constraints. It considers data dependency between tasks and pro-
poses a particle swarm-based algorithm to find the optimal assignment of tasks to
the virtual machines in cloud computing. The work in [36] utilizes queuing theory to
study energy consumption and cost when computations are offloaded to fog or cloud
computing. The mentioned work considers different queuing models in edge-cloud
computing. It considers the M/M/1 queue at the mobile device layer, the M/M/c
13
S. Abdi et al.
queue at the fog node with a defined maximum request rate, and the M∕M∕∞ queue
at the cloud layer. Based on the applied queue theory, it formulates a multi-objec-
tive optimization problem for minimizing energy consumption, delay, and monetary
cost of parallel tasks. Table 1 summarizes the main idea, the task requirements,
and improvement criteria that are considered in task offloading problems in related
works.
Meeting the deadline of a workflow while satisfying the data dependency between
tasks has been a challenge in edge-cloud computing. In addition, other workflow
requirements such as security concerns and memory requirements are important
constraints to consider. To address this problem, this paper proposes a nonlinear
mathematical programming model. The objective is to minimize the cost while sat-
isfying the above constraints. Moreover, the paper proposes a genetic algorithm to
find a near-optimal solution while satisfying the mentioned constraints.
3 System model
13
Cost‑aware workflow offloading in edge‑cloud computing using…
3.1 Resource model
13
S. Abdi et al.
Notations of a workflow
W = (T, D) Workflow W indicating by task set T and dependency matrix D.
T = {𝜏1 , 𝜏2 , ...𝜏n } A set of n tasks in the workflow W
D ∈ ℝ|T|×|T| Dependency matrix D; element dij in D is the amount of data that must
be transferred from task 𝜏i to 𝜏j
eti The computation size of task 𝜏i , i.e., Million Instructions (MI)
memi The minimum required memory (RAM) for executing task 𝜏i
tsi Security tag of task 𝜏i
ri Rank of task 𝜏i
prei Set of predecessor task(s) of task 𝜏i
suci Set of successor task(s) of task 𝜏i
ids1 Input data size of task 𝜏1 in data unit size
odsn Output data size of task 𝜏n in data unit size
Dw Deadline of the workflow W
Notation of computing layers
and computing nodes
CL = {CLedge ∪ CLfog ∪ CLcloud } A set of computing layers participating in the edge-cloud continuum
CLk Computing layer k
rsk Security tag of CLk
ITk ⟹ {Ik1 , Ik2 , ..., Ikq } The set of instance types provided by CLk
Ikj jth instance type provided by CLk
NPkj ⟹ {Nkj1 , Nkj2 , ..., Nkjp } A node pool provided for instance type Ikj
Nkjl lth node of instance type Ikj
prkj The cost of renting a node of instance type Ikj in the time unit Δt.
pf kj The CPU processing capacity of a node of Ikj , i.e., million instruction
per second (MIPS)
bwkj Communication bandwidth of a node of instance type Ikj
ramkj The memory capacity (RAM) of a node of instance type Ikj
bw(k,k� ) The communication bandwidth between computing layers k and k′
dtc The price of data transfer cost between two different computing layers
in the data unit
layers. The notation CLk indicates computing layer k. Since we propose a security-
aware task offloading model, we consider a security tag for each computing layer
and task. The notation rsk ∈ {spu , ssp , spr } indicates the security tag of kth computing
layer, i.e., CLk . Here, the cloud layer has a public security tag, i.e., rscloud = spu, the
fog layer has a semi-private security tag, i.e., rsfog = ssp, and the edge layer has a
private security tag, i.e., rsedge = spr , where spr < ssp < spu, and a smaller security
tag indicates that the task or computing layer has a higher security concern. In this
work, we consider spu = 3, ssp = 2, and spr = 1, where spr < ssp < spu. In the work-
flow model, Sect. 3.2, the security constraint for assigning tasks in the workflow to
the computing layers is explained in detail.
13
Cost‑aware workflow offloading in edge‑cloud computing using…
Moreover, CLk provides a set of instance types with different prices and
performance levels, i.e., ITk ⟹ {Ik1 , Ik2 , ..., Ikq }. The notation Ikj indicates jth
instance type in the kth computing layer. For each instance type Ikj , a pool of p
nodes is provided, i.e., NPkj ⟹ {Nkj1 , Nkj2 , ..., Nkjp }. The notation Nkjl indicates lth
node of instance type Ikj . Nodes of the same type are provisioned with the same
characteristics. The notations used to describe the characteristics of instance type Ikj
are as follows:
Ikj ∶< prkj , ramkj , bwkj , pfkj >
The notation prkj denotes the price of renting a node of instance type Ikj per time
unit Δt . The notation ramkj denotes the memory capacity (RAM) of a node of
instance type Ikj . The communication bandwidth of a node of instance type Ikj
is denoted by bwkj . The notation pfkj indicates the CPU processing capacity of a
node of instance type Ikj , i.e., the number of instructions that each node of type
Ikj can process per second (MIPS). Moreover, the notation bw(k,k� ) indicates the
communication bandwidth between computing layers k, k′. It is assumed that the
data transfer between nodes in the same computing layer is free, and only data
transfer between different computing layers is charged. The notation dtc indicates
the cost of transferring data per data unit, between two different computing layers.
3.2 Workflow model
It is assumed that an IoT device generates applications that are composed of depend-
ent tasks [38]. Different IoT applications such as video analysis [39], object detec-
tion [40], navigator [41], and cognitive assistance [42] are composed of dependent
tasks. These applications are called workflows and their structure can be modeled as
a DAG (Direct Acyclic Graph), depicted in Fig. 2. A DAG is a way of representing
data dependencies among tasks that must be executed in a particular order, where
the input data of a task is the output data of one or more previous tasks.
13
S. Abdi et al.
The notation eti is the computation size of task 𝜏i , i.e., million instructions (MI). The
minimum required memory (RAM) for executing task 𝜏i is denoted by memi . The
notation tsi ∈ {spu , ssp , spr } is the security tag of task 𝜏i . We consider three security
tags for tasks including public security tag, i.e., spu, semi-private security tag, i.e.,
ssp, and private security tag, i.e., spr , and spr < ssp < spu, where a smaller security tag
indicates that the task has a higher security concern. Therefore, each task can have
one of the following values: If tsi = spr , task 𝜏i is private, and it can be executed only
on the edge layer. If tsi = ssp, task 𝜏i is semi-private, and it can only be executed on
the nodes in the edge or fog layer. If tsi = spu, task 𝜏i is public, and it can be executed
on the nodes in the edge, fog, or cloud layer. As mentioned in Sect. 3.1, we consider
spu = 3, ssp = 2, spr = 1, where spr < ssp < spu. Accordingly, security constraint for
assigning task 𝜏i to computing layer k can be represented as follows:
⎧ k ← {CL } tsi = 1
⎪ edge
SCi,k = ⎨ k ← {CLedge , CLfog } tsi = 2 (1)
⎪ k ← {CLedge , CLfog , CLcloud } tsi = 3
⎩
According to this constraint, a private task can only be executed in the edge layer
while a public task can be executed in the edge, fog, or cloud layer. In addition, we
assume that each task in the workflow has a rank. The notation ri indicates the rank
of task 𝜏i . The rank of a task is determined based on its index, i.e., ri = i. In our
proposed model, if two independent tasks are assigned to the same node, the task
with a lower rank will be executed first.
The notation prei is the set of predecessor tasks of 𝜏i , i.e., prei = {𝜏t ∣ dti ≠ 0}.
The notation suci is the set of successor tasks of 𝜏i , i.e., suci = {𝜏t ∣ dit ≠ 0}. Task
𝜏1 is the entry task of the workflow and has no predecessor task(s). Task 𝜏n is
the exit task of the workflow and has no successor task(s). The notations ids1
and odsn indicate the input and output data size of tasks 𝜏1 and 𝜏n , respectively.
Figure 2 shows an example of a workflow with 8 tasks, where 𝜏1 is the entry
task, and 𝜏8 is the exit task. The successors of 𝜏1, i.e., suc1 = {𝜏2 }, while the
predecessor of pre6 , i.e., pre6 = {𝜏3 , 𝜏4 , 𝜏5 }.
13
Cost‑aware workflow offloading in edge‑cloud computing using…
4 Problem formulation
4.1 Assignment constraint
Workflow W contains n tasks, and the assignment of a task refers to allocating the
task to a computing node in an edge-fog-cloud environment. Therefore, a sched-
ule Φ is a set of assignments, i.e., Φ = {Ai | i = 1, ..., n} and the assignment of
task 𝜏i is represented as follows:
Ai ∶< 𝜏i , Nkjl , STi , RTi >
This assignment indicates that task 𝜏i is assigned to lth node of instance type Ikj , i.e.,
Nkjl and STi and RTi are the start time and run time of the task on the assigned node,
respectively. To formulate assignment Ai , we define decision variable yikjl where
yikjl = 1 if and only if task 𝜏i is assigned to node Nkjl ; otherwise, it attains 0. The
assignment constraint is formulated in Eq. (2). This constraint guarantees that all
tasks in the workflow are scheduled, and each task is to be scheduled only once.
∑ ∑ ∑
yikjl = 1 ∀i ∈ T
(2)
k∈CL j∈ITk l∈NPkj
13
S. Abdi et al.
4.2 Memory constraint
A task can be assigned to an instance type that satisfies the minimum required
memory for its execution. This constraint is formulated in Eq. (3). In this
∑
equation, l∈NPkj yikjl = 1 if and only if task 𝜏i is assigned to a node of instance
type Ikj.
∑
yikjl ⋅ memi ≤ ramkj ∀i ∈ T, ∀k ∈ CL, ∀j ∈ ITk
(3)
l∈NPkj
4.3 Security constraint
4.4 Non‑preemption constraint
In this work, we consider non-preemption resource allocation for tasks, once a task
starts on a node, it will finish without any interruption, i.e., it cannot be paused or
migrated until it completes. Given the assignment Ai, this constraint can be represented
as:
Mi = STi + RTi ∀i ∈ T (5)
In this equation, decision variable Mi indicates the completion time of task 𝜏i on the
allocated node in assignment Ai . According to this assignment, the run time of task
𝜏i on a node of instance type Ikj is as follows:
13
Cost‑aware workflow offloading in edge‑cloud computing using…
∑ eti
RTi >= yikjl ⋅ ∀i ∈ T, ∀k ∈ CL, ∀j ∈ ITk (6)
l∈NPkj
pf kj
where eti indicates the computation size of task 𝜏i , and pf kj represents the CPU
processing capacity of a node of instance type Ikj which task 𝜏i is assigned to it. In
∑
this equation, l∈NPkj yikjl = 1 if and only if task 𝜏i is assigned to a node of instance
type Ikj.
• In the case that task 𝜏i and its predecessor task 𝜏t run in the same node then
the data transfer time from task 𝜏t to 𝜏i is 0, i.e., 𝛽t,i = 0 . Decision variable
𝜈it indicates whether tasks 𝜏i and 𝜏t are assigned to the same node or not. If
tasks 𝜏i and 𝜏t are assigned to the same node then 𝜈it = 1; otherwise, 𝜈it = 0 .
Equation (9) calculates the value of this decision variable.
13
S. Abdi et al.
• In the case that tasks 𝜏i and 𝜏t run in the same computing layer but different
nodes, data transfer time is computed by considering the communication
bandwidth of instance type Ikj that task 𝜏t is assigned to it, and 𝛽t,i = dti ∕bwkj .
Here, dti is the output data size of task 𝜏t which must be transferred to 𝜏i . Decision
variable clit indicates whether 𝜏i and 𝜏t are assigned to different nodes in the same
computing layer or not. If tasks 𝜏i and 𝜏t are assigned to different nodes in the
same computing layer then clit = 1; otherwise, clit = 0. Equation (10) calculates
the value of this decision variable.
∑ ∑ ∑ ∑
clit = (1 − vit ) ⋅ yikjl ⋅ ytkjl
j∈ITk l∈NPkj j∈ITk l∈NPkj (10)
∀i ∈ T − {𝜏1 }, ∀t ∈ prei , ∀k ∈ CL
• In the case that tasks 𝜏i and 𝜏t run in different computing layers, 𝛽t,i = dti ∕bw(k,k� ),
where bw(k,k� ) denotes communication bandwidth between the computing layers k
and k′. Decision variable 𝜃it indicates whether tasks 𝜏i , 𝜏t are assigned to different
computing layers or not. If tasks 𝜏i , 𝜏t are assigned to different computing layers
then 𝜃it = 1; otherwise, 𝜃it = 0. Equation (11) calculates the value of this decision
variable.
𝜃it = (1 − clit ) ⋅ (1 − vit ) ∀i ∈ T − {𝜏1 }, ∀t ∈ prei (11)
According to the above, the data transfer time between task 𝜏i and its predecessor
task 𝜏t is formulated as follows:
𝛽t,i = clit ⋅ dti ∕bwkj + 𝜃it ⋅ dti ∕bw(k,k� ) ∀i ∈ T − {𝜏1 }, ∀t ∈ prei (12)
If task 𝜏i and 𝜏t run on the same node then vit = 1, clit = 0, and 𝜃it = 0, so 𝛽t,i = 0;
In this case, the data transfer time between the dependent tasks is 0. If task 𝜏i and
𝜏t run on different nodes in the same computing layer then vit = 0, clit = 1, 𝜃it = 0,
so 𝛽t,i = dti ∕bwkj . In this case, the data transfer time between dependent tasks is
computed by considering the communication bandwidth of instance type Ikj that task
𝜏t is assigned to it. If task 𝜏i and 𝜏t run in different computing layers then vit = 0,
clit = 0, 𝜃it = 1, so 𝛽t,i = dti ∕bw(k,k� ). In this case, the data transfer time between
dependent tasks is computed by considering the communication bandwidth between
the computing layers k and k′.
The execution times of tasks assigned to the same node cannot overlap. This is
because each node can only execute its assigned tasks sequentially. If there is
data dependency among two tasks assigned to the same node, based on the data
dependency formulated in Eq. (8), the tasks do not overlap. For two tasks 𝜏i and 𝜏t
13
Cost‑aware workflow offloading in edge‑cloud computing using…
that there are no data dependencies between them and assigned to the same node, we
define the assignment dependency as follows:
adi = {𝜏t | yikjl ⋅ ytkjl = 1 & rt < ri & t ∉ prei & i ∉ pret } (13)
where ri indicates the rank of task 𝜏i . Thus, adi is the set of predecessor tasks of task
𝜏i that must be scheduled before it due to the assignment dependency.
We considered the data dependency and the assignment dependency in
formulating the start time of tasks. The decision variable STi indicates the start time
of task 𝜏i on the assigned node. Task 𝜏i starts only when it has received all data from
its predecessor tasks due to data dependency and when all its predecessor tasks due
to assignment dependency have been completed. Therefore, the start time of task 𝜏i
is formulated as follows:
STi ≥ max {ReadyTi , max (Mt )} ∀i ∈ T, ∀t ∈ adi (14)
where ReadyTi is the time at which task 𝜏i receives all input data from its predecessor
tasks due to data dependency. As mentioned, adi is the set of predecessor tasks of
task 𝜏i that must be scheduled before it due to the assignment dependency. Mt is the
completion time of task 𝜏t and the expression max(Mt ) ∀t ∈ adi is the completion
time of all predecessor tasks of task 𝜏i due to assignment dependency.
4.7 Deadline constraint
The exit task of the workflow, i.e., 𝜏n, receives the final execution results. Therefore,
the completion time of a workflow is equal to the exit task’s completion time, i.e.,
Mn. If the exit task is assigned to the fog or cloud layer then the data transfer time
of its output data to the edge node should be considered. To satisfy the deadline
constraint, the completion time of the workflow must be less or equal to the deadline
of the workflow. This constraint is represented as follows:
∑ ∑
Mn + ynkjl ⋅ odsn ∕bw(k,k� ) ≤ Dw ∀k ∈ {CLfog , CLcloud }
(15)
j∈ITk l∈NPkj
∑ ∑
where k� = {CLedge } and j∈ITk l∈NPkj ynkjl = 1 if and only if task 𝜏n is assigned to a
node in the fog or cloud layer. In this case, the expression odsn ∕bw(k,k� ) indicates the
data transfer time to send the output data of the last task in the workflow to the edge
device. If the last task of the workflow runs in the edge layer, then, the data transfer
time of the last task attains 0.
4.8 Objective function
13
S. Abdi et al.
Different cloud providers consider various time intervals for charging a VM, for
instance, AWS charges for EC2 instances on a per-hour basis, while there are some
cloud providers such as Microsoft Azure that charge for VMs on a per-minute basis.
As mentioned in Sect. 3, we consider the CPU capacity of nodes as MIPS and the
task computation size as MI. In the experiments, we consider Amazon EC2 instances
which are charged on a per-hour basis. Therefore, to bridge the gap between the task
computation time (e.g., second) and the time interval of renting a node (e.g., hour),
in Eq. (17), we incorporate the following points:
• We convert the time interval of renting a node from seconds to hours by dividing
the total time of running a node by Δt = 3600 (the number of seconds in an hour)
to get the time in hours.
• Cloud providers typically round up to the nearest hour for billing purposes. Thus,
after converting the time of allocating a node to tasks to hours, we apply the ceil
function to ensure that we account for the full hourly billing cycle.
The data transfer cost is formulated in Eq. (18). This cost depends on the amount of
data transferred between dependent tasks. It is assumed that only the data transfer
between different computing layers is charged. If dependent tasks are assigned to the
same computing layer, the data transfer is free; otherwise, it is charged.
∑ ∑
Cd = 𝜃it ⋅ dti ⋅ dtc
(18)
i∈T−{t1} t∈prei
If task 𝜏i and its predecessor task 𝜏t are assigned to different computing layers, then,
𝜃it = 1 and the data transfer is charged; otherwise, 𝜃it = 0 and the data transfer is
13
Cost‑aware workflow offloading in edge‑cloud computing using…
free. Here, dti is the amount of data that must be transferred from task 𝜏t to 𝜏i , and
dtc is the transmission cost per data unit.
Task scheduling problems are known as NP-hard problems [44–46]. This means
that there are no polynomial-time algorithms that can find optimum solutions to
these problems. Therefore, this paper proposes a genetic algorithm for solving
the workflow offloading problems in the edge-cloud computing continuum, called
WSEFC-GA. The stochastic nature of GAs, combined with their population-
based search, enhances their ability to perform a global search. This makes them
particularly useful for complex problems while other algorithms such as the
beluga whale optimization algorithm might get stuck in local optima [47, 48].
Moreover, GAs can be designed with different selection, crossover, and mutation
strategies to suit specific problem requirements. In this work, we develop
problem-specific crossover and mutation operations, tailored to satisfy the
defined constraints of our workflow offloading problem, such as data dependency,
the workflow deadline, memory, and security constraints. These operators ensure
that offspring solutions are feasible.
Inspired by the proposed mathematical model, WSEFC-GA is concerned with
finding feasible solutions such that the monetary cost of executing a workflow is
minimized. Chromosome (solution) representation, population initialization, fitness
evaluation, and application of evolutionary operators including selection, crossover,
and mutation are the key elements of the proposed WSEFC-GA algorithm. In addi-
tion, for each chromosome in the initial population and offspring chromosomes, we
evaluate whether the solution is feasible or not. A solution is considered feasible if
and only if it satisfies the constraints specified in Sect. 4. The following subsections
provide a detailed description of the WSEFC-GA algorithm and its key elements.
5.1 Chromosome structure
where assignment Ai indicates that task 𝜏i is assigned to lth node of instance type j
in computing layer k, i.e., Nkjl . The notations STi and RTi indicate the start time and
run time of task 𝜏i on the assigned node, respectively. According to this definition,
the representation of a chromosome (solution) in the proposed genetic algorithm is
shown in Fig. 3.
13
S. Abdi et al.
It is a structure of length n, consisting of cells and the index of the cells indicate
the task indexes (𝜏i ). Each cell consists of the computing layer index (k), the instance
type index (j), the node index (l), the start time of the task (STi ), and the run time of
the task ( RTi ) on the assigned node. Since there are data dependencies among tasks,
the start time and run time of tasks are included in the chromosome to efficiently
manage these dependencies and reduce the computational overhead of the schedul-
ing algorithm, inspired by dynamic programming.
5.2 Fitness function
13
Cost‑aware workflow offloading in edge‑cloud computing using…
5.3 WSEFC‑GA algorithm
Algorithm 1 WSEFC-GA
13
S. Abdi et al.
5.4 Initial population
13
Cost‑aware workflow offloading in edge‑cloud computing using…
5.5 Crossover operator
13
S. Abdi et al.
Then, we apply uniform crossover to generate feasible solutions for the workflow
offloading problem, in line 9. The uniform crossover is applied only for changing
the computing layer, instance type, and node indexes. As described in Sect. 5.4, for
each task, we select a computing layer and an instance type that satisfies the security
and memory constraints. Based on the structure of the chromosome and proposed
uniform crossover, these constraints are satisfied for offspring solutions. Then, the
run time and the start time of tasks are calculated via Algorithm 3 to ensure the
precedence and assignment dependency constraints, in line 12. For each generated
offspring solution, it checks to see if the deadline constraint is satisfied, in line 13.
If this constraint is satisfied, the fitness of the chromosome is calculated, and it is
added to the population.
13
Cost‑aware workflow offloading in edge‑cloud computing using…
Algorithm 4 CrossOver-WSEFC
5.6 Mutation operator
The mutation operator in GA replaces some gene values with other values in the
gene domain to improve population diversity. Similar to the crossover operator
detailed above, we propose a problem-specific mutation operator for the schedul-
ing problem, shown in Algorithm 5. This algorithm uses K-way tournament selec-
tion for selecting parent P from the current population, in line 7. Then, it selects
some mutation points (tasks) randomly from the selected parent P. For each selected
mutation point the following process is performed: If the task of the selected point
is private, i.e., tsi = 1, then the algorithm continues without performing the muta-
tion operator since the computing resource cannot be changed for the private task,
line 11. Otherwise, for the selected mutation point, three mutation operators are
performed on the computing layer, instance type, and node indexes, respectively, in
lines 13- 21. Similar to the initial population algorithm detailed above, the mutation
operators are performed so that the security and memory requirements of the tasks
are satisfied. After applying the mutation operators on the selected points, the run
time and start time of tasks are calculated via Algorithm 3 to satisfy the precedence
and assignment dependency constraints, in line 22. Then, it checks if the deadline
13
S. Abdi et al.
constraint is satisfied, in line 23. If this constraint is satisfied, the fitness of the new
chromosome is calculated, and it is added to the population.
Algorithm 5 Mutation-WSEFC
5.7 Time complexity
13
Cost‑aware workflow offloading in edge‑cloud computing using…
6 Experimental results
6.1 Experimental settings
Specifications of node instances provided by edge, fog, and cloud layers are listed
in Table 3. The specifications of cloud nodes are based on Amazon EC2 instance
types, and the cloud layer provides more powerful node instances than the fog layer.
We assumed that fog servers also use virtualization technology to create and man-
age nodes [49, 50]. We considered different node instances in cloud and fog layers,
each with a specific memory capacity and performance level. However, in the exper-
iments, we considered limited computing capacity in the edge and fog layers. We
consider one node in an edge device. In the fog layer, we consider 3 node instances,
each of which has 5 nodes available for scheduling a single workflow. Since provid-
ing computing nodes for a fog server and cloud provider incurs costs, such as power
and maintenance expenses, running nodes in the fog/cloud layers are charged. The
average bandwidth between two different computing layers is set to 10 Mbps and the
average bandwidth between two different nodes in the same computing layer is set to
100 Mbps. The data transmission cost is considered dtc = 0.02 ($ per GB).
13
S. Abdi et al.
To investigate the behavior of the MPM and the WSEFC-GA, we evaluate the
cost of executing some real-world workflows such as the Epigenome, LIGO, Mon-
tage, and CyberShake workflows with small workflow sizes (20 tasks) and large
workflow sizes (100 tasks). The structures of these workflows are shown in Fig. 4.
Epigenome workflow is used in the domain of biology, and it is involved in mapping
the epigenetic state of human cells on a genome-wide scale. The LIGO workflow
involves several key stages to detect and analyze gravitational waves. CyberShake
is a computational workflow designed to characterize earthquake hazards using the
Probabilistic Seismic Hazard Analysis (PSHA) technique. The Montage workflow
is designed to create large-scale astronomical image mosaics. Since different work-
flows of wide-ranging domains are frequently executed by different research groups
13
Cost‑aware workflow offloading in edge‑cloud computing using…
1
[Link]
13
S. Abdi et al.
Since the compared PSO, BLA, and HGA algorithms did not consider security
requirements in the task offloading problem, in the experiments in which WSEFC-
GA is compared with these algorithms, all tasks are considered public tasks. In the
experiments, the population size is 100 while the number of generations is 250. The
crossover and mutation rates are 85% and 1%, respectively. Parent selection is based
on K-way tournament selection which K = 3 in the experiments. We also normal-
ized the execution cost of a workflow by dividing its execution cost by costmin since
various workflows have different characteristics. Table 4 indicates the parameter set-
tings of the evolutionary algorithms.
6.2 Results
Figure 5 shows the normalized cost over changes in the deadline for small Epige-
nome workflow. This workflow is used in the domain of Biology and its structure
is depicted in Fig. 4a. We performed experiments for this workflow over changes
in the deadline. Tasks of this workflow are compute-intensive, and all tasks are
considered public tasks. It can be seen from Fig. 5, with the increase in the dead-
line the cost decreases since in tight deadlines more powerful node instances from
fog or cloud are selected which are more expensive. Notably, solutions generated
by WSEFC-GA show some variance from the optimal solutions of MPM particu-
larly when deadlines are tight. Mathematical programming models like MPM find
globally optimal solutions even in complex constrained scenarios such as those
with tight deadlines. However, as the deadline extends, WSEFC-GA demonstrates
an ability to produce solutions that closely approximate the optimal solutions
A comparison among the normalized cost for WSEFC-GA, PSO, BLA, HGA,
and CSA for large Epigenome workflow is depicted in Fig. 6. In this experiment,
the problem is feasible for deadlines greater than Dw >= 0.2 (h). Furthermore,
WSEFC-GA finds more cost-effective solutions compared to other algorithms,
especially when the deadline is tight, i.e., the problem becomes more complex.
While the HGA algorithm generally outperforms BLA and PSO, all these algo-
rithms outperform CSA, which can only produce feasible solutions.
Figure 7 indicates the normalized cost over changes in the data size of tasks
for the Montage workflow. The structure of the Montage workflow is shown in
Fig. 4d. This workflow processes an image and we performed the experiments
with different values for the image size, namely DS ={1, .., 10} GB. In this
13
Cost‑aware workflow offloading in edge‑cloud computing using…
Fig. 5 Normalized cost over changes in the deadline for small Epigenome workflow
Fig. 6 Normalized cost over changes in the deadline for large Epigenome workflow
experiment, the deadline is fixed, i.e., Dw = 0.4 (h), and the edge device cannot
perform all the workflow tasks.
Figure 7 demonstrates that the normalized cost of WSEFC-GA and MPM
increases with the increase in the data size (DS). With an increase in DS, the
data transfer time also increases, necessitating the selection of more powerful
node instances to meet the workflow deadline. It is observed that WSEFC-GA
achieves solutions close to the optimal cost. However, as the data size increases,
13
S. Abdi et al.
Fig. 7 Normalized cost over changes in the data size for small Montage workflow
Fig. 8 Normalized cost over changes in the data size for large Montage workflow
13
Cost‑aware workflow offloading in edge‑cloud computing using…
Fig. 9 Normalized cost over changes in the data size for CyberShake workflow
Figure 9 shows the impact of security requirements on the normalized cost for
small CyberShake workflow. As mentioned, when a task is private, it can only be
executed in the edge layer while a public task can be executed in the edge, fog, or
cloud layer. To perform this experiment, we considered a scenario in which work-
flow tasks are compute-intensive and executing all the tasks in the edge device is
not feasible to meet the deadline. Therefore, the scheduler outsources some or all
tasks to the fog or cloud layers to meet the workflow deadline.
In this experiment, when the security factor is 0, all the tasks are private while
the security factor 1 indicates that all tasks are public, and for example, security
factor= 0.2 indicates that 20 percent of tasks are public. In Fig. 9, when the secu-
rity factor = 0, the normalized cost is not shown, because executing all tasks in the
edge layer are not feasible. As shown, the optimal solutions of MPM are not affected
by the changes in the security factor. However, the cost of WSEFC-GA and CSA
increases with the increase in the security factor. WSEFC-GA and CSA are random-
based approaches and with the increase in security factor, the set of feasible solu-
tions increases since for each public task, a node in the edge, fog, or cloud can be
selected. However, WSEFC-GA is much more cost-efficient than CSA.
In this subsection, we express the convergence analysis and running time of the
MPM, WSEFC-GA, PSO, HGA, and BLA approaches. Figure 10 illustrates the
convergence of three evolutionary algorithms, namely WSEFC-GA, PSO, and
BLA, applied to the LIGO workflow, tracked over 500 generations. Since HGA
is a heuristic algorithm, it is excluded from this experiment. The population was
observed every 10 generation, and the average fitness value of the entire popula-
tion was recorded. Notably, both PSO and BLA exhibited rapid convergence after
13
S. Abdi et al.
approximately 200 generations, albeit producing solutions with high fitness values
compared to those achieved by the WSEFC-GA algorithm with a cost minimization
objective. In contrast, WSEFC-GA converged after 250 generations, maintaining
population diversity and demonstrating the capability to reach more cost-effective
solutions.
Table 5 shows the running time of the approaches for small (20 tasks) and
large (100 tasks) instances of Epigenome, Montage, Cybershake, and LIGO
workflows. For fair comparisons, the mathematical model is excluded from this
experiment, as it was only run for small instances of workflows. It is observed
that the computational overhead increases as the number of tasks increases for
all algorithms. Moreover, the running time of WSEFC-GA is better than that of
the other algorithms because we proposed problem-specific crossover, mutation,
and initial population strategies that generate feasible solutions efficiently. Since
BLA involves more complex operations, such as recruiting other workers to
collect food, it has more computational overhead than the PSO algorithm. HGA
uses a permutation-based scheduling algorithm and has the highest computational
overhead. Nevertheless, the running time of the proposed WSEFC-GA algorithm
is negligible compared to the workflow execution time. These results show that
13
Cost‑aware workflow offloading in edge‑cloud computing using…
the PSO algorithm converges faster in terms of iterations, but the proposed GA
has a lower computational overhead. This is because the proposed problem-
specific crossover, mutation, and initial population operators generate feasible
solutions more effectively. Moreover, the chromosome structure in the proposed
algorithm is designed to include the start time and run time of tasks. By
integrating start time and run time, the algorithm can efficiently manage and
satisfy data dependencies among tasks within a workflow, avoiding redundant
calculations, and resulting in a faster and more efficient scheduling algorithm.
Author contributions Somayeh Abdi was contributed to conceptualization, methodology, software, vali-
dation, formal analysis, writing—original draft. Mohammad Asjaei was contributed to conceptualization,
methodology, formal analysis, reviewing—manuscript. Saad Mubeen was contributed to conceptualiza-
tion, methodology, formal analysis, reviewing—manuscript
13
S. Abdi et al.
Declarations
Conflict of interest All authors declare that they have no conflict of interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License,
which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long
as you give appropriate credit to the original author(s) and the source, provide a link to the Creative
Commons licence, and indicate if changes were made. The images or other third party material in this
article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line
to the material. If material is not included in the article’s Creative Commons licence and your intended
use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permis-
sion directly from the copyright holder. To view a copy of this licence, visit [Link]
licenses/by/4.0/.
References
1. Aazam M, Zeadally S, Harras KA (2018) Offloading in fog computing for IoT: review, enabling
technologies, and research opportunities. Future Gener Comput Syst 87:278–289
2. Liu B, Meng S, Jiang X, Xu X, Qi L, Dou W (2021) A QoS-guaranteed online user data deploy-
ment method in edge cloud computing environment. J Syst Architect 118:102185
3. Shakarami A, Shakarami H, Ghobaei-Arani M, Nikougoftar E, Faraji-Mehmandar M (2022)
Resource provisioning in edge/fog computing: a comprehensive and systematic review. J Syst
Architect 122:102362
4. Yousefpour A, Fung C, Nguyen T, Kadiyala K, Jalali F, Niakanlahiji A, Kong J, Jue JP (2019)
All one needs to know about fog computing and related edge computing paradigms: a complete
survey. J Syst Architect 98:289–330
5. Tang F, Liu C, Li K, Tang Z, Li K (2021) Task migration optimization for guaranteeing delay
deadline with mobility consideration in mobile edge computing. J Syst Architect 112:101849
6. You Q, Tang B (2021) Efficient task offloading using particle swarm optimization algorithm in
edge computing for industrial internet of things. J Cloud Comput 10:1–11
7. Ren J, Qin T (2023) Decentralized blockchain-based and trust-aware task offloading strategy for
healthcare IoT. IEEE Internet Things J 11:829–847
8. Zhou H, Zhang Z, Li D, Su Z (2022) Joint optimization of computing offloading and service
caching in edge computing-based smart grid. IEEE Trans Cloud Comput 11:1122–1132
9. Prasad CR, Kumar S, Rao PR, Kollem S, Yalabaka S, Samala S (2022) Optimization of task
offloading for smart cities using IoT with fog computing-a survey. In: 2022 International Confer-
ence on Signal and Information Processing (IConSIP), IEEE, pp 1–5
10. Yeh C, JoG Do, Ko YJ, Chung HK (2023) Perspectives on 6 g wireless communications. ICT
Express 9(1):82–91
11. Liu Z, Dai P, Xing H, Yu Z, Zhang W (2021) A distributed algorithm for task offloading in
vehicular networks with hybrid fog/cloud computing. IEEE Trans Syst Man Cybern Syst
52(7):4388–4401
12. Akhlaqi MY, Hanapi ZBM (2023) Task offloading paradigm in mobile edge computing-current
issues, adopted approaches, and future directions. J Netw Comput Appl 212:103568
13. Ometov A, Molua OL, Komarov M, Nurmi J (2022) A survey of security in cloud, edge, and fog
computing. Sensors 22(3):927
14. Alhroob A, Samawi VW (2018) Privacy in cloud computing: intelligent approach (research poster).
In: 2018 International Conference on High Performance Computing and Simulation (HPCS), IEEE,
pp 1063–1065
15. Parikh S, Dave D, Patel R, Doshi N (2019) Security and privacy issues in cloud, fog and edge com-
puting. Proced Comput Sci 160:734–739
16. Abdi S, Ashjaei M, Mubeen S (2022) Cognitive and time predictable task scheduling in edge-cloud
federation. In: 2022 IEEE 27th International Conference on Emerging Technologies and Factory
Automation (ETFA), IEEE, pp 1–4
13
Cost‑aware workflow offloading in edge‑cloud computing using…
17. Bisikalo OV, Kovtun VV, Kovtun OV, Danylchuk OM (2021) Mathematical modeling of the avail-
ability of the information system for critical use to optimize control of its communication capabili-
ties. Int J Sens Wirel Commun Control 11(5):505–517
18. Buras N (1985) An application of mathematical programming in planning surface water storage 1.
JAWRA J Am Water Resour Assoc 21(6):1013–1020
19. Grossmann IE, Guillén-Gosálbez G (2010) Scope for the application of mathematical program-
ming techniques in the synthesis and planning of sustainable processes. Comput Chem Eng
34(9):1365–1376
20. Samuels JM (1965) Opportunity costing: an application of mathematical programming. J Account
Res 3(2):182–191
21. Gen M, Lin L (2023) Genetic algorithms and their applications. In: Springer handbook of engineer-
ing statistics, Springer, pp 635–674
22. Islam A, Debnath A, Ghose M, Chakraborty S (2021) A survey on task offloading in multi-access
edge computing. J Syst Architect 118:102225
23. Saeik F, Avgeris M, Spatharakis D, Santi N, Dechouniotis D, Violos J, Leivadeas A, Athanasopou-
los N, Mitton N, Papavassiliou S (2021) Task offloading in edge and cloud computing: a survey on
mathematical, artificial intelligence and control theory solutions. Comput Netw 195:108177
24. Kumari N, Yadav A, Jana PK (2022) Task offloading in fog computing: a survey of algorithms and
optimization techniques. Comput Netw 214:109137
25. Nguyen BM, Thi Thanh Binh H, The Anh T, Bao Son D (2019) Evolutionary algorithms to opti-
mize task scheduling problem for the IoT based bag-of-tasks application in cloud-fog computing
environment. Appl Sci 9(9):1730
26. Nan Z, Wenjing L, Zhu L, Zhi L, Yumin L, Nahar N (2022) A new task scheduling scheme based on
genetic algorithm for edge computing. Comput Mater Contin 71(1):843–854
27. Bitam S, Zeadally S, Mellouk A (2018) Fog computing job scheduling optimization based on bees
swarm. Enterp Inf Syst 12(4):373–397
28. Abohamama AS, El-Ghamry A, Hamouda E (2022) Real-time task scheduling algorithm for IoT-
based applications in the cloud-fog environment. J Netw Syst Manage 30(4):54
29. Wang X, Ma L, Li H, Yin Z, Luan T, Cheng N (2022) Digital twin-assisted efficient reinforcement
learning for edge task scheduling. In: IEEE 95th Vehicular Technology Conference: (VTC2022-
Spring). IEEE 2022, pp 1–5
30. Lou J, Tang Z, Jia W, Zhao W, Li J (2023) Startup-aware dependent task scheduling with bandwidth
constraints in edge computing. IEEE Trans Mobile Comput 23:1586–1600
31. Liu H, Xin R, Chen P, Zhao Z (2022) Multi-objective robust workflow offloading in edge-to-cloud
continuum. In: 2022 IEEE 15th International Conference on Cloud Computing (CLOUD), IEEE, pp
469–478
32. Xu M, Mei Y, Zhu S, Zhang B, Xiang T, Zhang F, Zhang M (2023) Genetic programming for
dynamic workflow scheduling in fog computing. IEEE Trans Serv Comput 16:2657–2671
33. Saeed A, Chen G, Ma H, Fu Q (2023) A memetic genetic algorithm for optimal IoT workflow
scheduling. In: International Conference on the Applications of Evolutionary Computation (Part of
EvoStar), Springer, pp 556–572
34. El Haber E, Nguyen TM, Assi C (2019) Joint optimization of computational cost and devices energy
for task offloading in multi-tier edge-clouds. IEEE Trans Commun 67(5):3407–3421
35. Alsurdeh R, Calheiros RN, Matawie KM, Javadi B (2018) Cloud resource provisioning for com-
bined stream and batch workflows. In: IEEE 37th International Performance Computing and Com-
munications Conference (IPCCC). IEEE 2018, pp 1–8
36. Liu L, Chang Z, Guo X, Mao S, Ristaniemi T (2017) Multiobjective optimization for computation
offloading in fog computing. IEEE Internet Things J 5(1):283–294
37. Chen S, Chen B, Tao X, Xie X, Li K (2022) An online dynamic pricing framework for resource
allocation in edge computing. J Syst Architect 133:102759
38. Bharathi S, Chervenak A, Deelman E, Mehta G, Su M-H, Vahi K (2008) Characterization of scien-
tific workflows, in, third workshop on workflows in support of large-scale science. IEEE 2008:1–10
39. Openalpr automatic license plate recognition. [Link] [Link]. Accessed 22 Dec 2020
40. Wu H, Knottenbelt W, Wolter K, Sun Y (2016) An optimal offloading partitioning algorithm in
mobile cloud computing. In: International Conference on Quantitative Evaluation of Systems,
Springer, pp 311–328
13
S. Abdi et al.
41. Aceto L, Morichetta A, Tiezzi F (2015) Decision support for mobile cloud computing applications
via model checking. In: 2015 3rd IEEE International Conference on Mobile Cloud Computing, Ser-
vices, and Engineering, IEEE, pp 199–204
42. Salaht FA, Desprez F, Lebre A (2020) An overview of service placement problem in fog and edge
computing. ACM Comput Surveys CSUR 53(3):1–35
43. Qin S, Pi D, Shao Z (2022) Ails: A budget-constrained adaptive iterated local search for workflow
scheduling in cloud environment. Expert Syst Appl 198:116824
44. Du J, Leung JY-T (1989) Complexity of scheduling parallel task systems. SIAM J Discret Math
2(4):473–487
45. Ibrahim M, Nabi S, Hussain R, Raza MS, Imran M, Kazmi SA, Oracevic A, Hussain F (2020) A
comparative analysis of task scheduling approaches in cloud computing. In: 20th IEEE/ACM Inter-
national Symposium on Cluster, Cloud and Internet Computing (CCGRID). IEEE 2020, pp 681–684
46. Michael LP (2018) Scheduling: theory, algorithms, and systems. Springer
47. Huang J, Hu H (2024) Hybrid beluga whale optimization algorithm with multi-strategy for func-
tions and engineering optimization problems. J Big Data 11(1):3
48. Mirjalili S, Mirjalili SM, Lewis A (2014) Grey wolf optimizer. Adv Eng Softw 69:46–61
49. Caprolu M, Di Pietro R, Lombardi F, Raponi S (2019) Edge computing perspectives: architectures,
technologies, and open security issues. In: 2019 IEEE International Conference on Edge Computing
(EDGE), IEEE, pp 116–123
50. Varghese B, Reano C, Silla F (2018) Accelerator virtualization in fog computing: Moving from the
cloud to the edge. IEEE Cloud Comput 5(6):28–37
51. Juve G, Chervenak A, Deelman E, Bharathi S, Mehta G, Vahi K (2013) Characterizing and profiling
scientific workflows. Futur Gener Comput Syst 29(3):682–692
52. De Maio V, Brandic I (2018) First hop mobile offloading of dag computations. In: 18th IEEE/ACM
International Symposium on Cluster, Cloud and Grid Computing (CCGRID). IEEE 2018, pp 83–92
Publisher’s Note Springer Nature remains neutral with regard to jurisdictional claims in published maps
and institutional affiliations.
13