Noname manuscript No. (will be inserted by the editor)
Heuristic Min-conflicts Optimizing Technique For Load Balancing On Fog Computing Muhammad Babar Kamal · Nadeem Javaid · Syed Aon Ali Naqvi · Hanan Butt · Talha Saif · Muhammad Daud Kamal
Received: May 26, 2018 / Accepted: May 31, 2018
Abstract Recently one of the emerging research areas of Smart Grid ( SG ) is the integration of Internet-of-Things ( IoTs ) with SG services to improve its capability. IoTs are interrelated digital machines, objects, and computing devices which have the ability to transfer information over the internet without human interaction with the system. SG is a modern energy management grid for smart use of resources and to optimize Peak Average Ratio ( PAR ) of energy consumption. Cloudbased frameworks are introduced for the management of energy and efficient utilization of resources. Cloud is a centralized system which provides services to the end-user. Cloud computing faces problems like high latency and security issues. For low latency, better control of the system and high-security edge-cloud computing is introduced. The cloud-fog based architecture provides security, control of data, quick response and processing time. In fog computing load balancer distribute requests of end-user to Virtual Machines ( VMs ). In this paper a load balancing scheduling algorithm is presented namely; Min-conflicts scheduling algorithm. The algorithm takes a heuristic approach to solve a Constraint Satisfaction Problem ( CSP ). Keywords Fog computing, Cloud computing · Load balancing algorithm · Resource allocation · Virtual machines · Optimization algorithm
1 Introduction A repaid growth of the Internet of Things ( IoTs ) is observed in recent years dominantly in appliances of daily use. [1] integrates IoTs in Smart Grid ( SG ) , which helps to enhance the capability of SGs. This field has a large scope of expansion. Cloud computing is a model which provides facilities and services to the user. Cloud computing is rapidly progressing. However, it faces challenges like high latency, lack of mobility, less reliable, security and awareness of location which needs to be resolved [2] [3]. In [4] authors introduce architecture of decentralized cloud computing for power generating grid. In [5] the authors consider the behavior of load shifting using optimizing techniques for scheduling of charging and discharging of Electric Vehicles in fog computing. In [6] the authors use fog computing which provides the network of cloud-fog based architecture for storage, to achieve low latency, control of data and administration of the system in one hop proximity to the end-user. [7] examine the fog computing on SG data management system while [8] uses fog computing to achieve parallel processing system, real-time information retrieval and secure access to data. In this paper, a heuristic load balancing algorithm on fog computing is presented. The load balancer allocates Virtual Machines ( VMs ) to the user request for processing of data. The Min-conflicts algorithm is implemented to achieve quick Response Time ( RT ) and higher processing by resolving conflicts of Constraint Satisfaction Problem ( CSP ).
F. Muhammad Babar Kamal Comsats University, Islamabad Pakistan Tel.: +923156520033 E-mail:
[email protected] S. Nadeem Javaid Comsats University, Islamabad Pakistan E-mail:
[email protected]
2
Muhammad Babar Kamal et al.
1.1 Motivation In recent years, we have seen exponential growth in the IoT creating millions of new endpoints. As discussed in [9] IoTs services include electric vehicles, wireless sensors and SG. Cloud extended fog computing is introduced for the handling of resources providing low latency, heterogeneity, mobility and location awareness. Fog computing provides a rich platform for portfolios, applications and new services working as edged-cloud in one-hop proximity. In [10] the authors propose a systematic way of cloud computing services integrated into SG, three aspects are considered, i.e information-management, security and energy management in SG architecture. In [11] uses heuristic algorithm, where electricity management controller is used in SG to minimize Peak-to-Average Ratio ( PAR ) , maximize customer comfort and efficient integration of renewable energy-source to the system. [12] proposes a novel bio-inspired technique which is used for load management of VM in the cloud computing to find an optimal solution for efficient utilization of resources. Inspired by [9] [10] [11] [12] load balancing technique for fog resource utilization is introduced in this paper.
1.2 Contribution Fog architecture provides many benefits to the end-user. Optimal resources are allocated to end-user through load balancing, following are the contributions of this paper: Achieving better load optimization in on-peak hours. Low latency due to fog less distance from end-user. Fog implementation reduces the processing time of the end-user request. The Min-conflict algorithm implementation provides better performance results as compared to Throttled and Round Robin ( RR ) algorithms. Simulation of the scenario on Min-conflicts scheduling algorithm achieves effective scheduling under PAR constraint, considering consumer preferences.
2 Related Literature Review This section comprises of recent related literature. [13] authors work is based on a bio-inspired technique for load balancing namely firefly algorithm. [14] implements different load balancing techniques RR, Throttled, First Come First Serve ( FCFS ) and equally spread current execution. Authors compare these algorithms and concluded that RR shows better results in their proposed scenario. Authors in [15] introduce a novel technique in cloud computing; namely Advance Max Sufferage ( AMS ) algorithm. Implementation of AMS achieve better results of load balancing. [16] shows an analytical comparison of load balancing algorithms. Authors implemented central queuing, equally spread current execution, honeybee, Throttled and RR algorithms. The simulation results show that equally spread current execution load balancing algorithm achieves better client satisfaction and optimal resource utilization by reducing processing time. In [17] authors consider a distributed auction model in which buyers place bids to the seller, i.e. mobile devices for resource allocation and the sellers makes the auction decisions locally acting as an auctioneer. An auction system is designed to allocate resources to smart phones, and the price paid for each resource is determined. Efficient evaluation of payment is implemented to detect any untruthful and dishonest activity of sellers is detected. The proposed Auction system has many desirable properties, i.e. individual rationality, budget balancing, computation efficiency and truthfulness. In paper [18], the authors proposed a novel multi-tenant computing framework for cloud computing. Businesses are considered in the paper which provide services of cloud computing such as resources of VMs to customers. An Analytical model is proposed which simultaneously investigate and address RT to end-user which covers two factors of RT i.e. percentile of RT which gives the maximum time required for a sub-application to execute, Mean of RT which gives mean RT. The workload is allocated and optimization of service-performance is done in the proposed maxmin cloud algorithm through load balancing of VMs according to their capability. Heterogenous VMs are utilized in virtual infrastructure where VMs have different numbers of virtual CPUs which are allocated to subtasks. The proposed probabilistic framework which implements cloud computing services. The model based on framework determines important features and removes concern in cloud environment which include multi tenancy. The characteristics of multi-tenant model are heterogeneous VMs and Stochastic Response Time ( SRT ) which serves the request with a general probability distribution.
Heuristic Min-conflicts Optimizing Technique For Load Balancing On Fog Computing
3
Algorithm(s) Energy management system [20] Ant colony optimization [21]
Objective (s) Peak to average ratio and load minimization
Contribution (s) Better performances of Energy management system
Shortcoming (s) Base function could be improved
Improve the simulation of fuzzy controller
Particle swarm optimizationpattern search [22]
Reliability, Power utilization and environmental friendly
Better performance achieved than original Ant colony optimization Improvement of cost and better results for scenarios
More parameters of fuzzy system needs to be defined Higher emission of Hydrogen fuel cells can be replaced
Table 1: Analysis of scheduling techniques.
Two features of SRT are analytically characterized for requests in closed form, namely mean of RT and percentile of RT. These two metrics are mainly used for evaluating the efficiency of services in cloud infrastructure. The allocation of workload, i.e. scheduling of tasks is critical in the heterogeneous computing environment of the cloud. Here, the workload is efficiently allocated which improve service performance. However, to optimize load allocation in the heterogeneous cloud computing environment is generally categorized as NP hard problem.The proposed framework for cloud services derives resource distribution algorithm, namely max min cloud for allocation of sub-requests to the optimal VMs in polynomial time. The algorithm is implemented on the bases of load-balancing where execution time for sub-task is deterministic. The condition for getting less RT for the task such as execution times of the subtasks are close as much as possible. The proposed algorithm uses the greedy approach to customize m heterogeneous sub-tasks to fix set of VM n. The authors in [19] introduces cloudlets in Mobile Cloud Computing ( MCC ) . Smoother interaction of smart mobile with the cloud in one-hop proximity is achieved. Cloudlets provide high quality of service to customers. To motivate the cloudlet for sharing of Resources Incentive based system is introduced namely Auction model. In this model buyers bids, for resources and Sellers provide resource pool for particular ask, Auctioneers are the intermediate agents in the process where resources are auctioned. Authors proposed algorithm based on the Auction model called Incentive-Compatible-Auctions-Mechanism ( ICAM ) to serve nearby smart phones. Resources are efficiently utilized and latency is reduced and workload on the centralized cloud is balanced. ICAM provide these desirable qualities live truthfulness, budget balancing, efficient resource allocation, computational efficiency and payment and clearing price in polynomial time. The paper utilizes an auspicious paradigm of cloudlets in MCC to provide resources to the nearby smartphones. Heterogeneous valuation for smartphones in cloudlet is utilized. The smartphone employ services of cloudlet. A double auction algorithm ICAM is introduced to achieve better latency and incentive capable system. The system calculate the price and ensure payment. Unlike other auction mechanisms, ICAM utilizes heterogenous VMs. Analysis of different scheduling techniques is shown TABLE 1.
3 System Model In this section a three-layer architecture of cloud-fog computing is presented. In fig.1 the proposed model which is comprised of three-layers, i.e. user-end layer, core-cloud layer, and fog layer. Core-cloud is centralized internet network consisting of remote servers for processing, storage, and management of data. Fog computing is an extension of core-cloud at the edge of the network. Fog and end-user communicate in one-hop proximity to reduce latency. There are a limited number of VMs in a fog which provide services to end-users i.e. processing, storage and management of data. There are two regions, i.e. Europe and Asia, in our proposed system model. Europe and Asia are selected as region 1 and region 2 respectively because a dense concentration of population lives in these two regions. Efficient energy management is required in this part of the world. For better energy management, the load of peak hour is transfer to off-peak hours . Each region has one fog and three clusters of buildings. The Number of VMs vary on these fogs from 30-45. The average user from each cluster during off-peak hours are up to 50 and on-peak hour user reaches 200. Clusters are connected to fog and macro grid. The user request for resources from fog in response fog allocates resources to the end-user.
4
Muhammad Babar Kamal et al.
Data center Servers
CORE CLOUD LAYER
CLOUD
VMn
VM2
VM1
VM1
SERVER
SERVER
LOAD BALANCER
FOG LAYER
CLUSTER 1
END-USER LAYER
VMn
LOAD BALANCER
FOG 1
CLUSTER 2
VM2
FOG 2
CLUSTER 3
CLUSTER 1
CLUSTER 2
CLUSTER 3
REGION 2 ASIA
REGION 1 EUROPE
Fig. 1: System Model
The fog communicates with cloud if the fog does not have sufficient resources to fulfill the user request. The deployment of fog in layered architecture gives us less latency, high processing speed and less RT. VMs are installed on fogs for handling user request, storage, and memory requirement. VMs are allocated through load balancing, different optimizing algorithms are utilized for this purpose.
3.1 Problem Formulation Fog resources consist of VMs. Requests are assigned to VMs for processing. Main performance parameters for fog computing includes RT, cost and processing time. Load scheduling techniques are used for optimizing of the workload of fog by assigning VMs accordingly. In the model let C be the numbers of clusters C = {c1 , c2 , . . . , cc } and N numbers of users per cluster N = {n1 , n2 , . . . , nn }. There are R numbers of requests from a user per hour R = {r1 , r2 , . . . , rm }. Set of VMs is represented as V M = {vm1 , vm2 , . . . , vmy }. R requests are sent to fog which assigns VMs to request through load balancing. The total number of requests from a cluster of N users are given as:
Rcluster =
m X (ri )
(1)
i=1
And total request:
Rtotal =
c X
(Rcluster )
(2)
cluster=1
By mapping Rtotal to y number of VMs performance parameters are affected [23] where heavy load of requests cause delay.
Heuristic Min-conflicts Optimizing Technique For Load Balancing On Fog Computing
5
3.1.1 Cost The cost can be calculated for VMs as CostV M = Costserver + Coststorage
array
+ Costoperating
system
(3)
The amount of data is considered in GigaBytes ( GBs ) where the cost of data transfer can be calculated as: CostDT = Cost of Data(GB) ∗ Data(GB)
(4)
3.1.2 Processing Time Processing time Tp can be calculated as start time minus end time. Tp = Tstart − Tend
(5)
Time for allocating r request to vmy is processing time of r request at vmy i.e. Pry : Pry =
Length of r vmy
(6)
Where λry defines the status of request r at vmy as either assigned or not. The conflict for constraint implies non-allocation of VMs where the number of allocated VMs is known. Reduction of conflicts gives us better processing time. Objective of the algorithm is to minimize processing time: M in Tp =
y X r X (λji ∗ Pji )
(7)
j=1 i=1
3.1.3 RT RT is the sum of request processing time and delays time. RT = Tp + Td
(8)
Where Td is delay time when the request rm reaches to the fog. Algorithm 1 Min-conflicts 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13:
Min-conflicts parameters initialization: CSP Input: VM-present-state,initial assignment of random state to VM. Input: VM-maximum-steps, the maximum number of steps permitted until scrambling. Output: VM solution state or failure. for n = 1:maximum-steps do if VM-present-state has no conflicts then return VM-present-state end if variable