Case Study: Load Balancng Thursday, 01 June 2006 Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 1
Introducton Optmze the utlzaton of resources to reduce the user response tme In telecom load balancng goal s: search the optmal routng gven a performance ndex value In computer networs lb goal s: fnd the optmal allocaton of processes gven dstrbuted resources (e.g. mnmze response tme, maxmze throughput) Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 2
Statc Load Balancng categores Computed durng capacty plannng process (batch mode) Dynamc Modfed at runtme usng dedcated hardware or software to collect performance ndces (on-lne mode) Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 3
Networ topology Example A open sngle-class model exponental arrval rate dstrbuton wth =1 FIFO queue strategy servce tme dstrbuton const(1), exp(1), hyperexp(1,2) Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 4
Model defnton - JMODEL See example Load_Balancng_Sngle_Class.jmodel Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 5
Performance ndces Response Tme at each staton System Response Tme Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 6
1 Random routng Statc routng strategy All statons have the same probablty to be selected Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 7
2 Round Robn routng Statc routng strategy Select statons accordng to a cyclc algorthm Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 8
3 Shortest Queue Length routng Dynamc routng strategy Select staton wth the smallest queue length Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 9
4 Least Utlzaton routng Dynamc routng strategy Select staton wth the smallest average utlzaton Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 10
Results Example A 4,5 4 System Response Tme 3,5 3 2,5 2 1,5 1 0,5 0 const(1) exp(1) hyper(1,2) Servce Tme Dstrbuton Random Round Robn Least Utlzaton Shortest Queue Length Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 11
Networ topology Example B open sngle-class model exponental arrval rate dstrbuton wth =1 FIFO queue strategy hyperexponental servce tme dstrbuton wth =1 and ncreasng coeffcent of varaton c Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 12
Results Example B 60 50 System Response Tme 40 30 20 10 0 1 3 5 7 9 11 13 15 17 19 Coeffcent of varaton c Random Round Robn Least Utlzaton Shortest Q Length Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 13
Queston If we are forced to use a random routng strategy, how can we mprove system response tme n the case of hyperexponental servce tmes wth hgh values of c? Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 14
Networ topology Example C = (1 + δ) = (1 - δ) exponental arrval rate dstrbuton wth =4 hyperexponental servce tme dstrbuton: Two servers wth = (1 + δ) and c = 4 Two servers wth = (1 - δ) and c = 4 One server wth = 1 and c = 4 from Asymptotc analyss we expect saturaton wth Random and Round Robn algorthms: λ = λ / 5 = 4 / 5 λ < 1 / D MAX 4 / 5 < 1 / (1 + δ) δ < 0.25 Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 15
Results Example C 30 25 System Response Tme 20 15 10 5 0 0% 5% 10% 15% 20% 25% 30% δ Random Round Robn Least Utlzaton Shortest Q Length Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 16
Problem defnton Fnd optmal load balancng n a replcated web server farm n servers Requests from a Posson process wth mean rate λ Servce tmes exponentally dstrbuted Mean response tme of server s: R = 1 / ( - λ ) = 1,2,,n and λ are the servce rate and the arrval rate of devce Mean response tme of the subsystem s: n 1 λ R( λ1, λ 2, K, λ n ) = Compute optmal λ * that mnmze R gven: n = 1 λ = λ 0 λ < λ = 1 λ Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 17
Chen algorthm (1) Order servers by ncreasng servce tmes: 1 2 n Compute quanttes L(), gven by: L( ) L( n + 1) = = j = 1 j j = 1 j = 1 n j j = 1,2, K, n Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 18
Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 19 Chen algorthm (2) Compute the value of such that: L( + 1) > λ L() The optmal values are gven by: n p p p p, 1, 0, 1,2, * 1 1 * K K + = = = = = = λ λ λ
Chen algorthm Example (1) Fnd optmal load subdvson for replcated web servers: two new servers (S 1,2 = 1/ 1,2 = 8ms) four old servers (S 3,4,5,6 = 1/ 3,4,5,6 = 12ms) System arrval rate s λ = 88 req/s Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 20
Chen algorthm Example (2) We compute L(): L( ) L( n + 1) = = j = 1 j j = 1 j = 1 n L(1) = L(2) = 0 j j = 1,2, K, n L(3) = L(4) = L(5) = L(6) = 45.87 L(7) = 585.33 Snce λ = 88 req/s L(7) > 88 > L(6) = 6 Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 21
Chen algorthm Example (3) Now we apply: λ = * λ = 0 * λ * 1 =λ* 2 = 30.9 req/s λ * 3 =λ* 4 = λ* 5 =λ* 6 = 6.55 req/s System response tme R = 11.34ms U 1,2 = 24.72% U 3,4,5,6 = 7.84% p= 1 p= 1 λ p p = 1,2, K, = + 1, K, n Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 22
Questons What happen f arrval rate s λ = 44 req/s? What happen f arrval rate s λ = 586 req/s? Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 23
References BERTOLI, M. jsim: Un Tool per la Smulazone d Modell a Ret d Code. Tes presso l Poltecnco d Mlano, 2005. BUZEN, J.P., AND CHEN, P.P. Optmal load balancng n memory herarches. In Informaton Processng 74. North-Holland, New Yor, 1974, pp. 271-275. CHEN, P.P. Optmal fle allocaton n mult-level storage systems. In AFIPS Conference Proceedngs (New Yor, June 1973), vol. 42. AFIPS Press, Reston, Va., 1973, pp. 277-282. SERAZZI G., "The dynamc behavor of computer systems", n Expermental Computer Performance Evaluaton, pp. 127-163, Elsever, 1981. Bertol Marco A.A. 2005/2006 Dmensonamento degl mpant Informatc LoadBal - 24