Mult-obectve Vrtual Machne Placement for Load Balancng Feng FANG and Bn-Bn Qu,a School of Computer Scence & Technology, Huazhong Unversty Of Scence And Technology, Wuhan, Chna Abstract. The vrtual machne placement s closely related to the effcent and balanced utlzaton of physcal resources. In ths paper, the nfluence of two scenaros about resource utlzaton on load balancng s analyzed. A mult-obectve ant colony optmzaton algorthm s proposed to solve the vrtual machne placement problem, whch balances the load among physcal machnes and the nternal load of physcal machne smultaneously. The proposed algorthm s compared wth two sngle obectve ant colony optmzaton algorthms, frst ft algorthm and greedy algorthm under some nstances. The results show that the proposed algorthm can search and fnd solutons that exhbt good balance among obectves whle others cannot. Ths demonstrates the proposed algorthm can balance the load n the process of mappng vrtual machnes to physcal machnes.. Introducton Cloud computng [] as a new servce model can effectvely cope wth mass data processng and computng needs by ntegratng Internet resources. Cloud computng [2] can be roughly classfed nto three types accordng to the servce type: Infrastructure as a Servce (IaaS), Platform as a Servce (PaaS) and Software as a Servce (SaaS). The vrtualzaton [3] technology can dvde physcal resources nto solated vrtual machnes, whch meet the demand of users to mprove the utlzaton of resources and reduce the nvestment n nfrastructure. The solated vrtual machnes make t possble for dfferent applcatons to run on the sngle server. The hgh load wll affect the performance of upper applcatons, and the low load wll not make full use of the lmted resources, so optmal vrtual machne placement closely related to the balanced utlzaton of resources s very mportant. A lot of research has been devoted to solve the vrtual machne placement problem n a data center. Vrtual machne placement s often modeled as bn packng problem [4], and some solutons combne the classc algorthms for bn packng problem, such as Frst Ft Decreasng (FFD) [5] and Best Ft Decreasng (BFD) [6]. In [7], the relatonshp among power consumpton, resource utlzaton and performance has been studed. Power consumpton optmzaton algorthm s proposed through modelng as bn packng problem. Beloglazov et al. [8] proposed Modfed Best Ft Decreasng (MBFD) algorthm to solve the vrtual machne placement problem based on CPU utlzaton. Vrtual machne placement belongs to combnatoral optmzaton problem, so the mproved algorthm can combne wth genetc algorthm [9], ant colony algorthm [0] or partcle swarm optmzaton algorthm [] whch s effectve to the problem. In [2], a two-level control system s proposed to manage the mappngs of workloads to vrtual machnes and vrtual machnes to physcal resources. An mproved mult-obectve genetc algorthm s proposed to mnmze total resource wastage, power a Correspondng author: bbqu@hust.edu.cn The Authors, publshed by EDP Scences. Ths s an open access artcle dstrbuted under the terms of the Creatve Commons Attrbuton Lcense 4.0 (http://creatvecommons.org/lcenses/by/4.0/).
consumpton and thermal dsspaton costs. In [3], a prototype vrtual machne packng optmzaton mechansm on Grvon s mplemented. Genetc Algorthm (GA) method s employed to avod SLA (Servce level agreement) volaton, reduce number of real nodes n use and reduce vrtual machne mgratons. Feller et al. [4] proposed Energy-Aware ACO-based Workload Consoldaton algorthm mnmzng the number of physcal machnes requred. In [5], a mult-obectve ant colony system algorthm for vrtual machne placement n cloud computng s proposed to mnmze resource wastage and power consumpton. In [6], to reduce energy consumpton n cloud data center, an energy effcent vrtual machne allocaton algorthm s proposed based on a proposed energy effcent mult-resource allocaton model and the partcle swarm optmzaton (PSO) algorthm. Most research on vrtual machne placement only consders the ntal scenaro that the resources of physcal machnes are all dle. In the real scenaro, the load of physcal machnes beng dynamc, the vrtual machne would be deployed to the physcal machne wth low load preferentally. Under the condton of a certan number of vrtual machne requests, mnmzng the number of physcal machnes to acheve energy effcent goal wll also affect the balanced utlzaton of resources. Ths paper wll study the problem n the general stuaton, namely the part of physcal machne resources s already used. The desgned algorthm n ths paper s to make the utlzaton of physcal machne resources as balanced as possble, so more needs are met under the condton of lmted resources. Ths paper s organzed as follows. The second part makes a bref ntroducton on the ant colony optmzaton algorthm and mult-obectve optmzaton. The thrd part descrbes and formulates the vrtual machne placement problem. In the fourth part, mult-obectve ant colony algorthm for load balancng s proposed n detal to solve the problem. In the ffth part, the proposed algorthm s compared wth two sngle obectve ant colony optmzaton algorthms, frst ft algorthm and greedy algorthm to verfy the effectveness of the algorthm. The sxth part s the concluson of ths paper. 2 Backgrounds 2. Ant colony optmzaton algorthm Inspred by the collectve behavor of real ant colony, Dorgo proposed ant colony optmzaton algorthm [0] systematcally. The mechansm of ant colony optmzaton algorthm conssts of two basc stages: adaptaton phase and cooperaton stage. In the adaptaton phase, each canddate soluton accordng to the accumulated pheromone adusts the structure tself. On the one hand, the amount of pheromone wll be greater f more ants pass through the path, and the probablty of the path selected wll be larger. On the other hand, the pheromone wll evaporate over tme. In the collaboraton phase, canddate solutons communcate through pheromone to get the desred soluton wth better performance. The self-organzaton mechansm of the algorthm does not need to understand every aspect of the problem n detal, so t s effectve to solve many combnatoral optmzaton problems. 2.2 Mult-obectve optmzaton Many scentfc and engneerng problems can be modeled as a mult-obectve optmzaton problem [7] whch s dfferent from the sngle obectve optmzaton problem. Performance mprovement of one obectve may result n performance degradaton of other obectves, so t s very dffcult or mpossble to optmze multple obectves smultaneously. The feasble solutons of mult-obectve optmzaton problem form a Pareto [8] set. Generally speakng, the mult-obectve optmzaton problem wth n decson varables and m obectve functons can be expressed as follows. mn y = f (x) = [ f (x), f 2 (x),, f m (x)] s.t. g (x) 0, =, 2,, p h (x) = 0, =, 2,,q () 2
In expresson (), the decson vector s x = (x, x 2,, x n ) X, and the obectve vector s y = ( f, f 2,, f m ) Y. X s the decson space of decson vector, andy s the obectve space of obectve vector. g (x) 0( =, 2,, p) defnes p nequalty constrants, and q equalty constrants are defned by h (x) = 0( =, 2,,q).The followng concepts [8, 9] s often used. Pareto domnance: 0 x domnates x ( x 0 x ), f and only f f (x 0 ) f (x ), {, 2,,m} f (x 0 ) < f (x ), {,2,,m}. 0 Pareto optmalty: x s Pareto optmal f and only f x : x x 0. Pareto optmal set: The set of all Pareto optmal solutons s Pareto set P={x 0 x : x x 0 }. 3 Problem descrpton and formulaton 3. Problem descrpton Consderng two scenaros about resource utlzaton, one scenaro s that the utlzaton of one physcal machne s far greater than the utlzaton of another for a long tme, and the vrtual machne mgraton [20] s usually used to balance load for such cases. The number of mgratons should be reduced as much as possble because of the hgh costs. Such result s descrbed as the load mbalance among physcal machnes. Another scenaro s that the utlzaton of one certan resource s much larger than other resources n a physcal machne. Ths would lead to the fact that the physcal machne cannot satsfy the vrtual machne resource requrements, resultng n a waste of resources. Such result s descrbed as nternal mbalance load n a physcal machne. The vrtual machne placement problem s actually to determne the mappng relatonshp between vrtual machnes and physcal machnes, and the mappng relatonshp between vrtual machnes and physcal machnes s mult-to-one. Ths paper wll study that the multple vrtual machnes are placed on a certan number of physcal machnes n the general stuaton. The goal s to make the load among physcal machnes and nternal load as balanced as possble to acheve effcent and balanced utlzaton of physcal resources so that more needs are met under the condton of lmted resources. 3.2 Problem formulaton { } Vrtual machne set s defned as VM = vm,vm 2,,vm. Physcal machne set s defned as M PM = { pm, pm 2,, pm N }. M s the number of vrtual machnes and N s the number of physcal machnes. The types of resources nclude CPU, memory, storage and bandwdth. The resource request vector of vrtual machne vm s defned as R = (R,R 2,R 3,R 4 ). The avalable resource vector of physcal machne pm s defned as A = (A, A 2, A 3, A 4 ). The total resource vector of physcal 2 3 4 machne pm s defned as S = ( S, S, S, S). The resource utlzaton vector of physcal machne 2 3 4 pm s defned asu = ( U, U, U, U), where U d ( d d )/ d = S A = S ( d,2,3,4). When all vrtual machnes are placed on a certan number of physcal machnes, the resource utlzaton of each physcal machne forms a matrx defned as U N 4 = U,U 2,,U N ( ) T.The average 3
utlzaton of each dmenson s defned as the Eq. (2), and d represents the dmenson of resource. N d d Avg = U, ( d =,2,3,4) (2) N = The average resource utlzaton vector of all physcal machnes s defned as Eq. (3). Avg Avg Avg Avg Avg 2 3 4 = (,,, ) (3) To measure the load balancng degree of physcal machnes n data center comprehensvely, the load among physcal machnes and the nternal load are consdered. In order to reflect the degree of load balancng among the physcal machnes, the Outer load Balancng Degree(OBD) s defned as the average of Eucldean dstance between each physcal machne resource utlzaton vector and the average resource utlzaton vector of all physcal machnes. Detals are shown n Eq. (4). OBD = U Avg N 4 d d 2 ( ) N = (4) d = In order to reflect the load balancng degree of dfferent resources n the physcal machne, the Internal load Balancng Degree(IBD) s defned as the average value of the standard devaton of the resource utlzaton of each physcal machne. Detals are shown n Eq. (5). IBD = U U N 4 4 d d 2 ( ) N = 4 d = (5) 4 d = Based on the above analyss and parameter defnton, the problem can be formulated as follows. Goals: Constrans: mn OBD and mn IBD (6) M d d δ = pm PM, R A ( d =,2,3,4) (7), f vms placed on pm δ = 0, else vm VM, = δ (9) N = d d R A ( d =,2,3,4) (8) (0) Expresson (6) s to optmze two obectves smultaneously. Constrant (7) and (8) ndcate that for each physcal machne, the total resources of vrtual machnes placed on the physcal machne do not exceed the avalable resources. Constrant (8) and (9) ndcate that a vrtual machne wll eventually be placed on a physcal machne. The vrtual machne can be placed on the physcal machne on condton that the Constrant (0) s satsfed. For each vrtual machne, a correspondng set of canddate physcal machnes s establshed, and each physcal machne n the set satsfes the constrant condton (0). Once a physcal machne s selected, the avalable resource s updated untl all vrtual machnes are placed. A feasble soluton of the problem s the mappng of all vrtual machnes and ther correspondng physcal machne. 4
4 Mult-obectve ant colony optmzaton algorthm 4. Heurstc functon and selecton strategy In the process of vrtual machne placement, the heurstc functon can help the vrtual machne select the approprate physcal machne. Eq. () defnes the matchng dstance between the vrtual machne and the physcal machne, and Eq. (2) defnes the heurstc functon. d = cos < R, A > () η (2) 4 d () t = ( U ) d 4 d = There are two reasons about constructng the heurstc functon. On the one hand, when the value of d s greater, the proporton n all dmensons between R and A s more smlar, so that can make the nternal load more balanced, and the cosne of vectoral angle can elmnate the resource dmenson. On the other hand, the heurstc functon tends to choose the underloaded physcal machne, so that can make the load among physcal machnes more balanced. For vrtual machne vm, ant k selects the physcal machne pm wth the probablty p k n the set k of canddate physcal machnes Allowed. p s defned as Eq. (3). α τ () t η () t k p () t = s Allowed 0, β, Allowed α β [ τs () t ] [ ηs () t ] (3) Allowed In Eq. (3), Allowed s the set of canddate physcal machnes of vrtual machne vm. τ () t s the amount of pheromone between the vrtual machne vm and the physcal machne pm, and τ (0) = C where C s a constant. η () t s the heurstc functon value between vm and pm. α s the pheromone heurstc factor, and β s the vsblty heurstc factor, whch ndcate the relatve mportance of pheromone and heurstc functon respectvely. The vrtual machne vm selects the physcal machne pm by the roulette wheel algorthm. r [ 0,) s generated randomly, and physcal machne pm s selected f the cumulatve probablty k ps (), t s Allowed s not less than r. s 4.2 Mantenance of Pareto optmal set and pheromone updatng At the end of each cycle, the number of feasble solutons obtaned s equal to the number of ants at most, and each feasble soluton S should be udged by the followng steps to obtan a temporary Pareto optmal set. For each element n the temporary Pareto optmal set, the same method s used to mantan the global Pareto optmal set. Fgure s the man process for mantanng Pareto optmal set. 5
. boolean flag=false; 2. for S n P /* P s a Pareto optmal set */ 3. f S domnates S 4. Remove S from P; 5. else f S domnates S 6. flag=true; 7. break; 8. end f 9. end for 0. f(!flag). add S to P; 2. end f Fgure. The process for mantanng Pareto optmal set. Δτ k () t s the ncrement of pheromone between vm and consders the two obectves IBD and OBD. pm defned as the Eq. (4) whch k / IBD + / OBD, f thefeasble soluton s Pareto optmal Δ τ () t = (4) 0, else A k + = + Δ k = τ ( t ) ( ρ) τ () t τ () t (5) The pheromone s updated after the completon of one cycle by Eq. (5). In Eq. (5), ( 0,) pheromone evaporaton coeffcent, and A s the total number of ants. ρ s 4.3 Determnstc vrtual machne placement For mult-obectve optmzaton problems, the number of solutons s usually more than one. Consderng the target weght s not easy to determne, ths paper uses the stratfed sequencng method to obtan the determnstc soluton. The method s to rank all the obectves accordng to ther mportance, and then to obtan the set of optmal solutons for the most mportant obectve, and to obtan the set of optmal solutons for the next obectve on the bass of the prevous set untl the last obectve. In the process of selectng the determnstc soluton, the mportance of the obectve OBD s hgher than that of the obectve IBD, so the soluton wth mnmum obectve OBD s selected as the determnstc soluton of the problem when the stratfed sequencng method wth two obectves s used. Fgure 2 s the algorthm descrpton. The determnstc soluton s defned as S. 6
Input: VM, PM,α, β, ρ, A, G,C Output: S. for = to G 2. for = to A 3. for vm n VM 4. select pm accordng to Eq.(3) 5. update avalable resources of pm 6. mantan the set of canddate physcal machnes for vrtual machnes 7. end for 8. calculate the value of obectve functons 9. end for 0. mantan global Pareto optmal set. update the pheromone accordng to Eq.(4) and Eq.(5) 2. end for 3. return S /* the determnstc soluton*/ Fgure 2. The algorthm for vrtual machne placement. VM s vrtual machne set. PM s physcal machne set. α s pheromone heurstc factor. β s vsblty heurstc factor, ρ s the pheromone evaporaton coeffcent. A s the number of ants. G s cycle tmes for algorthm. C s the amount of ntal pheromone. In each cycle, the complexty of each ant selects the physcal machne for the vrtual machne s O(N), and the complexty of mantanng the set of canddate physcal machnes s O(M), so the complexty of generatng a feasble soluton s O (M(M+N)). Because the number of solutons n Pareto optmal set s uncertan, the complexty of mantanng the Pareto optmal set s not analyzed. The algorthm wll generate the number of G*A feasble solutons at most, so the complexty of generatng feasble solutons s O(GAM(M+N)). 5 Expermental results To verfy the effectveness of the proposed algorthm MOACO (Mult-Obectve Optmzaton Based on Ant Colony Optmzaton), t s compared wth two sngle obectve ant colony optmzaton algorthms whch are SACO-OBD and SACO-IBD, FF(Frst Ft algorthm) and GS(Greedy Schedulng) under some nstances. The paper use ava programmng language to mplement all algorthms. Because of the nherent parallelsm of ant colony algorthm, the parallel computng framework Fork/Jon n Java7 s used to reduce the runnng tme of the algorthm. () MOACO: The algorthm s a mult-obectve ant colony optmzaton algorthm for OBD and IBD. (2) SACO-OBD: The algorthm s a sngle obectve ant colony algorthm for obectve OBD, whch s used to measure the optmzaton of MOACO for obectve OBD. (3) SACO-IBD: The algorthm s a sngle obectve ant colony algorthm for obectve IBD, whch s used to measure the optmzaton of MOACO for obectve IBD. (4) GS: For each vrtual machne, the physcal machne wth the maxmum matchng dstance as Eq. () defned s selected. (5) FF: For each vrtual machne request, the physcal machne for the frst tme to satsfy the resource constrants as Constrant (0) defned s selected. 5. Experment parameters In ths paper, the vrtual machne template and the physcal machne template are set up n advance as shown n Table and Table 2. The physcal machnes and vrtual machnes are generated randomly by the templates. The results of fve algorthms are compared n the same scale. The parameters of ant colony algorthm are set by several experments: α =, β = 5, ρ = 0.5, A= M, G = 50,C=. 7
CPU/ core Table. Vrtual machne template CPU/core Memory/GB Storage/GB Bandwdth/Mbps 00 00 2 200 00 2 2 200 00 2 300 200 2 00 00 2 2 00 200 Table 2. Physcal machne template Memory /GB Storage/ GB Bandwdth/ Mbps avalable CPU/core avalable Memory/GB avalable Storage/GB 8 6 750 750 5 0 500 550 4 6 000 000 3 2 700 600 8 8 000 750 4 6 650 400 4 8 750 000 2 5 450 600 Avalable Bandwdth/Mbps 5.2 Comparson of dfferent algorthms Every test was repeated wth 0 runs for each nstance and the average result of MOACO s compared wth other algorthms. Fgure 3 shows the expermental results of two obectves n dfferent scales. Fgure 3. The results of dfferent algorthms n dfferent scales. Fgure 3 ndcates that SACO-OBD performs best on the obectve OBD, but t performs poor compared wth MOACO and SACO-IBD on the obectve IBD. SACO-IBD performs best on the obectve IBD, but t performs poor compared wth MOACO and SACO-OBD on the obectve OBD. The expermental results of GS are smlar to sngle obectve ant colony algorthms on the obectve OBD and IBD respectvely, and that ndcates the heurstc nformaton s helpful for load balancng. The expermental results of MOACO are obvously better than GS and FF on the obectve OBD and IBD. The results show that the proposed algorthm MOACO can search and fnd solutons that exhbt good balance among obectves whle others cannot. Concluson For the problem, ths paper analyzes the nfluence of two scenaros about resource utlzaton on load balancng. Two obectves are proposed to measure the load balancng comprehensvely as possble. A mult-obectve ant colony optmzaton algorthm for vrtual machne placement n the general stuaton s proposed to balance load by optmzng the proposed two obectves. The proposed algorthm s compared wth two sngle obectve ant colony optmzaton algorthms, frst ft algorthm and greedy algorthm under some nstances. The expermental results show that the algorthm can effectvely optmze multple obectves to acheve the goal of load balancng n dfferent scales. 8
Acknowledgement The work presented n ths paper s supported by natonal mnstres proect whch s the research on ntellgent schedulng of cloud computng resources based on load balancng. References. S. Yu, C. Wang, K. Ren,W. Lou, IEEE INFOCOM, -9(200) 2. M. Alhamad, T. Dllon, E. Chang, IEEE Internatonal Conference on Dgtal Ecosystems and Technologes, 606-60(200) 3. P. Barham, B. Dragovc, K. Fraser, S. Hand, T. Harrs, A. Ho, R. Neugebauer, I. Pratt, A.Warfeld, ACM SIGOPS Operatng Systems Revew, 37(5), 64-77(2003) 4. S. Martello, D. Psnger, D. Vgo, Operatons Research, 48(2), 256-267(2000) 5. B. S. Baker, Journal of Algorthms, 6(), 49-70(985) 6. C. Kenyon, Proceedngs of the seventh annual ACM-SIAM symposum on Dscrete algorthms. Socety for Industral and Appled Mathematcs, 359-364(996) 7. S. Srkantaah, A. Kansal, F. Zhao, Proceedngs of the 2008 conference on Power aware computng and systems, 0, -5( 2008) 8. Beloglazov, J. Abaway, R. Buyya, Future generaton computer systems, 28(5), 755-768(202) 9. P. C. Chu, J. E. Beasley, Computers & Operatons Research, 24(),7-23(997) 0. M.Dorgo, M.Brattar, T.Stutzle, IEEE computatonal ntellgence magazne, (4), 28-39(2006). R. Pol, J. Kennedy, T. Blackwell, Swarm ntellgence, (), 33-57(2007) 2. J. Xu, J. Fortes, IEEE/ACM Internatonal Conference on Green Computng and Communcatons & 200 IEEE/ACM Internatonal Conference on Cyber, Physcal and Socal Computng, 79 88(200) 3. H. Nakada, T. Hrofuch, Internatonal Work Conference on Artfcal Neural Networks: Part 2:Dstrbuted Computng, Artfcal Intellgence Bonformatcs Soft Computng and Ambent Asssted Lvng, 65-654(2009) 4. E. Feller, L. Rllng, C. Morn, IEEE/ACM Internatonal Conference on Grd Computng (GRID), 26 33(20) 5. Y. Gao, H. Guan, Z. Q, Y. Hou, L. Lu, Journal of Computer and System Scences, 79(8), 230-242(203) 6. A. Xong, C. Xu, Mathematcal Problems n Engneerng, 204, 8658 ( 204) 7. K. Deb, Search methodologes, 403-449(Sprnger US, 204). 8. P. Ngatchou, A. Zare, A. El-Sharkaw, Internatonal Conference on Intellgent Systems Applcaton to Power Systems, 84-9(2005) 9. M. Gong, L. Jao, D. Yang, W. Ma, Journal of Software,20,27-289(2009) 20. J. Zhao, L. Hu, Y. Dng, G. Xu, M. Hu, PloS one, 9(9), e08275 (204) 9