EdgePV: Collaborative Edge Computing Framework for Task Offloading
EdgePV: Collaborative Edge Computing Framework for Task Offloading
Edge Servers
cost for more than 40% with high task arrival rate
compared with a set of existing algorithms. Worker node Worker node Worker node
wired link
χkj c
RB e
(ni ), RB (ni ), ξni ≥ b(k), ni ∈ N (28)
ΞBp (k) = WBp , ∀k ∈ Kp (16)
tm (k)ξp ;
X tc , te , tp ≤ tm (k) (29)
Ep (k) = χkj fkj ep (17)
Remarks:
j∈ð(k)
• Function (22) includes dual objectives: minimizing the
where ep is a coefficient, that can be achieved by: cost of offloading computation tasks and maximizing
p
ep = (RC (ni ))2 (18) the PV rewards when the tasks are offloaded to PVs
where η is a damping factor within (0,1).
where denotes the energy coefficient. • Constraint (23) ensures that each task replica is only
Total cost of offloading a task k to a PV: deployed at one worker node.
• Constraint (24) guarantees that no more than 50% the
Ξpk = ΞCp (k) + ΞMp (k) + ΞBp (k) + ςEp (k); (19)
number of task replicas can be placed at the same PV
where ς is energy cost coefficient. node.
• Constraint (31) makes sure that total number of replicas
3) PVs’ Utility: To encourage PVs to sell their idle
resources while parking in the parking lots, owners of PVs scheduled are at least equal to the required replicas of
should receive the rewards when they accept to process the corresponding task.
• Constraints (26),(27), and (28) assure that the residual
tasks on their vehicles. Let ϕp represent the revenues by
accepting the tasks and the utility of a PV can be calculated resources of the worker nodes (e.g. Cloud, Edge, PVs)
satisfies the capacity requirements of the task.
• Constraints (29) ensures the selected nodes satisfy the When a chromosome is established by N potential genes
latency constraints. that have qualified the feasibility process, such is defined
IV. O UR P ROPOSED G ENETIC A LGORITHM as a feasible solution for a task request.
Fitness Function: Our objective is to minimize the
A. Descriptions of Genetic Algorithm scheduling costs and maximize the network utility when
GA algorithm is a mature metaheuristic that is motivated replicas of a given task are offloaded to PVs. Fitness values
by the Darwin evolution principle through natural selection, are utilized to evaluate the quality of a scheduling solution,
including four major operations: initialization, selection, so higher fitness value represents a good solution.
crossover and mutation 1 . To solve BIP problem, we present X 1 1 1
a distributed parallel GA-based algorithm that operates on a F(k) = c Ackj + e Aekj + ((1 − η) p + ηϕpk )Apkj
Ξ Ξk Ξk
predefined number of independently machines, denoted as p, j∈ðk k
to explore feasible solutions widely known as chromosomes. (31)
The design of our proposed parallel algorithm is depicted in New generations: In this paper, we randomly select
Fig 2 in which p is set to 16. As illustrated, the offloading chromosomes to become parents to generate new population.
procedures are successively working under a master node New chromosomes are intentionally generated to produce
(e.g. synchronization). Several working nodes run a GA new generation as a result of crossover and mutation
algorithm to discover as many feasible solutions as possible operations. Aimed at improving the diversity, the population
for replica scheduling. The best solutions from the worker updates these new generated generations so it is consequently
nodes are synchronized to select the final solution for task evolved, increasing the possibility to achieve near-optimal
offloading. Our proposed algorithm in this study assumes to scheduling solution.
schedule multiple task replicas at once instead of sequentially B. Terminations and Synchronization
mapping. A parallel operation is typically consisted of concurrent
Start
processes, and each accomplishes its job at different time.
A set of replicas of task k
Waiting until all tasks finish their assignments is frustrated
0 1
as one or more tasks might take longer time to be done (e.g.
v
Population Population Population
Initialization Initialization deadlock). Thus, if there is no better solution to be found in
Initialization
Selection Selection
t times; where t is denoted as a termination parameter, the
Selection
Sorting Sorting best scheduling solution for the corresponding task request,
Sorting
Termination Termination
based on fitness function values. If accepted, the given task
Termination
Finish
V. C OMPARED A LGORITHMS
We propose a metaheuristic algorithm that minimizes the
Fig. 2: Parallel operation scheme embedding cost while improves the PVs utility efficiently by
Chromosome: A chromosome Cf represents a scheduling selecting proper worker nodes to run the task replicas. All
solution of a set of replicas of a given task request that are proposed algorithms allows to schedule multiple requested
selected from the available nodes in random. Each gene task replicas into the same worker node, but the proportion
in a chromosome involves a mapping solution for a single of the number of replicas placed in this node cannot exceed
task replica. If there are G genes and M chromosomes, 50% (except Cloud/Edge nodes) in order to ensure the
the initial population P (M xG size) at the k th working service reliability. This setting can be flexibly changed
machine can be delineated as below: by SP. We investigate the scheduling efficiency of our
proposed GA-based algorithm by comparing with some
g1 · · · g1j · · · g1G
1
C1 heuristic algorithms including: Baseline 1, Baseline 2, and
C2
g21 · · · g2j · · · g2G Baseline 3. Baseline 1 prefers Kubernetes default scheduler
.. .. .. ..
. . . . with filtering and scoring procedures while Baseline 2
. . . . . .
P= Cf =
1 j G (30) schedules online tasks by selecting worker nodes for task
gf · · · gf · · · gf offloading in random. Furthermore, Baseline 3 deploys
. . .. .. .. ..
.. .. . . . . branch and bound selection policy to handle incoming tasks
CM gM1 j
· · · gM G
· · · gM [17]. There are basically three performance metrics for
performance evaluation including task acceptance ratios
1
Due to page limitation, more details about GA algorithm can (A/R), costs and accumulated utility.
be found in [16]
TABLE I: Simulation Parameter Settings
1.0 Cloud
Edge
Parameter Values
Cloud-Edge
Cloud-Edge-PVs
Maximum parking capacity 50
0.8
Total simulation time 30,000 seconds
Vehicle lifetime [480-14400] seconds
Acceptance ratio
0.6
C c / M c / Bc 50GHz/1000MB/1Gbps
0.4
C e / Me 20GHz / 500MB
W{Cc ,Mc ,Bc } 750
0.2
W{Ce ,Me } 250
W{Cp ,Mp ,Bp } 10
0.0 Channel Bandwidth Bp 10 MHz
1.3W / 3 × 10−13 / 2
20 40 60 80 100 120
Task arrival rate PT X / N0 / σ
CPU Parked Vehicles Cp [1.5-2.0] GHz
Fig. 3: Acceptance ratio Input data size χk [100 - 300] kb
CPU cycles per bit fk 1000 cycles
200
Cloud Memory requests m(k) [20-50] MB
Edge
175
Cloud-Edge Tolerable latency of tasks tm (0-100] ms
150
Cloud-Edge-PVs
Arrival request rates A/R [10-120]
Request replications ð(k) [2 - 10]
Average cost
125
rpc / rpm 10 / 100
100
75
40% compared to Cloud-Edge and Cloud architectures at the
task arrival rate of 120, respectively. Cloud or edge itself gets
50
lowest acceptance ratio due to their limited resource capacity
25 during peak hours. By preferring PVs for task offloading,
20 40 60 80 100 120 Cloud-Edge-PVs achieved the lowest average cost values
Task arrival rate
compared to all compared platforms as illustrated in Fig. 4.
Fig. 4: Average costs between architectures In performance evaluation between proposed algorithms as
illustrated in Fig. 5, Baseline 1 performed worst in terms of
VI. N UMERICAL R ESULTS average costs due to its allocating strategies through filtering
and scoring procedures while Baseline 2 based on a random
A. Simulation setup strategy to select the worker nodes performed better than
We have developed a discrete event simulator to evaluate Baseline 1. Amongst baseline algorithms, Baseline 3 was
the proposed algorithms. PVs dynamically arrive and depart originally designed to target reducing the offloading cost so
from a parking lot with 50 free parking spots. In fact, the its performance was comparative to our proposed algorithm,
parking lot can fully be occupied, but we assume that the but EdgeGA was still better than Baseline 3 until arrival rate
parking capacity remains at least 50% up to 85% in peak of 80 and seemed to be lightly the same afterward as shown
hours since not all of PVs are willing to sell their resources or in Fig. 5a. Online heterogeneous tasks were mostlikely
are qualified to join into the network to provide the services. to be assigned to PVs which expectedly produce lower
Furthermore, it is observed that parking duration of PVs is offloading costs. In utility metric, EdgeGA outperformed all
ranging from 08 to 240 minutes [1] or 30 to 120 minutes compared algorithms following Baseline 2,Baseline 3 and
[12]. More than 85% of PVs spend maximum three hours in Baseline 1 respectively as depicted in Fig. 5b. The reason is
a parking lot and serviceability probability of PVs achieves that EdgeGA simultaneously took both cost and utility into
around 90% at 60 minutes [1]. In this paper, the accumulative account driven by an efficient fitness function (31). Besides,
parking duration of PVs is following Poisson distribution we evaluated the availability of PVs regarding the acceptance
with λ = 3600. As discussed in previous sections, the ratios on several arrival rates as depicted in Figure 5c. It has
online requested tasks can be classified into delay-sensitive been demonstrated that depending on the selected arrival
and delay-insensitive tasks. If the delay tolerance of a task rates, each had different preferable PV availability. For
exceeds 20 ms, we considered it as a delay-sensitive demand. example, arrival rates (10, 20, 30, 40, 50) required 60%
Our simulation run approximately for 8 hours (peak business availability of PVs to exceed 80% acceptance ratios while
working time) and the simulator will update the PVs every arrival rates of 60 and 80 needed to reach 80% and 100%
20 minutes. Additionally, energy coefficient , coefficient to obtain the same result, respectively. These information
for energy price ρ and unit price for each CPU cycle σ are is vital for the network planners to achieve desired Key
set to 10−24 , 0.003 and 2 × 10−9 [12], respectively. Details Performance Indicators (KPIs) by adopting appropriate
of simulation parameters can be found in Table I. strategies. For instance, SP may increase user incentives to
B. Performance Results appeal more PVs join into the network, offload to another
As illustrated in Fig. 3, Cloud-Edge-PVs paradigm cluster or expand edge server capacity. Furthermore, our
extends the resource availability of the network that increases proposed GA-based algorithm successfully processed a
the possibility of accepting the incoming requests more than given task in average 1.217ms compared to 14.725ms
200
Baseline_1 Baseline_1 1.0
140
Baseline_2 Baseline_2
180
Baseline_3 Baseline_3
120 EdgeGA EdgeGA
160 0.8
Acceptance ratio
100 140
Average utility
Average cost
0.6
80 120
100 ArrivalRate=10
60 0.4 ArrivalRate=20
ArrivalRate=30
80
ArrivalRate=40
40
ArrivalRate=50
60 ArrivalRate=60
0.2
ArrivalRate=80
20
40
20 40 60 80 100 120 20 40 60 80 100 120 0 20 40 60 80 100
Task arrival rate Task arrival rate Availability (%)
(a) Average offloading cost (b) Average utility (c) A/R towards PV availability
Fig. 5: Performance evaluation between compared algorithms
in sequential GA operation. This superior execution-time [6] W. He, G. Yan, and L. D. Xu, “Developing vehicular data
performance attained by deploying the parallel scheme for cloud services in the iot environment,” IEEE Transactions on
GA algorithm as proposed in Fig. 2. This execution time is Industrial Informatics, vol. 10, no. 2, pp. 1587–1595, 2014.
very competitive, and it somehow lifts the curse of possibly [7] F. Dressler, P. Handle, and C. Sommer, “Towards a vehicular
cloud - using parked vehicles as a temporary network and
high computation time when running GA algorithms. storage infrastructure,” in Proceedings of the 2014 ACM
ACKNOWLEDGEMENT International Workshop on Wireless and Mobile Technologies
This research was supported by the Natural Sciences and for Smart Cities, ser. WiMobCity ’14. New York, NY,
Engineering Research Council of Canada (NSERC) Engage USA: Association for Computing Machinery, 2014, p. 11–18.
[Online]. Available: https://doi.org/10.1145/2633661.2633671
grant (EGP 543449-19).
[8] E. Al-Rashed, M. Al-Rousan, and N. Al-Ibrahim,
VII. C ONCLUSION “Performance evaluation of wide-spread assignment schemes
In this paper, we have studied the collaborative framework in a vehicular cloud,” Vehicular Communications, vol. 9,
where PVs are potentially considered as an extension for the pp. 144 – 153, 2017. [Online]. Available: http://www.
existing cloud-edge computing infrastructure to handle on- sciencedirect.com/science/article/pii/S2214209616301863
line container-based task offloading in peak hours. We have [9] T. Kim, H. Min, and J. Jung, “Vehicular datacenter modeling
devised Kubernetes, a container orchestrator, deployed at for cloud computing: Considering capacity and leave rate
of vehicles,” Future Generation Computer Systems, vol. 88,
edge servers as master nodes, while remote cloud, edge itself
pp. 363 – 372, 2018. [Online]. Available: http://www.
and PVs perform as worker nodes. Extensive experiments sciencedirect.com/science/article/pii/S0167739X18300487
demonstrated that our proposed collaborative paradigm [10] C. Li, S. Wang, X. Huang, X. Li, R. Yu, and F. Zhao, “Parked
not only extends the computation resources of existing vehicular computing for energy-efficient internet of vehicles:
network infrastructure by taking advantage of high on-board A contract theoretic approach,” IEEE Internet of Things
computers of PVs efficiently, but also brings a flexible, Journal, vol. 6, no. 4, pp. 6079–6088, 2019.
agile and reliable framework for task offloading problems. [11] S. Raza, W. Liu, M. Ahmed, M. R. Anwar, M. A. Mirza,
Q. Sun, and S. Wang, “An efficient task offloading scheme
In future work, we consider sophisticated algorithms (e.g.
in vehicular edge computing,” Journal of Cloud Computing,
machine learning techniques) for task offloading problem. vol. 9, no. 1, p. 28, Jun 2020. [Online]. Available:
R EFERENCES https://doi.org/10.1186/s13677-020-00175-w
[1] X. Huang, R. Yu, J. Liu, and L. Shu, “Parked vehicle edge [12] Y. Cao, Y. Teng, F. R. Yu, V. C. M. Leung, Z. Song,
computing: Exploiting opportunistic resources for distributed and M. Song, “Delay sensitive large-scale parked vehicu-
mobile applications,” IEEE Access, vol. 6, pp. 66 649–66 663, lar computing via software defined blockchain,” in 2020
2018. IEEE Wireless Communications and Networking Conference
[2] F. H. Rahman, A. Yura Muhammad Iqbal, S. H. S. Newaz, (WCNC), May 2020, pp. 1–6.
A. Thien Wan, and M. S. Ahsan, “Street parked vehicles [13] X. Hou, Y. Li, M. Chen, D. Wu, D. Jin, and S. Chen,
based vehicular fog computing: Tcp throughput evaluation “Vehicular fog computing: A viewpoint of vehicles as the
and future research direction,” in 2019 21st International Con- infrastructures,” IEEE Transactions on Vehicular Technology,
ference on Advanced Communication Technology (ICACT), vol. 65, no. 6, pp. 3860–3873, 2016.
2019, pp. 26–31. [14] X. Wang, Z. Ning, and L. Wang, “Offloading in internet of
[3] D. Han, W. Chen, and Y. Fang, “A dynamic pricing strategy vehicles: A fog-enabled real-time traffic management system,”
for vehicle assisted mobile edge computing systems,” IEEE IEEE Transactions on Industrial Informatics, vol. 14, no. 10,
Wireless Communications Letters, vol. 8, no. 2, pp. 420–423, pp. 4568–4578, 2018.
2019. [15] X. Huang, P. Li, and R. Yu, “Social welfare maximization
[4] O. Fadahunsi and M. Maheswaran, “Locality sensitive in container-based task scheduling for parked vehicle edge
request distribution for fog and cloud servers,” Service computing,” IEEE Communications Letters, vol. 23, no. 8,
Oriented Computing and Applications, vol. 13, no. 2, pp. 1347–1351, 2019.
pp. 127–140, Jun 2019. [Online]. Available: https: [16] M. Mitchell, An Introduction to Genetic Algorithms. Cam-
//doi.org/10.1007/s11761-019-00260-2 bridge, MA, USA: MIT Press, 1998.
[5] S. Arif, S. Olariu, J. Wang, G. Yan, W. Yang, and I. Khalil, [17] H. Zhu and C. Huang, “VNF-B&B: Enabling edge-based
“Datacenter at the airport: Reasoning about time-dependent NFV with CPE resource sharing,” in 2017 IEEE 28th Annual
parking lot occupancy,” IEEE Transactions on Parallel and International Symposium on Personal, Indoor, and Mobile
Distributed Systems, vol. 23, no. 11, pp. 2067–2080, 2012. Radio Communications (PIMRC), 2017, pp. 1–5.