14-th IEEE Internatonal Conference on Peer-to-Peer Computng An -Frendly Herarchcal Overlay for P2P Lve Streamng Mengjuan Lu, Fe Lu, Xucheng Luo, and Zhguang Qn Computer Scence & Engneerng, Unversty of Electronc Scence and Technology of Chna Chengdu, Chna Abstract P2P lve streamng systems tend to generate a tremendous amount of nter- traffc for establshng large number of random nter- connectons. Recent studes have demonstrated that overlay localzaton can reduce the nter- traffc effcently, however, fully localzed overlays generally mpar the streamng qualty. In ths paper, we frst nvestgate the effect of overlay localzaton and then present a novel frendly three-ter overlay, termed, to acheve a favorable tradeoff between the nter- traffc and the streamng qualty. In, the logcal connectvty of all domans s determned by the top-layer; and the nter- and ntra- connectons are bult by the md- and bottom-layer respectvely. Smulaton results ndcate that under varous scenaros a sgnfcant reducton n the nter- traffc s achevable whle the streamng qualty s enhanced by shrnkng the delvery latency. Keywords P2P streamng; -frendly; traffc localty; Herarchcal Overlay I. INTRODUCTION Durng the past years, P2P lve streamng systems, such as PPLve and PPStream, have been wdely deployed over the Internet and attracted mllons of users. However, most exstng P2P systems are network-agnostc, whch lead the peers that partcpate n the P2P overlays nherently establsh random connectons crossng dfferent domans. Ths results n producng sgnfcant amounts of unnecessary nter- traffc [1], entalng huge costs and rsks for the Internet Servce Provders. In order to allevate nter- traffc, many approaches have been proposed. One knd of approaches bas overlay neghbor selecton through collaboraton between P2P and s, such as Oracle [2], P4P [3], and IMP [4]. The other knd of approaches suggest localzaton methods whch mantan a loacalty-aware overlay so as to shrnk the nter- traffc by mnmzng the number of nter- connectons. However, most of these approaches have focused on fle sharng system, such as BtTorrent. For P2P lve streamng applcatons, how to reduce the nter- traffc s more challengng than fle sharng systems, snce lve streamng applcatons must ensure a mnmum streamng rate and, more mportantly, must receve chunks wthn a short delay from delvers. A subset of proposed technques [5], [6] for lve streamng systems have tackled ths problem by traffc localty, but do not make any nvestgaton of the relatonshp between nter- traffc and streamng qualty. In ths paper, we frst nvestgate the effect of nter- connectons on the streamng qualty and the nter- traffc. Then we descrbe the connectvty of all domans as a mult-constrants problem. Based on the analyss, we propose a novel -frendly three-ter overlay (), to construct the nter- and ntra- connectons. In the abstracton toplayer, we propose an algorthm for buldng the logcal nter- connectons for optmzng the nter- delvery latency, where the depth of the delvery path and the ncomng external connectons of each doman are constraned. The mdlayer ncorporates not only a super peer selecton algorthm but also a constructon algorthm of nter- connectons accordng to the logcal connectvty of all s whch s determned by the top-layer. At last, the bottom-layer mplements the ntra- connectons wthn the same. Fnally, we evaluate the performance of by usng three metrcs, such as the average delvery latency, the chunk loss rato, and the nter- traffc rato. We perform the smulatons n varous scenaros, and the smulaton results show that can greatly reduce nter- traffc wth mnmal mpact on the streamng qualty. The remanng sectons are organzed as follows. Secton II surveys the related work. In Secton III, we study the effect of overlay localzaton and gve a descrpton of the logcal connectvty of all s. Next, a herarchcal overlay () s ntroduced n Secton IV and evaluated n Secton V. Concludng remarks are presented n Secton VI. II. RELATED WORK A few pror studes have concentrated on lve P2P streamng usng localty-aware technques for content delvery. There are two schemes closely related wth our research. [5] proposed a scheme for -frendly mesh-based lve streamng wth two-level overlay, n whch each peer mantans prmary edges created between nearby peers and secondary edges connectng random peers. Peers perodcally adjust neghborhoods to create an optmal overlay, whle dynamcally adapt secondary edges receve rate accordng to the state of local buffer. [7] proposed an -frendly P2P streamng mechansm for lve vdeo, namely, whch mantans a fully localzed overlay and ncorporates a two-ter schedulng scheme to reduce the cross- traffc and to mprove the delvered qualty. In, the localzed overlay s constructed by two ters where the bottom ter s formed by connectons wthn each and the top ter s composed by external connectons between s. Each peer requests data from ts local and resorts to other s only when data s not avalable locally. Although, ths technology reduces nter- traffc, t does not take nto account the adverse mpact of long delvery path and the delay of nter- connectons. 978-1-4799-6201-3/14/$31.00 2014 IEEE
III. PROBLEM DESCRIPTION In ths secton, we study the relatonshp between the overlay localzaton and the streamng qualty based on smulatons. Furthermore, we gve a descrpton of the logcal connectvty of all s, to mprove the streamng qualty by shrnkng the delvery latency. A. Effects of Overlay Localzaton Recent studes [7], [8] have shown the adverse effects of the localzaton on the performance of lve streamng applcatons. Exstng schemes reduce the nter- traffc by mnmzng the nter- connectons, however, n whch the delvery paths and the latency caused by nter- connectons typcally become excessvely long. Therefore, the delvery latency s ncreased, whch s very senstve as to lve streamng. To verfy ths argument, we frst quantfy the level of the localzaton whch depcts the number of nter- connectons, and use the redundancy as the metrc to measure the level of the localzaton n the overlay. Redundancy s defned as Eq.(1), whch s nversely proportonal to the level of the localzaton. Dn () Dmn () R = (1) Dmn () Where R s the redundancy of and Dn () denotes the amount of ncomng nter- connectons of. D () s mn the mnmum number of ncomng nter- connectons of, defned as follows: () VR Dmn = BAN (2) Where VR s the streamng rate and BAN s the average bandwdth of. So for a fully localzed overlay, R = 0 D = D ). ( () n mn Delvery Latency (Sec) 3.6 3.4 3.2 R = 0.5(D n =3) R = 1 (D n =4) R = (D n =5) Number of domans (a) 14-th IEEE Internatonal Conference on Peer-to-Peer Computng Loss Rato (%) 1.0 0.5 0.0 R = 0.5(D n =3) R = 1 (D n =4) R = (D n =5) Number of domans (b) redundancy, the mprovement of the streamng qualty s mnmal, whle the nter- traffc ncreases sgnfcantly. Therefore, we can conclude that wth an approprate redundancy, a favorable trade-off can be acheved between the nter- traffc and the streamng qualty, whle the redundancy s related wth the number of domans. B. Descrpton the Logcal Connectvty of all domans From above smulaton, we observe that buldng the nter- connectons randomly, can ncrease the depth of the delvery path from the source to any other s and prolong the delvery latency, as the domans ncrease. Where the depth only means the number of domans that the delvery path traverses and the delvery latency means the sum of delay of nter- connectons that the delvery path ncludes. Therefore, when desgnng the overlay constructon algorthm, we need to consder how to buld nter- connectons effcently. For ths purpose, we model the logcal connectvty of all domans as an optmal problem of the delvery latency wth mult-constrants. The frst constrant s the ncomng nter- connectons of each (record as ndegree of an ). In our model, we set that the n-degree of all s are D n, so that the number of nter- connectons s Dn ( N 1), where N ndcates the amount of s n the overlay. The second constrant s the delvery depth and the maxmum depth s gven: dmax = log D N + 1 (3) Where D s the average outgong connectons of each. In ths paper, our goal s to optmze the delvery latency from the source to any other s, whle subjectng to above two constrants. IV. SYSTEM DESIGN A. Herarchcal Overlay: Overvew In ths subsecton, we present an overvew of whch s an -frendly overlay for P2P lve streamng. adopts a three-ter archtecture to acheve the localtyaware overlay. The three layers are the top-layer that s a logcal layer (shown n Fg.2), the md-layer that s composed of all nter- connectons and the bottom-layer that conssts all ntra- connectons n the same (shown n Fg. 3). 85 80 75 Depth R = 0.5(D n =3) R = 1 (D n =4) R = (D n =5) Number of domans (c) Inter- traffc rato 70 65 60 55 R = 0.5(D n =3) R = 1 (D n =4) R = (D n =5) Number of domans Fg. 1 The relatonshp of redundancy, the streamng qualty and the nter- traffc (In the smulaton, there are 0 peers n each doman, VR=1Mbps, BAN=, and Inter- connectons are bult randomly) We evaluate the effect of localzaton on the streamng qualty through a smulaton shown n Fg. 1. The results show that the average delvery latency and the average chunk loss rato decrease as the redundancy ncreasng, whle the nter- traffc ncreases conversely, whch are consstent wth the prevous argument. However, wth a further ncrease n (d) Fg. 2 Top-layer Overlay The top-layer mantans a vrtual network consttuted by the logcal connectvty of all s, where each doman s regarded as a node. The logcal connecton s undrectonal and the drecton of the edge represents the delvery drecton of chunks. As the arguments n Secton III, based on the two constrants, we desgn an algorthm to construct nter- logcal connectons, called Optmal Inter- Connectvty Algorthm (OICA). OICA attempts to establsh a number of delvery paths from the source to any other s wth the mnmum nter- transmsson latency. 2
Fg. 3 Md- and Bottom-layer In, real nter- connectons are bult by the mdlayer. To construct the connectons between s, we frst dvde the partcpatng peers nto two classes: super peers and common peers. Super peers can connect to peers not only n the same but also n other s, whle common peers are only connected to peers n the same. Then we propose a super peer selecton algorthm whch consders not only the populaton of peers n the but also the number of external connectons. selects a number of super peers wthn each and assgn them to connect to super peers n other s based on the logcal connectons n the top-layer. The ntra- connectons are all mplemented n the bottom-layer. For ths purpose, the super peers wth at least one ncomng or outgong external connectons are defned as CORE super peers whch pull the chunks n or out the. In the bottom-layer, the CORE super peers act as the parents for others. Moreover, the ntra- connectons n the bottomlayer are bdrectonal. In addton, we assume that the n- and out-degree are even for each common peers, whle the outdegree of super peers s lmted to avod the congeston. Snce pror studes [6], [9], [10] have dsplayed that mostrecent-frst schedulng acheves the optmal streamng qualty, we mplement such a scheme named latest schedulng where peers pull the latest new chunks from the partners. Furthermore, an emergency schedulng polcy and a chunk retransmsson mechansm are adopted n our schedulng scheme to mprove the qualty of lve streamng. In the retransmsson mechansm, we retransmt unreceved chunks after a perod. Besdes, the emergency schedulng s mplemented to ncrease the schedulng prorty of chunks whch are marked as urgent. B. Top-layer Constructon In ths subsecton, we develop an optmal nter- logcal connectvty algorthm (OICA) to construct a drected vrtual top-layer, whch tends to optmze the delvery latency from source to any other s under two constrants. The frst constrant s the ncomng nter- connectons for each doman ( D n ). The other one s that the depth of each shortest delvery path from the source to any other s does not exceed the maxmum depth ( d max ). We assume that the latency between any two domans s known, defned by the matrx Delay. For example, Delay,j means the latency from to j. To mnmze the total latency, we adopt the vertces-constraned shortest path algorthm [11] to fnd the shortest path from source to other s, the depth of whch should be less than the depth threshold d max. Then, the pror n shortest path s connected to the target. We repeat the vertces-constraned shortest path algorthm to fnd the all precursor s of. 14-th IEEE Internatonal Conference on Peer-to-Peer Computng Let lnk_graph represent the connectvty of all s n the overlay. If j connected to, lnk _ graph[ j][ ] = 1. Let len[] be the shortest latency from 0 (the source ) to and pre[ k][ ] be the drect precursor of n the kthcycles. We denote plen[] as the prevous shortest path of. The pseudo-code of OICA s shown n Algorthm 1. Fnally, we get a matrx lnk_graph representng the connectvty of all s n the overlay. Algorthm 1: Optmal Inter- logcal Connectvty Algorthm (OICA) 1: Delay s ntalzed to the delay between any two s and all elements n lnk_graph are ntalzed to 0 2: for each k n the overlay do 3: whle D ( k) D n < n do 4: ntalze the parameters: len[] = Delay[0][] pre[0][ ] = 0 plen[] = len[] ( 0 < < N ) 5: for m= 1,..., dmax 6: for = 1,..., N 7: for j = 1,..., N 8: f len[ ] > plen[ j] + Delay[ j][ ] do 9: f!( = k & & lnk _ graph[ j][ ] = 1) do 10: pre[ m][ ] = j len[ ] = plen[ j] + Delay[ j][ ] 11: end f 12: end f 13 end for 14: f len[] = plen[] do 15: pre[ m][ ] = pre[ m 1][ ] 16: end f 17: end for 18: plen[ n] = len[ n](0< n < N ) 19: end for 20: lnk _ graph[ pre[ m][ k]][ k ] = 1 21: end whle 22: end for C. Md-layer Constructon 1) Super Peers Selecton To obtan a localzed overlay and construct the md-layer, we propose a super peers selecton algorthm whch solves the followng two problems: 1) who can be selected as super peers n an ; 2) how many peers should be chosen to act as super peers. For smplcty, we choose the peers wth hgh upload bandwdth as super peers, assumng that there are no churns n the overlay. In practce, more stable peers are preferred to be selected as super peers for each so as to mnmze churns n the overlay. Next, we dscuss how many super peers should be chosen consderng not only the number of external connectons but also peer populaton n the. Intally, we consder the nter- connectons of and let band ( p ) be the upload bandwdth of peer p n, the overall super peers satsfy the followng Inequalty: 3
SP() p SP() 14-th IEEE Internatonal Conference on Peer-to-Peer Computng band ( p) α max{ Dout ( ), Dn ( )} VR (4) Where SP( ) and VR are the set of super peers n and are the streamng vdeo rate, respectvely. Dout ( ) and Dn ( ) the number of outgong and ncomng nter- connectons. We ntroduce the notaton α ( α > 1 ) be the enlargement coeffcent whch s proportonal to the number of super peers. On the other hand, we determne the amount of super peers accordng to the total number of peers n the. The number of super peers ( Nb( ) ) s as follows: Nb( ) = P() β /log( P( ) ) (5) P() s the set of all peers of and β s the selecton coeffcent whch ndcates the number of super peers to be selected, 0< β < 1. Fnally, the number of super peers s max{ Nb(), SP()}. 2) Inter- connecton Constructon Algorthm Inter- connectons (also called external connectons) are bult by the md-layer. In our desgn, the best scheme s that each super peer s assocated wth one ncomng external connecton so that there are multple s as the provders to supply chunks. Thus, the overlay s robust when the super peers leave the system. On the other hand, the capactes of nter- connectons should meet the requrement of the streamng rate so that the super peers can avod congeston and ensure the nter- delvery qualty. Frst, we determne whch domans need to establsh external connectons accordng to the logcal connectvty of s. If need to buld an outgong external connecton to j, we frst chose a super peer as the startng node whch has no outgong external connecton from the super peer set of. Then, we buld the new external connecton to a super peer of j that does not establsh any ncomng external connecton preferably. If all super peers have outgong or ncomng external connectons, super peers are randomly selected to be connected. In, all nter- connectons are one-way and the data chunks only flow from the startng node to the termnal node. D. Bottom-layer Constructon The overlay connectons wthn each doman form the bottom-layer overlay whch s desgned to delver chunks to all other peers n the same. Frst, we defne that the super peers whch have at least one ncomng or outgong external lnks are named CORE super peers. The other super peers only connect to other peers n the same and assst the CORE super peers to delver the chunks to other peers. In essence, each CORE super peer that has ncomng nter- connectons s treated as the local desgnated source that t pulls chunks nto the. The ntra- connectons are bdrectonal and randomly connected. To avod recevng duplcate chunks from other s, we assume that all CORE super peers of an are aware of each other to perform coordnaton n chunk schedulng. Furthermore, to prevent CORE super peers from beng congested to mpact the streamng qualty, we constran ther out-degree accordng to ther upload bandwdth. CORE super peers randomly connect to the other super peers and the other peers (excludng CORE super peers) are randomly connected to each other. V. EVALUATION In ths secton, we evaluate the performance of n varous scenaros through smulatons and further llustrate the desgn trade-offs between nter- traffc and streamng qualty n P2P lve streamng applcatons. A. Expermental Settngs We buld a prototype of based on P2PTVSm [12], an event-drven p2p TV smulator. We frstly assume that all s are homogeneous wth the same dstrbuton of peer bandwdth and peer populaton n each. The overall smulaton settngs are as follows. The streamng rate of each vdeo s set to 1Mbps and the streamng s dvded nto 1000 chunks whch s 0.1MB. We consder an overlay of 10,000 peers unformly allocated to 10 s wth the degree of each peer set to 10. The download capacty of each peer s not lmted because t s never the bottleneck. However, the upload bandwdth of all peers are lmted and heterogeneous that 10% of the peers have hgh upload bandwdth of 5Mbps, 10% of the peers have upload capacty of 3Mbps, and the rest are equal to the vdeo rate of 1Mbps and the average capacty s. We set the number of the ncomng external connectons to each doman s 3 (.e. D n = 3 ). The delay between any two s randomly selectng from the followng range: [10ms, ms]. Addtonally, A pull strategy s used to delver the streamng content perodcally. We propose three metrcs to measure the performance of. There are the average delvery latency, the chunk loss rato and nter- traffc rato (ITR ). The average delvery latency s the expected delvery latency of each chunk for all peers n the overlay whch ndcates the nterval tme that chunk traverses from the stream source to a recever. The chunk loss rato equals the fracton of the expected chunks receved by each peer n the overlay before ther playback deadlnes. In our smulaton, a new metrc (nter- traffc rato) s ntroduced, whch s proportonal to the number of nter- traffc and s gven by: ITtotal ITmn ITR = (6) ITmn Where ITtotal s the nter- traffc generated by the streamng applcaton and IT mn s the theoretcal mnmum nter- traffc. B. Impact of Peer Populaton In ths subsecton, we examne the effect of the number of peers n each. We compare wth another scheme named, whch mantans a fully-localzed overlay to reduce the volume of nter- traffc and ncorporates a twoter nter- and ntra- schedulng scheme to maxmze the delvered qualty to ndvdual peers. The smulaton results are shown n Fg. 4. Fg. 4 (a) depcts the average loss rato as a functon of the populaton of peers. We can see that the loss rato decreases as the populaton of peers ncreases, and the average loss rato of s less than and s more stable than. 4
Fg. 4(b) shows the average latences of both schemes ncrease. Ths s because that the depths of the delvery paths become more length as the number of peers ncreasng. Concretely the average latency of s sgnfcantly lower than, whch dsplays that QoE of s better than. The reason for ths s that our desgn reduces the delvery latency by constranng the depth and nter- latency of delvery paths whle does not. In Fg. 4 (c), we observe that sgnfcant reducton of nter- traffc s acheved n both two schemes. From the performance of reducng the nter- traffc, s slghtly better than that of. Based on the above results, we can conclude that outperforms n ensurng the streamng qualty whle keepng the nter- traffc n low level. Average Delvery Latency (sec) Average Loss Rato (%) 5 4 3 2 1 0 3.4 3.2 1.6 Fg. 4 (a) 14-th IEEE Internatonal Conference on Peer-to-Peer Computng Average Loss Rado (%) Average Delvery Latency (sec) 1.0 0.5 0.0 1.6 1.4 Mbps Fg. 5 (a) Mbps bandwdth can delver the chunks n a lttle latency and large number of peers leads to the great depth of delvery paths so that ncreases the latency. In Fg. 5 (c) we nvestgate the nter- traffc rato n the case of varous numbers of peers for dstnct classes of upload bandwdth. The results show that the dstrbuton of the nter- traffc rato wth dfferent bandwdth s smlar. Therefore, we can conclude that the bandwdth and the number of peers have a lttle mpact on the performance of. VI. CONCLUSION In ths paper, we studed the effect of localzaton on the performance of the P2P lve streamng applcaton and analyzed underlyng reasons for ths adverse mpact. We nvestgated the optmzaton problems of nter- connectons to reduce the nter- delvery delay. Derved from these nsghts, we propose a novel -frendly herarchcal overlay for P2P lve streamng applcaton named. mantans a three-layer overlay to surmount the adverse effects of the fully localzed overlay. Our evaluaton demonstrated that successfully reduces the nter- traffc and ensures hgh streamng qualty through wde smulatons. Future research s to study and fnd more optmal solutons for the balance between the localzaton and hgh streamng qualty and to mplement n real-world system. ACKNOWLEDGMENT Ths research was supported by the NSFC under grant No. 612024, 61001084, and 61272527. Inter- Traffc Rato (%) 25 20 15 10 Fg. 4 (b) Fg. 4 (c) Fg. 4 The mpact of peer populaton on the qualty and nter- traffc Inter- Traffc Rato (%) 25 20 Fg. 5 (b) Mbps Fg. 5 (c) Fg.5 The mpact of bandwdth on the qualty and nter- traffc C. Impact of heterogeneous bandwdth In ths subsecton, we compare the average loss rato, average delay and nter- traffc rato when varyng the upload bandwdth of peers and the amount of peers n the streamng applcaton. Fg. 5 (a) demonstrates the effect of the number of peers for the average loss rato n dverse bandwdth scheme. Ths result reveals that the average loss rato decreases as the bandwdth ncreases. The average loss rato s too nearly zero to be neglgble when the average bandwdth s larger than. In low bandwdth settngs of 1.2 Mbps, there s only a fractonal declne n the performance of where the max loss rato s 3.8%. These results enlghten us that can be appled n the practcal system wth lmted upload bandwdth. In Fg. 5 (b), we can see that the average latency s nversely proportonal to the bandwdth. The results are obvous snce the hgh REFERENCES [1] D. Tomoze and L. Massoulè, Flow control for cost-effcent peer-topeer streamng, n Proc. IEEE INFOCOM, 2010, pp. 1 9. [2] V. Aggarwal, A. Feldmann, and C. Schedeler. Can s and P2P users cooperate for mproved performance? ACM SIGCOMM Computer Communcaton Revew, vol. 37, pp. 29-, July 2007. [3] H. Xe, R. Yang, A. Krshnamurthy, Y. Lu, and A. Slberschatz, P4P: Provder portal for applcatons, n Proc. SIGCOMM, 2008, pp. 1 362. [4] D.R. Choffnes and F. E. Bustamante, Tamng the Torrent: A Practcal Approach to Reducng Cross- Traffc n Peer-to-Peer Systems, In Proc. of SIGCOMM, 2008, pp. 363-374. [5] F. Pccon and L. Massoulé, -Frend or foe? Makng P2P lve streamng -aware, n Proc. IEEE ICDCS, 2009, pp. 413 422. [6] D. Tomoze and L. Massoulè, Flow control for cost-effcent peer-topeer streamng, n Proc. IEEE INFOCOM, 2010, pp. 1 9. [7] N. Maghare, R. Rejae, I. Rmac, V. Hlt, and M. Hofmann, - Frendly Lve P2P Streamng, IEEE/ACM Transactons on Networkng, vol. 22, no. 1, pp. 244-256, February, 2014. [8] Z. Shen and R. Zmmermann, -Frendly P2P Lve Streamng: A Roadmap to Realzaton, ACM Transactons on Multmeda Computng, Communcatons and Applcatons, vol. 8, no. 1S, February, 2012. [9] X. Zhang, J. Lu, B. L, and T. Yum, CoolStreamng/DONet: A datadrven overlay network for peer-to-peer lve meda streamng, n Proc. IEEE INFOCOM, 2005, vol. 3, pp. 2102 2111. [10] N. Maghare and R. Rejae, PRIME: Peer-to-peer recever-drven meshbased streamng, n Proc. IEEE INFOCOM, 2007, pp. 1415 1423. [11] Q. Sun, and Z.Y. Yang, A new algorthm for vertces-constraned shortest path, n Computer Engneerng, vol. 28, pp. 73-74, 2002. [12] http://napa-wne.eu/cg-bn/twk/vew/publc/p2ptvsm. 5