Resource Allocation over cloud-fog framework using BA

3 downloads 0 Views 609KB Size Report
Farkhnada Zafar, Nadeem Javaid∗, Kanza Hassan, Shakeeb Murtaza, Saniah. Rehman, and Sadia Rasheed. Abstract. Edge computing or fog computing (FG) ...
Resource Allocation over cloud-fog framework using BA Farkhnada Zafar, Nadeem Javaid∗ , Kanza Hassan, Shakeeb Murtaza, Saniah Rehman, and Sadia Rasheed

Abstract Edge computing or fog computing (FG) are introduced to minimize the load on cloud and for providing low latency. However, FG is specified to a comparatively small area and stores data temporarily. A cloud-fog based model is proposed for efficient allocation of resources from different buildings on fog. FG provides low latency hence, makes the system more efficient and reliable for consumer’s to access available resources. This paper proposes an cloud and fog based environment for management of energy. Six fogs are considered for six different regions around the globe. Moreover, one fog is interconnected with two clusters and each cluster contains fifteen numbers of buildings. All the fogs are connected to a centralized cloud for the permanent storage of data. To manage the energy requirements of consumers, Microgrids (MGs) are available near the buildings and are accessible by the fogs. So, the load on fog should be balanced and hence, a bio-inspired Bat Algorithm (BA) is proposed which is used to manage the load using Virtual Machines (VMs). Service broker policy considered in this paper is closest data center. While considering the proposed technique, results are compared with Active VM Load Balancer (AVLB) and Particle Swarm Optimization (PSO). Results are simulated in the Cloud Analyst simulator and hence, the proposed technique gives better results than other two load balancing algorithms. Key words: Cloud computing, Fog computing, Requests processing time, Smart grid, Microgrid, Virtual machine, Resource allocation, Energy management.

1 Introduction With the popularity of internet of thing (IoT) over the last few years, the concept of smart buildings in smart cities has become popular [1]. SG consists of smart meters COMSATS University, Islamabad 44000, Pakistan ∗ Correspondence: www.njavaid.com, [email protected]

1

2

Farkhanda Zafar et al.

which are used to monitor the electricity consumption by different devices in a smart home [1]. Many authors have proposed a cloud-fog based framework with integrating SGs. Cloud computing is a geographically distributed network which works on shared computing resources instead of confined servers. Cloud computing lies on a very underlying principle of multipurpose usability of IT. Cloud computing, as compared to conventional grid computing provides more widen perspectives across organizational boundaries [2]. Cloud provides delivery of hosted services on the internet. Cloud providers offer three services, Infrastructure as a Service (Iaas) Software as a Service (SaaS) and Platform as a Service (Paas). SaaS provides a complete application to the customer. Whereas, PaaS provides a platform to allow developers from different domains to build their applications and services. However, IaaS offers basic storage and computing facilities as systemize services. FG concept is introduced at the edge of the network. FG is introduced to lower the latency delay of rapidly increasing applications and connected device. FG helps to minimize the load burden of cloud and directly communicate with users through the internet. For maintaining load and efficient working fog cannot store data permanently. For this purpose fog send data to the cloud for the permanent storage [3]. In the integration of cloud-fog framework with SG, it is important to consider demand from consumer’s end. The demand may be of accessing any utility company or MG. The work in [4] [5] has integrated cloud and FG with SG. This is possible only when a communication is established among consumers’ end, fog and cloud.

1.1 Motivation Information Technology (IT) plays a notable role in computing. Due to this, demand of computing and storage is increasing rapidly [6]. Consumers demand services and resources that can be provided at any time. The cloud computing incorporation with FG is a most likely solution towards this. FG broadens cloud computing by providing more efficent resources and locality-based services at the edge of the network to higher serve mobile traffics [7]. On the other hand, load balancing is one of the technique which is used for resource allocation and helps in utilization of resources and services. As authors in [8] proposed a fog-cloud based model for effective management of information by using load balancing techniques. They have used Articial Bee Colony, Round Robin, PSO, Throttled and Ant Colony Optimization and proposed a hybrid approach of ACO and ABC (HABACO).

1.2 Contribution Cloud-fog based framework is beneficial for SG to get numerous benefits like efficiency, reliability and low latency rate . A fog based model is designed, where we cover the

Resource Allocation over cloud-fog framework using BA

3

six regions of the world with large number of consumers to send requests on fog to access the required resources The paper is contributed as follows: 1. Developed a cloud-fog based framework for the efficient management of the consumer’s demands. 2. Fog provides low latency services as it is placed near the end user layer and can respond faster to user’s requests. 3. MGs are placed near to each fog which fulfills the electricity requirements by maintaining the sustainability of buildings. 4. Response time and request servicing time is optimized using the BA. Results are compared with AVLB and PSO. The remaining paper is assembled as follows; Related work is shown in section II. The proposed system model is presented in Section III. However, simulation and discussions are described in Section V and Section VI presents conclusion of the paper.

2 Related Work For the optimization of the immense demand of the electricity, multiple methodologies have been proposed in the literature. Some methodologies are either cloud-based or fog based or both. Cloud and FG provides a virtual environment for efficient resource sharing to the connected consumers. These resources are assigned to increase the use of VMs instead of using physical machines for energy consumption reduction. The load on cloud and fog is balanced by applying multiple different algorithms on the cloud. These algorithms schedule the requests to manage the load. The load balancing algorithms which are used mostly are Round Robin (RR), Throttled, Active Load Balancing (ALB), PSO and Honey Bee Foraging etc. The authors in [9], proposed a Cloud Load Balancing (CLB) algorithm for load balancing on cloud and compare the results with other algorithms. The proposed algorithm performs better than others and successfully balances the load efficiently when different users demand resources simultaneously. As authors in [10] proposed Ant Colony System (MORAACS) for the resource allocation. The authors compared processing time, energy consumption and standard deviation with RR algorithm. In this algorithm, minimization of energy consumption by balancing the load on the cloud is resolved. The authors used Cloudsim simulator for simulations. A new service broker policy is proposed for data center selection in [11]. The authors proposed Master Fuzzy Context (MFC) for provisional fuzzy logic. Fuzzy rules are designed for RT and data center priority. In [12], a novel communication model is presented using two other models for optimizing the communication efficiently using optimized resource allocation. The proposed system attains high cost through the high demand scenarios. In addition, authors presented a cost computation model for cost reduction by optimized utilization of the cloud computing resources. Moreover, this model gives the opportunity to the consumers regarding optimized resource availability which helps in cost reduction. It decreases the total operation cost of the system. A novel cloud-based nano grid

4

Farkhanda Zafar et al.

framework is proposed for energy efficiency in SG. Renewable Energy System (RES) is installed with building using nano grid. Cloud controllers are used to make decisions about energy automation. The proposed solution reduces the execution time of various jobs and performance of selected parameters [13]. In [14], authors proposed a scheme for efficient energy management of SG-based Cyber-Physical System (CPS). Physical plane consists of smart devices whereas controller is located on the cyber plane. Nash equilibrium approach is used to analyze the performance of proposed coalition. Proposed solution provides a cost-effective solution during peak hours for energy management to end user. Reference(s)

Technique(s)

Feature(s)

[9]

CLB

Load cloud

[10]

MORA-ACS

[11]

Fuzzy Based Service Broker Policy Stochastic dynamic programming

[16]

[17]

Job allocation mechanism (JAM)

[18]

Diffusion strategy

[12]

Frequency control via randomized demand response

Tool(s)

balancing

on Microsoft Visual Studio 2010 C# , Microsoft SQL Server Resource allocation for Cloudsim simulation virtual services, Load tool balancing on virtual machines Increases the efficiency Cloud Analyst and and minimizes the cost MATLAB Demand side man- MATLAB agement (DSM) in MG-level energy management and Home Energy Management (HEM) Minimization of bat- JAVA SE8 Swing tery consumption at cyber-physical-social big data processing Scale-free , minimizing Not specified cost in SG Minimize the fre- IEEE 9-Bus test sysquency recovery time, tem, Ireland power sysStabilize the system tem frequency during contingencies

Table 1: Related Work Survey

The concept of nano grids is implemented in supportable smart buildings for multitenant cloud environment in [17]. In [18], authors proposed a cloud-based demandside management (DSM) system which manages energy for the consumers in multiple different regions and micro-grids to reduce the utilitys and consumers cost. It also reduces the time and efforts by integrating the modularity feature in developing smart cities. They implemented Bi-level Optimization Algorithm using linear cost function. In [19], an efficient SG electric vehicle system is proposed for providing charging and discharging optimally in different stations. A stochastic model is used to schedule the

Resource Allocation over cloud-fog framework using BA

5

approaches for shifting load in the cloud computing based framework for DSM in SG. The proposed method is used to create small energies hub for users. Cost is reduced by transferring load from hours where energy is highly consumed to less energy consumed hours by Monte Carlo method [15]. In [16], a model is presented using fog based framework for consumers to manage energy as a service. FG provides flexibility, data privacy, interoperability and real-time energy management. Using MG-level energy management and Home Energy Management (HEM) implementation cost and time to market are reduced significantly. The work [20] focuses to examine economically power trading to main grid. Energy cost minimization, carbon emission minimization and to cope with hazardous emission renewable sources are goals of this work. The above-mentioned techniques are discussed for the energy management of the specific set of buildings or appliances in cloud and fog based models. None of these techniques can tackle the energy management for optimization of resource allocation in the specic region of the world. This paper presents the bio-inspired algorithm for the efficient resource allocation of VMs in the residential buildings around the world using fog and cloud environment.

3 System Model In this section, we present a cloud fog framework for efficient resource allocation among different clusters of buildings in different regions of the world. There are six regions which are scattered geographically as shown in Table II. The system model is presented in Fig. 1 which depicts the interaction among buildings, MGs, fog and cloud. Each region contains one fog which is connected to two clusters. Each cluster contains fifteen buildings and each of which contains the different multiple homes. Smart buildings communicate with the fog devices via a smart meter. The fog devices consist of network bandwidth, storage, main memory, processor and VMs. VM manager manages all the virtual machines. All the fogs are connected to a centralized cloud. All information about building’s energy consumption, generation and schedule is stored in fogs. Fogs store data temporarily and if the data is to be stored permanently, it sends data to the cloud. Each fog is connected with MG to communicate for electricity demand and supply. The clusters of buildings communicate with fog via smart meter for its electricity requirements and in return fog communicates with nearby MG for the supply. The cluster cannot directly communicate with MG whereas electricity supply from MG to buildings is carried out directly. Table III shows clusters, fogs and regions distribution.

6

Farkhanda Zafar et al.

3.1 Problem Formulation In this section, we provide a formal description of our problem for minimum response time and minimum processing time by formulating it. We have considered the following components for resource allocation which are categorized as: set of regions which contains six regions from all over the world, six cluster of buildings with varying number of buildings in it, denoted by C, set of VMs denoted by VM, MGs, six fogs and a cloud data center. Requests from clusters are denoted by R. It is mathematically represented as: C = {c1 , c2 , ..., c12 }

(1)

V M = {vm1 , vm2 , ..., vmn }

(2)

R = {r1 , r2 , ..., r12 }

(3)

Where, the set of total number of the clusters, VM and requests are varying from 1 to m, 1 to n and 1 to p respectively. In this environment, all VMs are working in parallel to each other and have the same capacity. Total requests denoted by TR , coming from clusters can be expressed as, TR =

M N X X ( (C i × Rj ))

(4)

i=1 j=1

Equation 4 shows total requests comming from user’s end. After calculating total requests comming from user’s end, now we compute response time which is denoted by RT. RTtotal = F T − AT + Delay (5) Where FT is task finishing time and AT is arrival time(ms) of request from a cluster to the fog which includes network delay. The processing time P of allocating task i to VM j is P i,j and status of task is δ ( If task is asssigned, 1 δ i,j = else 0 The objective function is S minimize =

TR X N X (δ

i,j

×P

i,j )

i=1 j=1

where P

i,j

=

Length of task at ith place Capacity of VM at jth place

(6)

Resource Allocation over cloud-fog framework using BA

7

Cloud

Cloud Layer U lity Grid

Fog Layer

R1

R0

R6

VMM

og 2

Fog 1

Fog 6

VM

VM

MG 6

MG 1

MG 2

End User Layer C1

C2

C3

C4

C11

Separate Layers

Fig. 1: Proposed System Model

Region ID

Region

0 1 2 3 4 5

North America South America Europe Asia Africa Ocenia

Table 2: Table to Show Regions Distribution

C12

VM

8

Farkhanda Zafar et al. Clusters Fogs Regions C1 C2 C3 C4 C5 C6 C7 C8 C9 C 10 C 11 C 12

1 1 2 2 3 3 4 4 5 5 6 6

0 0 1 1 2 2 3 3 4 4 5 5

Table 3: Table to Show Clusters and Fogs Distribution

Algorithm 1 BA 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22:

Input: List of tasks, List of VMs Initialize: bats, generations, velocity, echo=tasks Calculate the load, capacity of VM for i=1 to generations do echo[i].best=current position echo[i].bestt=current t end for Calculate Vbest and Pbest for each machine Pbest= echo.best with lowest t) for j=1 to generations do for for t=1 to echo do frequency(); Update velocity (); Update position(); if current tness ¡ echo[t].bestfit then echo[t].best=current position echo[t].best=current fit end if end for Pbest= echo.best with lowest fit end for Return Pbest

Resource Allocation over cloud-fog framework using BA

9

3.2 BA In this paper, for effective load balancing, bio-inspired BA is used. For load balancing of virtual machines BA is used as a novel intelligence technique in cloud computing. It is based on bat behaviour. It is used on the echo location behaviour of bats. Each bat flies randomly accross an area with a velocity at any position x with different pulse rates. Search is strengthen by random walk. Selection for the best solution continues until defined stopping criteria is met.

3.3 Closest Data Center Depending on the network delays, the shortest path is selected from consumer’s end to the nearest cloud data center or fog data center for the quick response. This provides low latency rates and hence increases performance efficiency and user’s satisfaction

4 Simulation and Discussion FG makes communication easy and efficient as compared to cloud computing. It provides an easy way of communication to its consumers without interruption and with minimum delay. For this purpose, a fog-based environment is designed for six regions with two cluster of buildings considered for each region. The regions are identied based on six continents in the world as shown in Table II. In this paper, extensive simulations are employed in order to demonstrate the effectiveness of proposed system model, which relies on distributed fog framework and centralized cloud. Resource allocation policies used for the simulations is closest data center, optimized response time and proposed service broker policy. The load balancing algorithms are used are AVLB, PSO, and BA. Results of these policies are compared. These algorithms are used for optimal resource allocation and distribution to the consumers based on the requests.

4.1 Simulation Setup Simulations are conducted for 24 hours of the day and CloudAnalyst simulator is used for simulations to determine the dependency of performance parameters on the number of buildings, location-aware DCs and load balancing policies. In our setup, the world is categorized into 6 regions. Two load balancing policies are used for comparison such as AVLB and PSO with BA. For efficient allocation of VMs, Closest Data Center Proximity Policy is used.

10

Farkhanda Zafar et al.

4.2 Response Time Fig. 2, 3 and 4 present the response time of buildings with PSO, AVLB and BA, respectively. In Fig 4, as we can see that the average, minimum and maximum response time with BA is less as compared to AVLB and PSO. Simulations are conducted for twelve clusters connected with six fogs. Fig 5 shows the overall collation of the response time of all of the three algorithms used in this paper i.e BA, PSO, and AVLB.

4.3 Processing Time Fig. 6, 7, 8 shows the hourly processing time of fogs with Active VM Load Balancer, PSO, and BA. In Fig 7, as we can see that the average, minimum and maximum request processing time with BA has reduced as compared to AVLB and PSO. Fig 9 shows the difference between the processing time of BA, AVLB, and PSO.

70 70 60

Response Time (ms)

Response Time (ms)

60 50

40

30

20 Average Response Time (ms) Minimun Response Time (ms) MaximumResponse Time (ms)

10

50

40

30

20 Average Response Time (ms) Minimun Response Time (ms) MaximumResponse Time (ms)

10

0 1

2

3

4

5

6

7

8

9

10

11

12

User Base

Fig. 2: Response Time of Active Vm Load Balancer

0 C1

C2

C3

C4

C5

C6

C7

C8

C9 C10 C11 C12

User Base

Fig. 3: Response Time of PSO

11

70

70

60

60

Response Time (ms)

Response Time (ms)

Resource Allocation over cloud-fog framework using BA

50

40

30

20 Average Response Time (ms) Minimun Response Time (ms) MaximumResponse Time (ms)

10

50

40

30

20 BA AVLB PSO

10

0

0 C1

C2

C3

C4

C5

C6

C7

C8

C9 C10 C11 C12

BAT

ACTIVE VM

User Base

Fig. 5: Response Time

70

70

60

60

Response Time (ms)

Response Time (ms)

Fig. 4: Response Time of BA

50

40

30

20 Average Response Time (ms) Minimun Response Time (ms) MaximumResponse Time (ms)

10

PSO

Techniques

0

50

40

30

20 Average Response Time (ms) Minimun Response Time (ms) MaximumResponse Time (ms)

10

0 1

2

3

4

5

6

7

8

9

10

11

12

User Base

Fig. 6: Processing Time of AVLB

C1

C2

C3

C4

C5

C6

C7

C8

C9 C10 C11 C12

User Base

Fig. 7: Processing Time of PSO

12

Farkhanda Zafar et al.

70

1.8 1.6

Processing Time (ms)

Response Time (ms)

60

50

40

30

20 Average Response Time (ms) Minimun Response Time (ms) MaximumResponse Time (ms)

10

0

BA AVLB PSO

1.4 1.2 1 0.8 0.6 0.4 0.2 0

C1

C2

C3

C4

C5

C6

C7

C8

C9 C10 C11 C12

User Base

Fig. 8: Processing Time of BA

BAT

Active VM

Techniques

Fig. 9: Processing Time

5 Conclusion In this paper, we have examined the benefits and opportunities of cloud and fog for resource management. Moreover, an integrated fog and cloud-based model is proposed to efficiently allocate resources to the clusters of residential buildings in all the regions of the world. Energy management is important for homes, buildings, and MGs to reduce the wastage of resources and meet user’s power requirements or resources so, the purpose of this work is to manage energy requirements of the smart homes. Hence, in this paper, a novel energy management bio-inspired technique, BA, is proposed for the efficient allocation of computational resources on the fog. In this model, each region contains two clusters with the different number of buildings and each building contains the different number of smart homes and smart devices. Requirements of the consumers are fulfilled by the fog. The implementation of FG provides the flexible, data privacy, fast response and real-time features required for energy management. Consumers get access to MGs through the fog. All fogs are managed by a centralized cloud which also provides access to utility company when MG is unable to fulll the consumer requirement. Cloud Analyst simulator is used for simulations of the proposed system model. Simulations are taken using closest data center service broker policy for fog selection and VMs allocation. The results are compared with PSO and AVLB. From results, it is analyzed that BA outperforms Active VM Load Balancer and PSO.

References 1. Blanco-Novoa, Oscar, Tiago M. Fernandez-Carames, Paula Fraga-Lamas, and Luis Castedo. An ElectricityPrice-Aware Open-Source Smart Socket for the Internet of Energy. Sensors 17, no. 3

PSO

Resource Allocation over cloud-fog framework using BA

13

(2017): 643. 2. http://www.thbs.com/downloads/Cloud-Computing-Overview.pdf , Last Accessed 15-April-2018 3. Itrat Fatima and Nadeem Javaid. ”Integration of Cloud and Fog based Environment for Effective Resource Distribution in Smart Buildings.” 4. Anila Yasmeen and Nadeem Javaid. ”Exploiting Load Balancing Algorithms for Resource Allocation in Cloud and Fog Based Infrastructures.” 5. Sakeena Javaid, Nadeem Javaid, Sheraz Aslam, Kamran Munir, and Masoom Alam. ” A Cloud to Fog to Consumer based Framework for Intelligent Resource Allocation in Smart Buildings.” pages 110. 6. Okay, F. Y. and Ozdemir, S. (2016, May). ”A fog computing based smart grid model” In Networks, Computers and Communications (ISNCC), 2016 International Symposium on, IEEE, 1-6. 7. Suryawanshi, Rakesh, and Ganesh Mandlik. Focusing on mobile users at the edge of internet of things using fog computing. International Journal of Scientic Engineering and Technology Research 4, no. 17 (2015): 3225-3231. 8. Saman Zahoor, Nadeem Javaid. A Cloud-fog based Smart Grid Model for Eective Information Management. (2018). 9. Chen, S. L., Chen, Y. Y., & Kuo, S. H. (2017). CLB: A novel load balancing architecture and algorithm for cloud services. Computers & Electrical Engineering, 58, 154-160. 10. Pham, N. M. N., & Le, V. S. (2017). ”Applying Ant Colony System algorithm in multi-objective resource allocation for virtual services.” Journal of Information and Telecommunication, 1(4), 319-333. 11. Islam, N., & Waheed, S. (2017). ”Fuzzy based Efcient Service Broker Policy for Cloud.” International Journal of Computer Applications, 168(4). 12. Moghaddam, M. H. Y., Leon-Garcia, A. and Moghaddassian, M. (2017). ”On the performance of distributed and cloud-based demand response in smart grid.” IEEE Transactions on Smart Grid, in-pres. 13. Fang, Baling, Xiang Yin, Yi Tan, Canbing Li, Yunpeng Gao, Yijia Cao, and Jianliang Li. The contributions of cloud technologies to smart grid. Renewable and Sustainable Energy Reviews 59 (2016): 1326-1331. 14. Kumar, Neeraj, Sherali Zeadally, and Subhas C. Misra. Mobile cloud networking for efcient energy management in smart grid cyber-physical systems. IEEE Wireless Communications 23, no. 5 (2016): 100-108. 15. Moghaddam, Mohammad Hossein Yaghmaee, Alberto Leon-Garcia, and Morteza Moghaddassian. On the performance of distributed and cloudbased demand response in smart grid. IEEE Transactions on Smart Grid (2017). 16. S. Sofana, Reka, and V. Ramesh. Demand side management scheme in smart grid with cloud computing approach using stochastic dynamic programming. Perspectives in Science 8 (2016): 169-171. 17. Wan, Zhang, Cao, Z.,Song, Lin, J., C., Y., Y. and Wang, X. (2017). ”Optimal cloud computing resource allocation for demand side management in smart grid.” IEEE Transactions on Smart Grid, 8(4), 1943-1955. 18. Moghaddassian, Yaghmaee, M. H., M., and Leon-Garcia, A. (2017). ”Autonomous two-tier cloud-based demand side management approach with microgrid.” IEEE Transactions on Industrial Informatics, 13(3), 11091120. 19. Djabir Abdeldjalil, Chekired, and Lyes Khoukhi. Smart Grid Solution for Charging and Discharging Services Based on Cloud Computing Scheduling. IEEE Transactions on Industrial Informatics 13, no. 6 (2017): 3312-3321. 20. Gu, Hejiao Huang, Chonglin, Longxiang Fan, Wenbin Wu, and Xiaohua Jia. Greening cloud data centers in an economical way byenergytradingwithpowergrid.FutureGenerationComputer Systems 78 (2018): 89-101.