Maxmzng te Bandwdt Multpler Effect for Hybrd Cloud-P2P Content Dstrbuton Zenua L,2, Teyng Zang 3, Yan Huang, Z-L Zang 2, Yafe Da Pekng Unversty 2 Unversty of Mnnesota 3 ICT, CAS Tencent Researc Bejng, Cna Mnneapols, MN, US Bejng, Cna Sanga, Cna lzenua983@gmal.com zzang@cs.umn.edu zangtey@gmal.com galeuang@tencent.com Abstract Hybrd cloud-p2p content dstrbuton ( CloudP2P ) provdes a promsng alternatve to te conventonal cloud-based or peer-to-peer (P2P)-based large-scale content dstrbuton. It addresses te potental lmtatons of tese two conventonal approaces wle nertng ter advantages. A key strengt of CloudP2P len te so-called bandwdt multpler effect: by approprately allocatng a small porton of cloud (server) bandwdt S to a peer swarm (consstng of usernterested n te same content) to seed te content, te usern te peer swarm wt an aggregate download bandwdt can ten dstrbute te content among temselves; we refer to te rato /S as te bandwdt multpler (for peer swarm ). A major problem n te desgn of a CloudP2P content dstrbuton system s terefore ow to allocate cloud (server) bandwdt to peer swarms so as to maxmze te overall bandwdt multpler effect of te system. In ts paper, usng real-world measurements, we dentfy te key factors tat affect te bandwdt multplers of peer swarms and tus construct a fne-graned performance model for addressng te optmal bandwdt allocaton problem (OBAP). Ten we develop a fast-convergent teratve algortm to solve OBAP. Bot trace-drven smulatons and prototype mplementaton confrm te effcacy of our soluton. I. INTRODUCTION Large-scale content dstrbuton as become ncreasngly prevalent and contrbutes to a sgnfcant porton of te Internet traffc. Today s large content provders (e.g., YouTube and Netflx) typcally employ a cloud-based approac wc reles on uge data centers for computng and storage and utlzes geograpcally dspersed CDNs (content dstrbuton networks) to furter meet users demand on content delvery performance. Suc an approac requres a massve and costly computng, storage and delvery nfrastructure. For nstance, YouTube, as a subsdary of Google, utlzes Google s own massve delvery nfrastructure [], wereas Netflx employs Amazon s cloud servces and trd-party CDNs suc as Akama and Lmelgt [2]. In contrast, te peer-to-peer (P2P)- based content dstrbuton [3], [] ncurs lttle nfrastructure cost and can scale wt te user scale, at utlzendvdual users macnes (and ter ISPs) for replcatng and delverng content to eac oter. However, P2P also suffers several tecncal sortcomngs suc as end users g dynamcs and eterogenety, dffculty to fnd seeds or oter peers wt te content n wc an end user nterested. As a result, te workng effcacy of P2P can be qute poor and unpredctable. 978--673-298-/2/$3. c 22 IEEE Cloud data upload Peer Swarm 3 Peer Swarm 2 Peer Peer Swarm Fg.. Hybrd cloud-p2p content dstrbuton. Insde eac swarm, peers excange data wt oters; meanwle, tey get data from te cloud. Dfferent peer swarms sare dfferent contents. A trd approac ybrd cloud-p2p ( CloudP2P ) content dstrbuton as recently emerged [5], [6], [7], [8], [9], [], [], [2] as a promsng alternatve. It addresses te potental lmtatons of tese two conventonal approaces wle nertng ter advantages. As depcted n Fg., CloudP2P comprses of a cloud component as well as a number of peer swarms. Te cloud not only provdes content seeds but also asssts end users to fnd oter peers wo are nterested n te same content. A peer swarm starts by obtanng a content seed from te cloud, and subsequently, peers wtn te swarm can excange data among temselves. Compared to te purely cloud-based approac, CloudP2P ncurs far lower nfrastructure and network bandwdt costs (especally tere s no need for a large-scale CDN nfrastructure). Take Youku [3], te bggest vdeo sarng ste n Cna, as an example. Snce ts startup, te cloud bandwdt expense of Youku as consumed more tan alf of ts totancome. In te past two years, Youku as been encouragng ts users to nstall te Ku accelerator [5], wc cangets purely cloud-based content dstrbuton to a ybrd CloudP2P arctecture. Meanwle, CloudP2P also effectvely crcumvents te key lmtatons of P2P by provdng extra cloud bandwdt to tose peer swarms wo do not work well for lack of seed peers. A key strengt of CloudP2P len te so-called bandwdt multpler effect: by approprately allocatng a small porton of cloud (server) bandwdt S to a peer swarm (consstng of usernterested n te same content) to seed te content, CloudP2P can attan a ger aggregate content dstrbuton bandwdt ( ) by lettng peers to excange data and dstrbute content among temselves. Borrowng a term from economcs,
2 8 o D 8 (a) Cloud End osts 2 S 6 2 8 o 2 5 3 6 8 (b) CloudP2P Peer swarm Peer swarm 2 Peer swarm 3 S and margnal utlty Fg. 2. Te bandwdt multpler (= D ) of (a) Cloud and (b) CloudP2P: a S smple example. S denotes te nvested cloud bandwdt and D denotes te end osts aggregate download bandwdt. As to CloudP2P, S = S and D = were denotes te -t peer swarm. For eac peer swarm, ts margnal utlty at a certan pont s te partal dervatve: rater tan d ds because s not fully dependent on S.. Here we use we refer to te rato /S as te bandwdt multpler (for peer swarm ). A major problem n te desgn of a CloudP2P content dstrbuton system s terefore ow to allocate cloud (server) bandwdt to peer swarms so as to maxmze te overall bandwdt multpler effect of te system te optmal bandwdt allocaton problem (OBAP). Below we use a smple (artfcal) example to llustrate te bandwdt multpler effect of CloudP2P and argue wy n solvng OBAP, one must consder te margnal utlty of cloud bandwdt allocaton. As plotted n Fg. 2(a), n te conventonal cloud-based content dstrbuton, te bandwdt multpler s usually. because eac user typcally downloads content drectly form te cloud content provder. In te case of CloudP2P, te bandwdt multpler can be muc larger tan., snce te data excange among end ost peers can multply te upload bandwdt of cloud servers. Te acevable bandwdt multpler wll nge crtcally on te bandwdt allocaton sceme as well andvdual peer swarms. Dependng on te specfcs of eac peer swarm (e.g., ts sze, te bandwdt avalable among te peers, etc.), gven te same allocated cloud bandwdt, te bandwdt multpler can vary sgnfcantly from one peer swarm to anoter peer swarm. Fg. 2(b) plots tree ypotetcal bandwdt multpler curves for tree dfferent peer swarms. Suppose te totanvested cloud bandwdt s S = 2 and te bandwdt allocaton sceme corresponds to ponts {, 2, 3} n Fg. 2(b), and ten te overall bandwdt multpler for all tree peer swarms D S = D 23+7+2 = S 3++5 =.33. Because of te nonlnear nature of te bandwdt multpler curves, t s clear tat we must take nto account te marganl utlty ( D ) of cloud bandwdt allocaton n solvng te optmal bandwdt allocaton problem. Te commonly used bandwdt allocaton algortmn commercal systems, owever, do not (well) consder te margnal utlty of cloud bandwdt allocaton, tus leadng to suboptmal or even poor bandwdt multpler effect. For nstance, te free-compettve strategy smply lets all te end osts/peer swarms to compete freely for te cloud bandwdt, wereas te proportonalallocate sceme allocates cloud bandwdt proportonally to peer swarms accordng to ter sze. As a result, an overfeedng peer swarm may be allocated wt too muc cloud bandwdt resultng n low margnal utlty, wle a starvng peer swarm may get lttle cloud bandwdt resultng n g margnal utlty. For example, see te oter allocaton sceme correspondng to ponts {, 5, 6} n Fg. 2(b) were te cloud bandwdt (S = 2) s proportonally allocated nto eac peer swarm. Te overall bandwdt multpler correspondng to {, 5, 6} s 6+5+5 2+3.3+6.7 = 3.83 <.33 (te overall bandwdt multpler of {, 2, 3}). Intutvely, we fnd larger bandwdt multpler mples more balanced margnal utltes among peer swarms (wc wll be formally proved later). In ts paper, usng real-world measurements, we dentfy te key factors tat affect te bandwdt multplers of peer swarms and tus construct a fne-graned performance model for addressng te optmal bandwdt allocaton problem (OBAP). Ts model takento account te mpact of bot outer-swarm and ntra-swarm bandwdt provsons on a peer swarm and can well matc te measurement data. We furter prove tat te bandwdt multpler effect s closely related to te margnal utlty of cloud bandwdt allocaton. To solve OBAP, we develop a fast-convergent teratve algortm by fndng te optmal drecton and adaptvely settng te stepsze n eac teraton step. Compared wt te commonly used teratve algortms, our proposed teratve algortm as provable convergence, faster convergence speed and ease of use (as to a large-scale gly dynamc CloudP2P system). Our wole soluton s named as FIFA wc denotes te combnaton of te fne-graned performance model ( FI ) and te fast-convergent teratve algortm ( FA ). We use bot large-scale trace-drven smulatons and smallscale prototype mplementaton to evaluate te bandwdt allocaton performance of FIFA. Smulaton results based on te log trace of around one mllon peers reveal tat te overall bandwdt multpler of FIFA s 2%, 7% and 8% larger tan tat of te exstng bandwdt allocaton algortms: freecompettve, proportonal-allocate and Raton [8], respectvely. Meanwle, te total control overead bandwdt of FIFA stays below 5 KBps even less tan a common user s download bandwdt. Small-scale prototype mplementaton also confrms te effcacy of FIFA. Te remander of ts paper s organzed as follows. Secton II revews te related work. Troug real-world measurements, we construct a fne-graned performance model to address OBAP n Secton III. Ten we propose a fast-convergent teratve algortm to solve OBAP n Secton IV. After tat, te performance of our soluton (FIFA) s evaluated n Secton V and VI. Fnally, we conclude our paper n Secton VII. II. RELATED WORK Te commonly used bandwdt allocaton algortms of CloudP2P generally adopt a coarse-graned performance model by makng some deal or smplfed assumptons. For example, most commercal systems (e.g., [7]) use te freecompettve algortm (or make some mnor canges). Suc an algortm smply allocates a certan amount of cloud bandwdt for all peer swarms to compete freely. Obvously, free-
compettve benefts tose aggressve or selfs peer swarms wo mgt set up numerous TCP/UDP connectons to grasp as muc cloud bandwdt as possble. To allevate te drawback of free-compettve, some systems (e.g., []) employ te proportonal-allocate algortm wc proportonally allocates cloud bandwdt to peer swarms based only on ter swarm scale. Proportonal-allocate mples te assumpton tat te demand of cloud bandwdt s only dependent on te number of peernsde a swarm, wc s devant from realty. A smlar work to FIFA s AntFarm [5], wc uses a centralzed coordnator to dynamcally splt seed peers bandwdt among peer swarms (AntFarm does not consder te outerswarm cloud bandwdt provson). Te practcal applcaton of AntFarm may be dffcult for two reasons: ) Accurately splttng a seed peer s bandwdt and allocatng t nto multple swarms qute dffcult due to te dynamc nature of end ost peers, so t s rarely supported by commercal P2P systems; 2) Te coordnator employs a centralzed token protocol wc strctly controls te beavor of eac peer (e.g., negbor selecton and data excange), wc s not qute compatble wt te dstrbuted workng prncple of P2P. Anoter smlar work s Raton [8], a cloud bandwdt allocaton algortm for P2P lve TV streamng. Raton constructs ts CloudP2P performance model by usng te mpact factors S and, were S denotes te cloud bandwdt allocated to peer swarm and denotes te number of onlne leecers nsde peer swarm. Snce Raton workn a lve TV streamng envronment were most vewers devote ter bandwdt to downloadng and would leave ter peer swarm as soon as tey fns vewng (tat s to say,, were s te number of onlne seed peernsde peer swarm.), Raton does not (need to) consder te mpact of seed peers te ntra-swarm bandwdt provson. In our work, te mpact of seed peers s also taken as a key factor and we fnd t s nontrval for modelng a large-scale CloudP2P fle-sarng system. Gven tat a P2P fle-sarng system usually accommodates muc more dynamcs and eterogenety tan a P2P lve streamng system, our proposed performance model sould be more fnegraned and general. To solve te optmal bandwdt allocaton problem, Ant- Farm employs te ll-clmbng teratve algortm ( HC ) wle Raton employs te water-fllng teratve algortm ( WF ) [6]. Bot HC and WF are commonly used teratve algortms to solve optmzaton problems; owever, we fnd ter convergence speeds mgt be qute slow on andlng a large number of gly dynamc peer swarms, manly because tey ave to use a very sort stepsze to make ter teraton progress converge. We note tat Raton ad realzed te problem of WF and tus proposed an ncremental verson of WF to ncrease ts convergence speed, but te ncremental verson only allevates rater tan resolvets problem. By fndng te optmal drecton and adaptvely settng te stepsze n eac teraton step, our proposed fast-convergent teratve algortm (FA) as provable convergence, faster convergence speed and ease of use. III. FINE-GRAINED PERFORMANCE MODEL A. Key Impact Factors A number of factors may affect te bandwdt multpler of a peer swarm, suc as te allocated cloud bandwdt, number of leecers, number of seeders, avalable bandwdt of eac peer, connecton topology among peers and dstrbuton of unque data blocks. Obvously, t mpossble to take all tese factornto account, and consderng too many detaled/trval factors wll brng te bandwdt allocaton algortm unbearable communcaton/computaton overead. Instead, our metodology s to fnd out te key mpact factors tat nfluence te bandwdt multpler of a peer swarm. To fnd te key mpact factors, we utlze te real-world measurements from QQXuanfeng [], a large-scale CloudP2P fle-sarng system [7]. We track 57 peer swarmn one day (nvolvng around one mllon peers), record ter respectve workng parameters:, S, and per fve mnutes, and ten analyze te relatonsps between tese parameters. Te meanngs of tese parameters are lsted as follows: : te aggregate download bandwdt of te peernsde (peer) swarm. S : te cloud bandwdt allocated to swarm. S denotes te outer-swarm bandwdt provson to swarm. : te number of onlne seedern swarm. denotes te ntra-swarm bandwdt provson to swarm. : te number of onlne leecern swarm. denotes ow many peers are te bandwdt consumers tat beneft from S and. (Note tat a leecer also uploads data to oters.) As depcted n Fg. 3(a), we dscover approxmate exponental relatonsp between D and S, wc s furter confrmed by te correspondng log-log curve n Fg. (a). Tus, as to a typcal peer swarm : ( S ) α, < α < ; on te oter and, from Fg. 3(b) and Fg. (b) we fnd tat te exponental relatonsp also approxmately olds between and l, except tat te exponent s negatve: ( ) β, β >. Te abovementoned exponental relatonsps bascally comply wt our ntutve experences obtaned from Fg. 2 wen a peer swarm s allocated wt too muc cloud bandwdt or contans too many seeders, te margnal utlty for ncreasng ts aggregate download bandwdt wll become trval. Now tat te above exponental relatonsps are merely approxmate, we stll ave a problem weter we sould use S, l, bot or even more parameters to well model D. To ts end, we use S, l and bot, respectvely, to model D, were te correspondng constant parameters (α, f ), (β, f ) and (α, β, f ) are computed based on te one-day measurements of peer swarm. From Fg. 5 and Table I we confrm tat te seeder as te same meanng wt seed peer.
2 5 5 measurement data exponental fttng 5 5 S/l (KBps) (a) S vs. Fg. 3. Relatonsps between (a) peer swarm. D/l) (KBps) 3 2 measurement data exponental fttng 2 5 5 measurement data exponental fttng 5 5 l/s (b) vs. and S, (b) and, as to a typcal D/l) (KBps) 3 2 measurement data exponental fttng Fg. 5. (a) measurement data 2 2 (c) only usng S/l 2 2 Modelng usng (b) = ( S ) l α f ) and (d) bot (.e., (.e., 2 (b) only usng l/s 2 (d) usng bot l/s and S/l 2 2 = ( ) β f ), (c) S (.e., = ( S ) α ( ) β f ), as to a typcal peer swarm. Clearly, te key mpact factors sould nclude bot S and so tat te model can matc te (a) measurement data well. 2 S/l (KBps) (a) log( S ) vs log( ). l/s (b) log( ) vs log( ). Fg.. Relatonsps between (a) log( ) and log( S ), (b) log( ) and log( ), as to a typcal peer swarm. key mpact factors sould nclude bot S we get te followng equaton: and l. Terefore, = ( S ) α ( ) β f, 2 () were < α <, β > and f >. Ten te aggregate download bandwdt of peer swarm s: = S α l α β β f. (2) Snce S s te only decson varable tat we can scedule, we also wrte as (S ). Fnally, te bandwdt multpler of peer swarm s: S = S α l α β β f. (3) To compute te constant parameters α, β and f, we frst transform Equaton () nto ts log form: log = log S α log β + log f, () so tat α, β and f can be computed by usng te measurements of,, S and, va te classcal lnear regresson metod. One tng to note s tat te abovementoned constant parameters (α, β and f ) can only be taken as constant durng a certan perod (typcally one day or several ours), so tey need to be perodcally updated usng te latest measurements. 2 If =, we just let = so tat ( ) s β gnored. TABLE I RELATIVE ERRORS OF THE THREE MODELS APPLIED TO ALL THE 57 PEER SWARMS, COMPARED WITH THEIR MEASUREMENTS DATA. Model Avg (relatve error) Mn Max (b) only usng.39.6.936 (c) only usng S.738.2366 (d) usng bot S and.38.972 B. OBAP and Its Optmal Soluton Tll now, te optmal bandwdt allocaton problem (OBAP) of CloudP2P can be formalzed as follows: OBAP Maxmze te overall bandwdt multpler ( D S ) subject to te followng condtons: D = m =, were m s te number of swarms; S = m = S, were S s taken as a constant durng an allocaton perod; S, {, 2,, m}; = S α l α β β f, {, 2,, m}; wt decson varables S, S 2,, S m. We can see tat OBAP s a constraned nonlnear optmzaton problem [8]. Gven tat S s taken as a constant durng an allocaton perod, maxmzng D S s equal to maxmzng D. Wen te optmal soluton of OBAP exsts, suppose te optmal soluton s S = (S, S2,, Sm) 3 and te correspondng aggregate download bandwdt of eac swarm s (D, D2,, Dm). Tus, accordng to te optmalty 3 Te bold font s used to represent a vector. It s possble tat OBAP as no optmal soluton wtn ts constraned set.
Ideal status 6 Maxmum D 2 8 Current status S o 8 P() P(2) P(3) P(5) P() P() Iteraton space S d Equal-effect surface Fg. 6. An exceptonal case n wc te peer swarm cannot be adjusted to tdeal status. condton of constraned nonlnear optmzaton [8], we ave: m (S ) m (S S ), S wt S = S. (5) = = Ten fxng an arbtrary and lettng j be any oter ndex, we construct a feasble soluton S to te constrants as: S =, S j = S + S j, S k = S k, k, j. Applyng S to Equaton (5), we get: ( D j(s j ) S j (S ) ) S,, j ( j). If S =, peer swarm gets no cloud bandwdt and tus we do not need to consder suc a swarm for cloud bandwdt allocaton. Consequently, we ave {, 2,, m}, S >, and ten D j (S j ) S j (S ),, j ( j). (6) Terefore, te optmal soluton S as te followng form: D j (S) = D 2(S2) = = D m(sm), (7) S S 2 S m wc means te margnal utlty of te cloud bandwdt allocated to eac peer swarm sould be equan te optmal soluton (f t exsts). In practce, tere s an exceptonal case n wc a peer swarm cannot be adjusted to ts deal status (.e., te margnal utlty of te cloud bandwdt allocated to peer swarm s equal to tat of te oter swarms), and ts exceptonal case wll cause OBAP to ave no optmal soluton n te form of Equaton (7). Allustrated n Fg. 6, for some reasons peer swarm as an upper bound of ts aggregate download bandwdt ( Maxmum ), wc prevents te bandwdt allocaton algortm from adjustng peer swarm to tdeal status. In ts stuaton, we just allocate te least cloud bandwdt to mprove ts aggregate download bandwdt to Maxmum so tat te relatve devaton of margnal utlty among all te peer swarms can be as lttle as possble. In concluson, we ave te followng teorem: Teorem. For CloudP2P content dstrbuton, te maxmum bandwdt multpler mples tat te margnal utlty of te cloud bandwdt allocated to eac peer swarm sould be equal. In practce, we want te relatve devaton of margnal utlty among all te peer swarms to be as lttle as possble,.e., larger bandwdt multpler mples more balanced margnal utltes among peer swarms. Fg. 7. A demo teraton process. Te equal-effect surface s te set of all te ponts P tat ave te same performance value f(p). IV. FAST-CONVERGENT ITERATIVE ALGORITHM In last secton we ave formulated te optmal bandwdt allocaton problem (OBAP) nto a constraned nonlnear optmzaton problem. Te optmal soluton of suc a problem s typcally obtaned va teratve operatonn multple steps untl te algortm converges [8]. Terefore, te convergence property of te teratve algortm s crtcan solvng OBAP. Te convergence property of an teratve algortm manly depends on two aspects: teraton drecton and teraton stepsze. For a d-dmenson constraned nonlnear optmzaton problem, alts feasble solutons compose a d-dmenson teraton space S d. Suppose te teratve algortm starts at an arbtrary pont P () = (P (), P () 2,, P () d ) Sd. Ten n eac subsequent teraton step, te algortm must determne an teraton drecton and an teraton stepsze to go furter to a new pont P (k) = (P (k), P (k) 2,, P (k) ) S d so tat P (k) s closer to te optmal pont P tan P (k ), as sown n Fg. 7. Specfcally, te teraton process can be formalzed as: P (k+) = P (k) + t (k) (P (k) P (k) ), untl f(p (k+) ) f(p (k) ) < ɛ. were f(.) s te performance functon, ɛ s a very small constant, (P (k) P (k) ) s te teraton drecton, and t (k) s te teraton stepsze n te k-t step. Te task of our fast-convergent teratve algortm (FA) s to determne approprate P (k) and t (k) n te k-t step so tat te teraton process can be as fast as possble. Iteraton drecton. For a nonlnear optmzaton problem, usually t mpossble to drectly fnd te ultmate drecton P P () (or P P (k) for a certan k) because ts bascally as dffcult as to drectly fnd P. Instead, FA utlzes te condtonal gradent metod [8] to determne te teraton drecton n eac step. For a functon f(p), t s well known tat f(p (k+) ) can be approxmated va te Taylor expanson: f(p (k+) ) = f(p (k) ) + f(p (k) )(P (k+) P (k) ) T + 2 (P(k+) P (k) ) 2 f(p (k) )(P (k+) P (k) ) T +. d-dmenson means te optmzaton problem deals wt d decson varables n total. As to OBAP, d s te total number of peer swarms. d (8) (9)
were f(x) = ( f(x) X, f(x) X 2,, f(x) X d ). Te condtonal gradent metod uses te frst-order Taylor expanson to approxmate f(p (k+) ): f(p (k+) ) f(p (k) ) + f(p (k) )(P (k+) P (k) ) T. () As to te OBAP problem, te dmenson (d) s just te number of peer swarms (m), so tat P (k) = S (k), f(p (k) ) = f(s (k) m ) = D(k) = S = D(S) S and (S ) = S α l α β β f. Ten we ave: f(s (k+) ) f(s (k) ) + f(s (k) )(S (k+) S (k) ) T. () Snce our goas to maxmze f(s) on condton tat m = S = S and S, {, 2,, m}, we need to (greedly) maxmze f(s (k+) ) n Equaton () n te k-t teraton step. Tus, we must fnd te specfc S tat satsfes te followng problem: Maxmze f(s (k) )(S S (k) ) T subject to m = S = S and S, {, 2,, m}. By expandng S, S (k) and f(s (k) ), we transform te above problem nto Maxmze m = (S (k) ) (S S (k) ) subject to m = S = S and S, {, 2,, m}. It s not dffcult to fnd tat te above problem s a lnear optmzaton problem and te optmal soluton S (k) s: S (k) j and = S, for te j = arg max {,2,,m} (S (k) ) ; S (k) =, {, 2,, j, j +,, m}. So we get te optmateraton drecton n te k-t step: (2) d (k) = S (k) S (k). (3) Iteraton stepsze. Tll now we ave got tat te k-t step of our FA teratve algortm proceeds as: S (k+) = S (k) + t (k) d (k) were d (k) s determned n Equaton (2) and (3). Ideally, te stepsze t (k) sould satsfy te followng condtons: Maxmze f(s (k) + t (k) d (k) ) subject to S (k) + t (k) d (k) s a feasble soluton. Unfortunately, te above problem s stll a nonlnear optmzaton problem and tut mpossble to drectly obtan ts optmal soluton. Instead, we utlze te Armjo rule [9] to adaptvely set te teraton stepsze t (k), n order to guarantee tat f(s (k+) ) s at least larger tan f(s (k) ) by a bound: f(s (k) + τ j d (k) ) f(s (k) ) στ j f(s (k) )d (k)t () were te two constant parameters τ, σ (, ), and j s tred successvely as,, 2,..., untl te above nequalty s satsfed for a certan j (wc s j (k) ). As a result, we get te adaptve teraton stepsze n te k-t step for FIFA: t (k) = τ j(k) (5) Summary of FA. Te fast-convergent teratve algortm (FA) effcently solves OBAP by fndng te optmal drecton and adaptvely settng te stepsze n eac teraton step. Frst, te convergence of FA s provable due to ts combnatory use of te condtonal gradent metod and te Armjo rule (refer to Proposton 2.2. n [8]). Second, FA s easy to use because all te related parameters, τ and σ, can be easly confgured. For example, we smply confgure τ =.5 and σ =. for FA, and ten t s well applcable to all te smulaton/mplementaton scenaron Secton V and VI. Fnally, altoug te accurate convergence speed of FA cannot be teoretcally proved, FA exbts nearly-lnear convergence speed n our performance evaluaton (refer to Secton V-C). Tat s to say, for a CloudP2P system consstng of m peer swarms, FA convergen nearly Θ(m) steps. Comparsons of WF, HC and FA. Te water-fllng algortm (WF) s a classcateratve algortm n solvng constraned nonlnear optmzaton problems (e.g., [8]) for ts smplcty and ntutve explanaton. In eac teratve step, WF only fnds two components of S (k),.e., S (k) and S (k) l satsfyng D te followng condtons: = arg max (S (k) ) {,2,,m} and l = arg mn {,2,,m} (S (k) constant porton δ from S (k) l S (k) S (k) l l ). Ten WF moves a to S (k) : S(k) S (k) + δ and δ. Ts movement looks lke fllng some water from one cup to te oter. In oter words, te teraton drecton and teraton stepsze of WF are set as follows: d (k) = (d (k), d(k) 2,, d(k) m ), were d =, d l =, d =,, l; and t (k) = δ. Obvously, WF uses a restrcted teraton drecton (only n two dmensons among te total m dmensons) and a fxed teraton stepsze (δ). Te fundamental problem of WF len te settng of δ. If δ s set too bg, WF wll not converge; f δ s set too small, WF wll converge slowly. Stll worse, on andlng a large number of gly dynamc peer swarms, settng an approprate (.e., neter too bg nor too small) teraton stepsze (δ) for WF becomes extremely dffcult. Consequently, te only practcal coce s to set an extremely small δ resultng n a uge number of teraton steps and slow convergence speed. On te contrary, te teraton stepsze of FA s adaptvely set so te number of teraton steps depends on te number of peer swarms. Fg. 8 s a comparson of te teratve operatons of WF and FA wen tere are only two peer swarms: S =.5 and S 2 =.85 (te total cloud bandwdt s normalzed as S = ). Addtonally, te restrcted teraton drecton furter slows down te teraton process of WF because WF always walks only n two dmensons among te total m dmensons. On te contrary, te teraton drecton of FA can be n all dmensons. Fg. 9 llustrates a demo comparson wen tere are tree peer swarms.
S2 (,) S (,) (a) Iteraton space (,) (,) (,)... (b) WF, δ =. (c) WF, δ =.5 (d) FA, τ=.5, σ=. (,) (,) (,) S3 (,,) (,,) (,,) S2 S (,,) WF (,,) FA (,,) 2 Bytes 2 Bytes Source Port Lengt IP Head (2 Bytes) Destnaton Port Cecksum Swarm Has (2 Bytes) Peer ID Report Start Tme Report Fns Tme Cloud Download Bytes P2P Download Bytes UDP Packet Head Peer Status Fg. 8. A comparson of te teratve operatons of WF and FA wen tere are only two peer swarms. (a) Te teraton space s a lne. (b) WF does not converge for te stepsze s too bg. (c) WF convergen 7 steps for te stepsze s small enoug. (d) FA convergen 2 steps. Fg. 9. A comparson of te teratve operatons of WF and FA wen tere are tree peer swarms. WF always walks only n two dmensons wle FA can walk n all te m dmensons Fg.. Structure of te peer status report. A seeder s status report does not ave te felds of Cloud Download Bytes and P2P Download Bytes. Te ll-clmbng algortm (HC) always sets all te components of S () to zero and stores te total cloud bandwdt S n a repostory (R) at te startng pont. Ten n eac teraton step, HC just fnds one component of S (k),.e., S (k) wc satsfes te followng condton: D = arg max (S (k) ) {,2,,m}. Ten HC moves a constant porton δ from te repostory to S (k) : S(k) S (k) + δ and R R δ. Ts movement looks lke clmbng te ll wt eac step n te steepest dmenson. It s easy to see tat HC can be taken as a specal case of WF wc only walks n one dmenson among te total m dmensons. Consequently, te number of teraton steps of HC s usually as about several ( 5) tmes as tat of WF wen te same stepsze (δ) s used. A. Trace Dataset V. TRACE-DRIVEN SIMULATIONS Our trace dataset s got from QQXuanfeng [], a largescale CloudP2P fle-sarng system. Every onlne peer reports ts peer statun a UDP packet to te Bandwdt Sceduler (a centralzed server) per 5 mnutes, so te cloud bandwdt allocaton perod s also set as 5 mnutes. Te peer status report s structured an Fg.. Durng eac allocaton perod, te Bandwdt Sceduler aggregates peer status reports nto te correspondng swarm status wc ndcates te status nformaton (ncludng S,, and ) of a peer swarm n te allocaton perod. Because te peer status reports are carred n UDP packets, a small porton (less tan %) of reports mgt be lost n transmsson, wc would nfluence te performance of te bandwdt allocaton algortm. Terefore, f a peer status report s found to be lost, we smply take ts prevous peer status report ats substtuton. Te smulatons are performed on a one-day trace (August 7, 2) of 57 peer swarmnvolvng around one mllon peers. As depcted n Fg., te number of smultaneously onlne leecers (l) vares between K and 5K and te total cloud bandwdt (S) vares between.2 and 2.25 GBps. As to a peer swarm, te requred constant parameters (α, β, f ) for modelng ts performance ( = S α l α β β f ) are computed based on ts one-day swarm statuses (ncludng 288 2 ours swarm statusen total, were 288 = 5 mnutes ). After obtanng te performance model for eac peer swarm, we smulate te free-compettve, proportonal-allocate, Raton, and FIFA allocaton algortms to reallocate te cloud bandwdt nto eac peer swarm durng eac allocaton perod, and meanwle observe ter bandwdt multpler, margnal utlty, and so on. B. Metrcs Bandwdt multpler s defned as D S, were D denotes te end osts aggregate download bandwdt and S denotes te nvested cloud bandwdt. Large bandwdt multpler means te cloud bandwdt s effcently used to accelerate te P2P data transfer among end osts. Margnal utlty s defned as µ = D for a peer swarm. In Teorem we ave proved tat for CloudP2P content dstrbuton, (deally) te maxmum overall bandwdt multpler mples tat te margnal utlty of te cloud bandwdt allocated to eac peer swarm sould be equal. In practce, we want m te relatve devaton of = margnal utlty (dev µ = µ µ m µ ) among all te peer swarms to be as lttle as possble. Convergence speed s denoted by te number of teraton steps for an teratve algortm (FA, WF or HC) to solve OBAP. Besdes, we also care about te ease of use of an teratve algortm. Control overead s denoted by te extra communcaton cost brougt by a bandwdt allocaton algortm, because te allocaton algortm usually needs to collect extra statunformaton from end ost peers. C. Smulaton Results Bandwdt multpler. Fg. 2 depcts te evoluton of te bandwdt multpler for eac allocaton algortm n one day, startng from : am (GTM+8). We can see tat te bandwdt multpler of proportonal-allocate s generally close to tat of free-compettve. On te oter and, FIFA and Raton obvously outperform free-compettve, wt consderable mprovementn average (FIFA: 2.2 2.6 = 2% ncrement, and Raton: 2.2 2.5 = % ncrement). Tat s to say, te bandwdt multpler of FIFA s 2%, 7% and 8% larger tan tat of free-compettve, proportonal-allocate and Raton, respectvely. Margnal utlty. Margnal utlty provdes te mcroscopc explanaton of te bandwdt multpler larger bandwdt
5 x l: # onlne leecers s: # onlne seeders 5 5 2 x 6 2 S: total cloud bandwdt (KBps) 5 5 2 Fg.. Evoluton of l, s and S over tme. bandwdt multpler.5 3.5 3 2.5 2.5 FIFA scedule Raton scedule Proportonal allocate Free compettve 5 5 2 Fg. 2. Evoluton of te bandwdt multpler. relatve devaton of margnal utlty.5.5 Free compettve Proportonal allocate Raton scedule FIFA scedule 5 5 2 Fg. 3. Evoluton of te relatve devaton of margnal utlty. teraton steps 5 x 5 FA Fast Convergent WF Water Fllng HC Hll Clmbng 25 5 25 5 75 25 57 number of peer swarms Control overead bandwdt (KBps) 2 5 5 FIFA scedule Raton scedule Proportonal allocate 5 5 2 Fg.. Convergence speed of FA (τ=.5, σ=.), WF and HC (δ=.). Fg. 5. Evoluton of te control overead bandwdt. multpler mples smaller relatve devaton of margnal utlty (dev u ). Tus, n Fg. 3 we plot te evoluton of te relatve devaton of margnal utlty of all te peer swarms. Clearly, te relatve devaton of margnal utlty as tgt negatve correlaton wt te bandwdt multpler FIFA as te smallest dev u and tuts bandwdt multpler s te bggest. Convergence speed. We teoretcally analyzed te convergence property of FA, WF and HC n Secton IV. In ts part, to examne ter practcal convergence speeds, we utlze te swarm status data of dfferent number of peer swarms:, 25,..., 25, 57. For FA, we smply use te parameters τ =.5 and σ =. wc are well applcable to all te expermented swarm scales. However, for WF and HC, we made a number of attempts to fnd an approprate parameter (stepsze) δ wc could make WF and HC converge for all te expermented swarm scales. Fnally, we found δ =. to be an approprate parameter and plot te correspondng convergence speedn Fg.. We manly get two fndngs: () FA exbts nearly-lnear convergence speed (Θ(m)) as te swarm scale ncreases, and FA converges faster tan WF and HC as to eac swarm scale. (2) WF and HC exbt nearly-constant (Θ( δ )) convergence speed as te swarm scale ncreases. Te bgger δ s, te faster WF and HC converge, but a bgger δ ncreases te rsk tat WF and HC may not converge. If te swarm scale furter ncreases to more tan 57, (very possbly) we need to fnd a smaller δ to satsfy all te swarm scales. On te contrary, te convergence of FA s not senstve to ts parameters and tut s easer to use. Control overead. Te control overead of free-compettve s zero snce t does not collect peers statunformaton. In Fg. we recorded te number of onlne leecers and onlne seeders per fve mnuten one day, so t s easy to compute te control overead of proportonal-allocate, Raton and FIFA. As to proportonal-allocate, ts peer status report does not ave te felds of Cloud Download Bytes and P2P Download Bytes (see Fg. ) and t only collects leecers status reports. Dfferent from proportonal-allocate, FIFA collects bot leecers and seeders status reports. Because Raton does not consder te mpact of seeders, t only collects leecers status reports. From Fg. we fgure out tat proportonalallocate collects.52m leecer status reports wtout te felds of Cloud Download Bytes and P2P Download Bytes (accountng to.52m 6B = 27 MB n total), Raton collects.52m leecer status reports (accountng to.52m 68B = 37 MB n total), and FIFA collects 6.5M peer status reports (accountng to.52m 68 Bytes+.53M 6B = 399 MB n total). Averagng te total control overead nto eac second, we plot te control overead bandwdt of FIFA, Raton and proportonal-allocate n Fg. 5. Obvously, te total control overead bandwdt of FIFA always stays below 5 KBps even less tan a common user s download bandwdt. VI. PROTOTYPE IMPLEMENTATION Besdes te trace-drven smulatons, we ave also mplemented te FIFA algortm on top of a small-scale prototype system named CoolFs [2]. CoolFs s a CloudP2P VoD (vdeo-on-demand) streamng system manly deployed n te CSTNet [2]. Wt ts mcro cloud composed of four streamng servers and ts P2P organzaton of end users, CoolFs s able to support an average vdeo bt rate over 7 Kbps (about 5% ger tan tat of popular commercal P2P-VoD systems).
8 6 2 l: number of onlne leecers s: number of onlne seeders m: number of onlne swarms 5 5 2 Fg. 6. Evoluton of l, s and m n CoolFs. bandwdt multpler 2.5 2.5 5 5 2 Fg. 7. Evoluton of te bandwdt multpler n CoolFs. relatve devaton of margnal utlty.8.6..2 5 5 2 Fg. 8. Evoluton of te relatve devaton of margnal utlty n CoolFs. Fg. 6 plots te number of onlne leecers (l), onlne seeders (s) and onlne swarms (m) of CoolFs n one day. Obvously, te user scale of CoolFs s muc smaller tan tat of te QQXuanfeng trace, n partcular te average number of peers (p) n one swarm: for te QQXuanfeng trace, p M/57 = 686, wle for CoolFs, p = 327/6 29. Snce tere are muc fewer peer swarms workng n CoolFs and a swarm usually possesses muc fewer peers, te bandwdt multpler of CoolFs s remarkably lower and more unstable tan tat of QQXuanfeng, allustrated n Fg. 7. Wen FIFA s appled, te bandwdt multpler of QQXuanfeng les between 2.25 and.2 wle tat of CoolFs les between. and 2.. Altoug te bandwdt multpler of CoolFs (usng FIFA) seems not g, te effcacy of FIFA can stll be confrmed from te relatve devaton of margnal utlty (dev u stays around %, as sown n Fg. 8) snce we ave proved tat very low relatve devaton of margnal utlty s equal to nearly maxmum bandwdt multpler. VII. CONCLUSION AND FUTURE WORK As a ybrd approac, CloudP2P nerts te advantages of bot cloud and P2P and tus offers a promsng alternatve n future large-scale content dstrbuton over te Internet. Ts paper nvestgates te optmal bandwdt allocaton problem (OBAP) of CloudP2P content dstrbuton so as to maxmze ts bandwdt multpler effect. Based on real-world measurements, we buld a fne-graned performance model for addressng OBAP. And we prove tat te bandwdt multpler s closely related to te margnal utlty of cloud bandwdt allocaton. Ten we propose a fast-convergent teratve algortm to solve OBAP. Bot trace-drven smulatons and prototype mplementaton confrm te effcacy of our soluton. Stll some future work remans. For CloudP2P content dstrbuton, ts paper focuses on te bandwdt multpler effect and te correspondng mcroscopc aspect,.e., margnal utlty. In fact, for some specal (but mportant) CloudP2P content dstrbuton scenaros, we sould also take user satsfacton or swarm prorty nto account. A download rate up to 3 KBps can be satsfactory for a fle-sarng user, wle a download rate up to 3 KBps may be stll unsatsfactory for an HDTV vewer. Terefore, altoug FIFA as aceved maxmum bandwdt multpler for te wole CloudP2P system, we cannot say FIFA as brougt te maxmum user satsfacton. Te dffculty len tat we may need to smultaneously consder several metrcs: bandwdt multpler, user satsfacton and so fort, among wc tere are conflcts n essence. Consequently, specal attenton must be pad to a proper tradeoff ten. VIII. ACKNOWLEDGEMENTS Ts work s supported n part by te Cna 973 Grant. 2CB3235, Cna 863 Grant. 2AA25, Cna NSF Grants. 6735 and 69335, US NSF Grants CNS- 9537, CNS-792 and CNS-767. REFERENCES [] V. Adkar, S. Jan, Y. Cen, and Z.L. Zang. Vvsectng YouTube: An Actve Measurement Study, In IEEE INFOCOM, 22. [2] A. Cockroft, C. Hcks, and G. Orzell. Lessons Netflx Learned from te AWS Outage, Netflx Tecblog, 2. [3] BtTorrent web ste. ttp://www.bttorrent.com. [] emule web ste. ttp://www.emule-project.net. [5] Ku P2P accelerator. ttp://c.youku.com/kuacc. [6] Tudou P2P accelerator. ttp://www.tudou.com/my/soft/speedup.pp. [7] Y. Huang, T. Fu, D. Cu, J. Lu, and C. Huang. Callenges, desgn and analyss of a large-scale p2p-vod system, In ACM SIGCOMM, 28. [8] C. Wu, B. L, and S. Zao. Mult-cannel Lve P2P Streamng: Refocusng on Servers, In IEEE INFOCOM, 28. [9] F. Lu, S. Sen, B. L, B. L, H. Yn, and S. L. Novasky: Cnematc- Qualty Von a P2P Storage Cloud, In IEEE INFOCOM, 2. [] Xunle web ste. ttp://www.xunle.com. [] QQXuanfeng web ste. ttp://xf.qq.com. [2] H. Yn, X. Lu, T. Zan, V. Sekar, F. Qu, C. Ln, H. Zang, and B. L. Desgn and deployment of a ybrd CDN-P2P system for lve vdeo streamng: experences wt LveSky, In ACM Multmeda, 29. [3] Youku web ste. ttp://www.youku.com. [] UUSee web ste. ttp://www.uusee.com. [5] R. Peterson and E. Srer. Antfarm: Effcent Content Dstrbuton wt Managed Swarms, In USENIX NSDI, 29. [6] S. Boyd. Convex Optmzaton, Cambrdge Unversty Press, 2. [7] Z. L, Y. Huang, G. Lu, and Y. Da. CloudTracker: Acceleratng Internet Content Dstrbuton by Brdgng Cloud Servers and Peer Swarms, In ACM Multmeda (Doctoral Symposum), 2. [8] D.P. Bertsekas. Nonlnear Programmng, Atena Scentfc Belmont Press, MA, 999. [9] L. Armjo. Mnmzaton of functons avng Lpsctz contnuous frst partal dervatves, Pacfc J. Mat. 6 (), 966, pages - 3. [2] CoolFs web ste. ttp://www.cool-fs.org. [2] CSTNet web ste. ttp://www.cstnet.net.cn.