Analytical Framework for Optimizing Weighted Average Download Time in Peer-to-Peer Networks
This paper proposes an analytical framework for peer-to-peer (P2P) networks and introduces schemes for building P2P networks to approach the minimum weighted average download time (WADT). In the considered P2P framework, the server, which has the inf…
Authors: Bike Xie, Mihaela van der Schaar, Richard D. Wesel
Analytica l F ramew ork fo r Optimizi ng W eigh ted Av erage Do wnlo ad Time i n P eer-to-P eer Net w orks Bik e Xie, Mihaela v an der Sc haa r and Ric har d D. W esel Departmen t of Electrical Engineering, Univ ersit y of California, Los Angeles, CA 90095- 1594 Email: xbk@ee.ucla.edu , mihaela@ee.ucla.edu, we sel@ee.ucla.edu Abstr act — This pap er pro poses a n a nalytical framework for peer-to -peer (P2P) ne tw o r ks and in tr oduces schemes for building P2P netw orks to approach the minimum w eig h ted av erag e download t ime (W ADT). In the considered P2P framework, the server, w hich ha s the info r mation of all the download bandwidths a nd upload bandwidths o f the peers, minimizes the we ighted average download time by deter- mining the optimal transmission rat e from the server to the peers and from the peers to the other p eers. This pap er first defines the static P2P netw ork, the hierar c hical P2P netw ork and t he str ictly hiera rchical P2P netw ork. An y static P2P netw o rk can b e decompo sed into a n equiv alent netw ork of sub-peers that is strictly hierarchical. Thi s pap er shows that con vex optimiza tion can m inimize the W ADT for P2P net works by equiv alently m inimizing the W ADT for strictl y hierarchical netw orks of sub-p eers. This pap er then g ives an upper b ound for mini m izing W ADT by con- structing a hiera rchical P2P netw ork, and low er b ound by weak ening the constraints of t he con vex problem. Both the upper b ound and the lowe r b ound are v ery t ight. This pa- per al so provides several subopti mal solutions for minimiz- ing the W ADT for str ictly hiera r c hical netw orks, in which peer selection algori thms and c hunk selectio n algori t hm can be lo cally designed. Index T erms — P2P netw or k, weighted av era ge download time, hierarchical P2P netw or k, strictl y hi erarchical P2P netw ork I. Introduction P2P applications (e.g, [1], [2], [3]) ar e increasingly po p- ular and repre sent a large ma jorit y of the traffic currently transmitted ov er the In ter net. A unique feature of P2 P net works is their flexible and distributed nature, where each pe e r ca n act a s b oth server and client [4]. Hence, P2P netw o rks pr ovide a cost-effective a nd easily deploy- able framework for dissemina ting large files w itho ut relying on a centralized infrastructure [5]. Thes e features of P 2P net works hav e made them p opula r for a v ar iety o f broad- casting and file-distribution applications [5 ] [6] [7] [8 ] [9]. Spec ific a lly , chun k-based and data-driven P2P broadca s t- ing systems s uc h as Co olStreaming [6 ], Overcast [10] and Chainsaw [7] ha ve been develope d, which adopt pull-based techn iques [6], [7]. In these P2P sys tems, the p eers poss ess several c hunks a nd these chu nks ar e shared by p eers that are in terested in the same conten t. An imp ortant pro b- lem in such P2P systems is ho w to transmit the c h unks to the v a rious peer s and crea te relia ble and efficient connec- tions b etw een p eers. F or this, v arious appro aches hav e been prop osed including tree-based and data-dr iven approa c hes (e.g. [8] [11] [1 2] [13] [14] [15] [16]). Besides these prac tica l appr oaches, some research has beg un to a nalyze P2P netw orks from a theoretic p ersp ec- tive to quantify the achiev a ble p erformance. The p erfor - mance, scalability and ro bus tnes s of P 2 P ne tw orks using net work co ding are studied in [17] [18 ]. In these inv es- tigations, ea ch p eer in a P 2P netw o r k randomly chooses several p eers including the server as its par ents, and also transmits to its children a random linear co m bination of all packets the p eer has received. Netw o rk co ding, w or king as a perfect c hunk selec tio n algor ithm, g uarantees every pack et transmitted in a P 2P netw or k has new information for its r e ceiver, which makes elegant theoretica l ana lysis po ssible. Other resear c h studies the steady-state b ehavior of P 2P netw or ks with homogenous p eers using fluid mo dels [19] [20] [21]. Most pap ers providing theoretical analys is for P2P netw orks ass ume dynamic sy stems with homogenous pee rs. This pap er establishes an analytica l framework for opti- mizing weighted av era ge download time (W ADT) for P 2P net works with hetero geneous p eers, i.e., p eer s with differ- ent download bandwidths and upload bandwidths. This pap er fo cuses on static P 2P netw ork s with a single server and a fixed num b e r o f p eers. In other words, no p eer leaves or joins the P2P netw ork. In the scheme of building the P2P net work, the server collects all the download band- widths and uploa d bandwidths of the p eers, and minimizes the W ADT by determining the optimal transmissio n rate from the server or any p eer to any other p eer. A dynamic P2P sys tem can also be mo deled as a s e quence of static P2P sy stems. Therefore, this study of static P2 P netw or ks is the first step to a complete a nalytical framework. W e leav e the study of dynamic P2P netw or ks with heteroge- neous p eers fo r future work. A static P 2P netw or k is a dir ected graph which has one ro ot, the server, and at lea s t one dire cted path from the ro ot to ea ch of the other nodes , whic h are p eers . In a P2P netw o r k, peer s are placed int o levels accor ding to the top ological distances b etw een these p eers a nd the server. A peer is in level K if the length of the longest directed acyclic path fro m the server to the p eer is K . A hierar ch ical P2P netw o rk is a P2P netw o rk in which ea ch p eer can only download from p eers in the low e r levels and upload to pee rs in the higher levels. Peers in the same lev el cannot download or uplo a d to each o ther. A strictly hierarchical P2P netw o r k is a P2P netw o rk in which each peer in le vel K can only download fro m peers in level K − 1 and upload to p eers in level K + 1. This pap er shows that any sta tic P2P netw or k ca n be de- comp osed into an equiv a lent net work of sub- p eer s that is strictly hierarchical. Ther efore, con vex optimization can minimize the W ADT for P2P net works by equiv alently minimizing the W ADT for str ictly hiera rchical net works of sub-p eers . This pap er then g ives an achiev able uppe r bo und fo r minimizing W ADT by constructing a hier archi- cal P2P net work, a nd low er b o und by weak ening the c on- straints o f the con vex pro blem. Both the upper bo und and the low er b ound ar e very tigh t. The str ictly hiera rchical P2 P net work is pr actical for pro- to col design beca use p eer selectio n algor ithms a nd ch unk selection algor ithms can b e lo cally designe d level by level instead of globally designed. Minimizing the W ADT for strictly hiera r chical net works is a 0-1 conv ex optimization problem. How ever, if we have assigned all p eers each to a level, then the globa l bandwidth allo ca tion problem de- comp oses into lo cal ba ndwidth allo cation problems at each level, which have water-filling solutions. Several sub op- timal p eer as s ignment algor ithms are provided and simu- lated. Some of these suboptimal but pr actical s chemes ca n be use d for conten t distribution sys tems, e.g. Overcast [10]. This pape r is organized a s follows. In Section II, def- initions and notatio n for P2P netw orks are introduced. Section I I I pr ovides and discusses a taxonomy of over- lay net works. In Section IV, the problem of minimiz- ing the weigh ted av erage download time is formulated and solved. Section V prese nts the sim ulation results. Section VI prese nts the co nclusions. I I. S etup and Problem Definition Consider a scenario where millions of p eers w ould lik e to download conten t from a s erver in the In ternet. The server has sufficient bandwidth to ser ve tens or hundreds of peer s, but no t millions. In the absence o f IP multicast, one solu- tion is to form the se r ver and the pe e r s in to a P2P o verlay net work and distribute the cont ent using application lay er m ulticast [17] [22]. In this scenario , the con tent in the server is par titioned in to ch unks . Peers not o nly do wnload ch unks fro m the ser ver a nd other p eers but also uploa d to some other peers that are in ter ested in the conten t. This pape r focus es on cont ent distribution applications (e.g, BitT orr ent , Overcast [10]) in whic h peer s are only int erested in conten t at full fidelit y , even if it means that the conten t do es not beco me av aila ble to a ll p eers at the same time. The key iss ue for these P2 P a pplications is to minimize download times for pe e rs. Since it usually takes s everal hour s or da ys for a peer to do wnload conten t in full fidelity , our w ork is less concerned with in teractive resp onse times and transmission delays in buffers and in the netw o rk. This pap er studies a scheme to minimize the weigh ted av er age do wnload time for a static P2P netw o rk. In this scheme, the server first collects the infor mation of p eers’ weigh ts, download bandwidths, and uplo ad bandwidths and then p erforms a cent ralized optimization to find the bes t static P2P netw ork, i.e., the o ptimal tra ns mission rates of the tra ns mission flo ws from the server or an y p eer to any other peer to minimize the weigh ted av erage do wn- Peer 1 S 2 3 4 1 o s r 1 2 o r 1 3 o r 3 1 o r 4 1 o r 1 4 o r 2 1 o r Fig. 1 The peer model load time. The se r ver passes the optimal solution to the pee rs, and the peer s build the c onnections according to the optimal solution. The rest of the pap er will fo cus on the cen tralized o ptimization algorithm for determining the optimal static P2P netw or k. In a s ta tic P2P netw ork, the ser ver with ba ndwidth S has a file, whose size is 1 unit for simplicity . There are N pee rs who wan t to share the file in the net work. Ea ch p eer has download ba ndwidth d i and uploa d bandwidth u i , for i = 1 , 2 , · · · , N . These download ba ndwidths and upload bandwidths a re usually determined a t the application lay e r instead o f the physical lay er b ecause an Internet user can hav e several downloading tasks a nd these tasks share the ph ysical download and uploa d bandwidth of the user. It is reas onable to assume tha t d i ≥ u i for e ach 1 ≤ i ≤ N . F or the c a se of d i < u i for p eer i , we just use the pa r t of the upload bandwidth whic h is the same a s the download bandwidth and leav e the rest of the uplo ad ba ndwidth. Denote the transmiss ion rate from the ser ver to pee r j as r s → j and the tr ansmission rate fr om p eer i to peer j as r i → j . The total download rate o f p eer j , denoted a s r j , is the summatio n of r s → j and r i → j for a ll i 6 = j . Since the total do wnload rate is constrained b y the download bandwidth, we hav e r j = r s → j + P i 6 = j r i → j ≤ d j for all j = 1 , · · · , N . Since the total uplo ad rate is constrained b y the upload bandwidth, we a lso hav e P i 6 = j r j → i ≤ u j for all j = 1 , · · · , N . One example of the p eer mo del is s hown in Fig. 1. The do wnlo a d bandwidth and uplo ad bandwidth of Peer 1 a re d 1 and u 1 resp ectively . Thus, the total download rate r s → 1 + P 4 i =2 r i → 1 is le s s than or equal to d 1 . The tota l upload ra te P 4 i =2 r 1 → i is less than or equa l to u 1 . Since o ur work is less concer ned with in teractive resp onse times and transmission delays in buffers and in the netw or k, the download time for each p eer is dominated by 1 /r i and the weigh ted av erage download time is P N i =1 w i /r i where w i ≥ 0 is the weigh t o f p eer i . In a P2P netw ork, if peer i forwards conten t to p eer j , then peer i is a parent of pee r j and p eer j is a child of peer i . Each no de can hav e s everal parents and several children. A primary goal of this pap er is to minimize the W ADT computed as P N i =1 w i /r i . In the W ADT computation r i could refer to the actual download rate r ( a ) i or the bud- S 1 2 3 4 Fig. 2 A hierarchical P2P n etwo rk with 4 peers geted download rate r ( b ) i . In genera l, r ( a ) i ≤ r ( b ) i bec ause the parents o f a p eer mig h t not alwa y s have new conten t for sharing. The net work coding strategy can be used as a per fect ch unk selection alg orithm to g ua rantee that a par- ent alwa ys has new co n tent for its children [17]. This pap er uses the netw ork co ding strategy a s a ch unk selection al- gorithm in P 2 P netw o rks and so r ( a ) i = r ( b ) i . There fore, in the re st of the pa per , we use r i for b oth budge ted download rate and a ctual download rate. I I I. T axonomy of Overla y Networks This s ection s tudies graph s tructures of P 2P overla y net- works. Definition 1: static P2P net w ork : A static P 2P net- work is a directed gra ph which has one ro ot and a t least one dir e c ted path fr o m the r o ot to ea ch of the other no des. The ro o t no de is the server which ha s the conten t to share. All the o ther no des a re the p eers that are interested in the co n tent. In a P2P netw or k , p eers ar e placed into levels acco r ding to the top olo g ical distances betw een these pee rs and the server. Definition 2: level of p eer : A pee r/no de(use p eer or no de?) is in level K if the length of the lo ngest directed acyclic path from the s erver to the p eer is K . The server is defined in level 0. Definition 3: level of P2P net work : A P2P net work has level K is the maximum lev el of peers is K . A. The hier ar chic al P2P net work Definition 4: hierarc hical P2P net w ork : A hierarchi- cal P 2P netw ork is a P2P net work in which each p eer can only download from p eers in the low e r levels and upload to pee rs in the higher levels. Fig. 2 shows a hierarchical P2P net work with 4 peer s, in which p eer i is in level i . Note that in this example, each peer do wnloads fro m all p eers in the low er levels and uploads to a ll p eers in the higher le vels. Howev er, by defi- nition, p eers a re not required to download from all p eers in the low er levels or upload to /from? a ll p eers in the higher levels. F or example, the netw ork shown in Fig. 2 will still be a hiera rchical P2P net w ork if the edge 1 → 4 v a nishes. How ever, p eers are not allowed to do wnload from any p eer in a higher level or upload to /from? any peer in a low er level. Also p eers in the same level canno t download o r upload to each other . L emma 1: A hierarchical P2P netw or k contains no di- rected cycle. Pr o of :(by contrapos ition) Supp ose there is a directed cy- cle A 1 → A 2 → · · · → A n → A 1 , then some A i → A i +1 or A n → A 1 violates the r equirement that p eers in a hier- archical P2P network canno t uplo ad to a pee r in a lower level. The r efore, the net work con taining the directed c y cle cannot b e a hierarchical P2P netw or k. Q.E.D. L emma 2: A dir ected acyclic P2P netw ork is a hiera r- chical P2P net work. Pr o of :(by contrapo sition) Supp ose a P2P net work is not hierarchical, i.e., there exits a no de A in level m and a no de B in level n such that m ≥ n and A → B . Let S → A 1 → · · · → A m − 1 → A be the longes t directed acyclic path from S to A and S → B 1 → · · · → B n − 1 → B be the long est directed acyclic path from S to B . Since S → A 1 → · · · → A m − 1 → A → B is a directed path from S to B with length m + 1 > n , this path m ust contain a directed c ycle, and hence, the P2P netw ork is not a directed acyclic gra ph. Therefore, a dir e cted acyclic P2P netw or k is a hierarchical P 2P netw ork . Q.E.D. The or em 1: T he set of all hierarchical P2P netw o rks is the set of all directed acyclic P2 P net works. It is a direct co ns equence of Lemma 1 and Lemma 2. B. The st rictly hier ar chic al P2P network Definiation 5: strictly hierarc hical P2P ne t work : A strictly hierarchical P2P net work is a P2P net work in which each p eer in lev el K can only download from p eers in level K − 1 and upload to p eers in level K + 1. Fig. 3 shows a s trictly hier archical P2P netw ork with 3 le vels. In a strictly hierar chical P 2P netw ork, p eers in level K work together as a vir tua l se rver and upload to pee rs in lev el K + 1. In Fig. 3, p eer 1 a nd 2 form the virtual server in level 1, denoted as S 1 . Peer 3, 4 and 5 form the v irtual s erver in level 2, denoted as S 2 . Since a ll transmission flows are be tw een tw o consecutive levels, p eer selection a lgorithms and chu nk se le ction algor ithms c a n b e lo cally desig ned lev el by lev el. The relatio nships among the P2 P netw ork , the hierar ch i- cal P2P netw or k and the strictly hie r archical P2P netw ork are co nc luded in Fig. 4. C. Net work of s ub-p e ers A P 2P overla y netw or k is divisible if peer s can be di- vided into sub-pe ers, and it is indivisible if p eers ca nnot be divided. The division of peers can b e p erformed at the ap- plication lay er [4] [2 3]. Even for indivisible P2P net work, pee rs can be conceptually divided into virtual sub-pee r s for theoretica l analysis . A simple exa mple of p eer division is given in Fig. 5. Fig. 5(a) shows the origina l P2 P net- work and Fig. 5(b) shows the netw o rk of sub-p eers after the divisio n of p eer 1 in to sub-p eer 1 A and sub-p eer 1 B . A peer division is equiv a lent if the tra nsmission ra tes from the s e r ver to ea c h p eer and from each p eer to each S 1 2 4 5 6 3 S 1 S 2 Fig. 3 A st rictl y hierarchical P2P network P 2 P n e t w o r k s h i e r a r c h i c a l P 2 P n e t w or k s = d i r e c t e d a c y c l i c P 2 P n e t w o r k s s t r i c t l y h i e r a r c h i c a l P 2 P n e t w o r k s Fig. 4 Conclusion on t axonomy of overla y netw orks other p eer are inv a riant. The netw ork of sub-p eers is equiv - alent to the or iginal P 2P netw ork if the p eer division is equiv alent. The p eer division in Fig. 5 is equiv a lent if r s → 1 = r s → 1 A , r 1 → 2 = r 1 A → 2 and r 3 → 1 = r 3 → 1 B . The or em 2: Any P2 P netw o rk with N peers and K levels can be deco mpo sed into an e quivalent netw ork of sub-p eer s that is strictly hierarchical, and has at most K levels, each of which contains at most N sub-p eers. Pr o of of The or em 2: In or der to prove the theor em, it suffices to construct a strictly hier archical netw ork o f sub- pee rs which is equiv alent to the origina l P2P netw or k. F or any P 2P net work with N p eer s and K lev els, deno te the server S a s node 0 and the pee r s a s no de 1 , 2 , · · · , N . Let K i = { k : ∃ a directed acyclic path fro m S to p eer i with length k } , (1) and so | K i | ≤ K is the ca rdinality of K i . Divide p eer i int o | K i | sub-p eers, which are deno ted a s s ub-pe e r ( i, k ) for k ∈ K i . The sub-p eer ( i, k ) is the part of p eer i in level k . In the netw o rk of sub-pee r s, there is an edge from the server S to sub-p eer ( i, 1) if and only if S → i in the original net work. W e as sign the transmis sion r ate r s → ( i, 1) = r s → i . There is an edge from sub-p eer ( i, k ) to sub-p eer ( j, k + 1) if and only if there exits a directed acyclic path with length k + 1 suc h that S → · · · → i → j in the or iginal P2P S 1 2 3 S 1 A 2 3 1 B 1 ( a ) ( b ) Fig. 5 Peer division 3 2 3 2 1 S ( 1 , 1 ) ( 2 , 1 ) ( 2 , 2 ) ( 3 , 2 ) ( 1 , 3 ) ( 3 , 3 ) 1 S ( 1 , 1 ) ( 2 , 1 ) ( 2 , 2 ) ( 3 , 2 ) ( 1 , 3 ) ( 3 , 3 ) ( 1 , 3 ) ( 2 , 3 ) ( 3 , 1 ) ( a ) ( b ) Fig. 6 Constructio n of the network of sub-peers net work. W e assign the transmission r ates level by level with r ( i,k ) = X ( i ′ ,k − 1) → ( i,k ) r ( i ′ ,k − 1) → ( i,k ) , (2) r k i → j = r i → j − X m ≤ k r ( i,m − 1) → ( j,m ) , (3) r ( i,k ) → ( j,k +1) = min( r ( i,k ) − X j ′ m , and hence X k ≤ K r ( i,k − 1) → ( j,k ) = X k ≤ m r ( i,k − 1) → ( j,k ) = r i → j . (11) Finally , w e need to show that the assigned tra nsmission rates in the net work o f sub-p eers a re feasible, i.e., the down- load rate of each sub-p eer is grea ter than o r equa l to it upload ra te. Plugging j = N int o (4), r ( i,k ) → ( N ,k +1) ≤ r ( i,k ) − X j ′ √ w i R d i if √ w i R > d i (18) where R is c hosen appro priately such that P N i =1 ( r i − u i ) = S − max i ( u i ). This upp er b ound is almos t o ptimal. Consider the fol- lowing low er b ound which is very clo se to the upp er b ound. Since S ≥ P N i =1 ( r i − u i ) is a relaxe d constraint, an low e r bo und is the solution to the optimization pr oblem Minimize N X i =1 w i /r i (19) Sub ject to d i ≥ r i ≥ u i , i = 1 , 2 , · · · , N , N X i =1 r i − u i ≤ S. Note that this optimization pro ble m (19) differs from the problem (17) only by replacing S with S − max i ( u i ). Th us, the low er b ound is P N i =1 w i /r i with r i = √ w i R if u i ≤ √ w i R ≤ d i u i if u i > √ w i R d i if √ w i R > d i (20) where R is c hosen appro priately such that P N i =1 ( r i − u i ) = S . Since S ≫ max( u i ), one has S ≃ S − ma x i ( u i ). The upper bo und and the low er b ound are almost the same. Therefore, b oth o f these t wo bounds are very tig h t, and the upper b ound is almost an a nalytical so lution to minimizing the W ADT. Hence, it is sufficient to build a hierarchical P2P netw o r k to achieve the minim um W ADT. C. Pr actic al Solut ions Compared with building netw orks of sub-p eer s and hi- erarchical P2P net works, it is more practical to build a strictly hierarchical P2P netw ork. First, in a strictly hier- archical P2 P net work, p eers do not need to b e decomp osed int o sub-peer s. Thus, it can have a muc h simpler proto col in netw or k lay er than a net work of sub-p eers. Second, in a strictly hier archical P2P netw o rk, each level usually con- tains o nly tens or h undreds of p eers. Therefore, one can lo cally design p eer s election algor ithms and ch unk selection algorithms level by level, which only depend o n a small col- lection of pe ers in the P2P netw o rk. The lo cally desig ned pee r and ch unk selection algor ithm might be mu ch simpler than the netw or k co ding stra tegy a nd other global designed pee r and c hunk selection algorithms. The following theo- rem shows that there exists a stric tly hierarchical net work of sub-p eer s which achiev es the upper bo und in the previ- ous subsection, and is very close to a strictly hier archical P2P netw o r k. The or em 3: T he r e ex ist multiple upp er- bo und-achieving net works of sub-p eers in which at most K − 1 p eer s need to be decomp osed int o 2 s ub-pee rs, where K ≪ N is the nu mber of levels. Pr o of : Equation (18) gives r i , i = 1 , · · · , N , for the hierarchical P2P net work which achiev es the upper b ound. Conv er t the hierarchical P2P netw ork to mult iple optimal strictly hierarchical netw orks of sub-pee rs b y the follo wing algorithm. This a lg orithm indicates tha t a t most K − 1 peer s need to b e divided into 2 s ub-pe e r s a nd each level of the co n- structed netw o rk of sub-p eers c ont ains at mo s t 2 sub-p eer s. Since there are m ultiple choices in step (2), this alg orithm provides multiple str ictly hierar chical netw orks of sub-p eers which are very close to a stric tly hierarchical P2P netw o rk. Q.E.D. Another practical solution is to solve the problem of min- imizing the W ADT dir ectly for str ictly hierarchical P2P net works. This problem can b e formulated a s a 0-1 co n- vex optimization. The complexity to solve a 0-1 conv ex optimization pro blem is exp onential to the problem size . F ortunately , this problem has an analytical sub optimal solution. Suppose there are N peers and K levels in a Algorithm 1 Peer Placement Algorithm 1: Init ialize lev el l = 1 ; 2: Init ialize the rest ser ver bandwidth for the current level s = S ; 3: Init ialize the set of the re s t o f the p eers G = 1 , 2 , · · · , N ; 4: while G is not empt y do 5: Cho ose any p eer i fro m the set G ; 6: if s ≥ r i then 7: Put Peer i in the current level l ; 8: Set G = G \{ i } ; 9: Set s = s − r i ; 10: else 11: Decomp ose Peer i into 2 sub-p eers with r (1) i = s , r (2) i = r i − s , u (1) i = min( u i , r (1) i ), u (2) i = u i − min( u i , r (1) i ); 12: Put the s ub-pee r (1) in level l and the sub-p eer (2) in level l + 1; 13: Set s = ( P Peer j in le vel l u j ) − r (2) i ; 14: Set l = l + 1; 15: Set G = G \{ i } ; 16: end i f 17: end w hile strictly hierarchical P 2P netw o rk and the le vel lo ca tion of each p eer is already g iven. T hen the g lobal optimiza- tion problem can b e deco mpos ed int o K lo cal optimization problem and a ll o f them hav e a n ana lytical “W a ter Filling” solution. In par ticular, supp ose the bandwidth of the server is S = S 0 . The download bandwidth, uploa d bandwidth and the allo cated do wnload rate of P eer i a re d i , u i and r i re- sp ectively . S j , the bandwidth of the virtual server in Lev el j , is equal to the summation o f the upload bandwidths of the p eers in Lev el j . If S j is grea ter or equal to the sum- mation of the uploa d bandwidth of all p eers in lev el j + 1, then o ne has d i ≥ r i ≥ u i and S j +1 = P Peer i in level j u i . If S j is less than the summation of the uplo a d bandwidth of all pe e r s in level j + 1, one has 0 ≤ r i ≤ u i and S j +1 = S j = P Peer i in level j r i . Therefore, no ma tter ho w to allo ca te download r ates to peer s in eac h le vel, the band- width of the virtual ser ver in each level is fixed as long as the level p ositions of peer s a re fixe d. Th us, the global minim um weigh ted av erage transmission rate pr o blem can be decompo sed to K lo cal optimization pro blem. Each of them has a fixed server bandwidth and fixed num b er o f pee rs in the lev el. Thus, if the virtua l ser ver S j is greater or equal to the summation o f the upload bandwidth of a ll pee rs in level j + 1, then the lo cal optimization pro ble m is Minimize N j +1 X i =1 w i /r i Sub ject to d i ≥ r i ≥ u i , i = 1 , 2 , · · · , N j +1 N j +1 X i =1 r i ≤ S j where N j +1 is the num b er of p eers in level j + 1, for j = 0 , · · · , K − 1. By the Karush-K uhn-T uck er conditions, the optimal so- lution is r i = √ w i R if u i ≤ √ w i R ≤ d i u i if u i > √ w i R d i if √ w i R > d i (21) where R is chosen appropr ia tely suc h that P N j +1 i =1 r i = S j . If the virtual server S j for level j + 1 is le s s than the summation of the upload bandwidth of all p eers in level j + 1 , then the loc al optimization pr oblem is Minimize N j +1 X i =1 w i /r i Sub ject to u i ≥ r i ≥ 0 , i = 1 , 2 , · · · , N j +1 N j +1 X i =1 r i ≤ S j where N j +1 is the num b er of p eers in level j + 1, for j = 0 , · · · , K − 1. By the Karush-K uhn-T uck er conditions, the optimal so- lution is r i = √ w i R if 0 ≤ √ w i R ≤ u i u i if u i < √ w i R (22) where R is chosen appropr ia tely suc h that P N j +1 i =1 r i = S j . V. Resul ts In this sectio n, we sim ulate and ev alua te the p e r for- mances of the metho ds provided in Section IV. Note that in this pa per the download bandwidth d and the upload bandwidth u are decided a t the application lay er instead of the physical lay er . Thus, the download ba ndwidth d can be contin uously distributed in a large range such as 1 0 kbps to 100 Mbps. W e a ssume that the download bandwidths d i , i = 1 , · · · , N ar e independently ident ically distributed (i.i.d.) with uniform distribution ov er [ β , 2 − β ], wher e β is a very small p ositive num b er such as 10 − 2 , 10 − 4 . This distribution has the normalized mean v alue 1 and lar ge maximum to minimum ra tio (2 − β ) /β . In practice, this parameter β ca n be determined as the minimum do wn- load bandwidth which is required by the P2P s y stem. W e also assume that the uplo ad bandwidth u i is unifor mly dis- tributed ov er [ αd i , d i ], where 0 < α < 1 is the minimum upload to download bandwidth r e quired by the P 2P sys- tem. A. A sm al l network simulation In this small simulation, the bandwidth of the server is 10 and the num b er of the p eers in the net work is N = 100. The download bandwidths d i , i = 1 , · · · , 100, are i.i.d. with uniform distribution over [0 . 01 , 1 . 99 ], i.e., β = 10 − 2 . F or ea ch peer i , the upload bandwidth is uniformly distributed over [0 . 1 d i , d i ], i.e., α = 0 . 1 . The weigh ts for all the peers ar e equal and norma lized to b e 1 / N = 1 / 100, and so P i w i = 1. Thus, the W ADT is P i w i /r i . W e will compare 7 methods in this e x per imen t. They are • 1. O ptimal solution to the conv ex optimization program with level K = 30. The conv ex prog ram solver is CVX [26]. • 2. The upper bound (17) by constructing a hier archical P2P netw o r k. • 3. The lower b ound (19) by relaxing the co nstraints. • 4. The sub optimal s olution to the 0- 1 conv ex optimiza- tion pr o blem for str ictly hiera rchical P2 P net works. The nu mber of the levels are set to b e K = 30 and w e randomly put aro und N /K p eers in each lev el. • 5. The sub optimal s olution to the 0- 1 conv ex optimiza- tion problem for str ic tly hierar chical P2P netw o rks. W e conv er t the upper -bo und-achieving hierar chical P2P net- work (Method 2) to a ne tw ork of sub-pe e rs by Algorithm 1. The p eers are placed into levels a ccording to the con- structed net work of sub-p eers, which is very close to a strictly hiera rchical P2P net work. • 6 This is a trivial upper bound suc h that the r ate o f each pee r is the same as the upload ba ndwidth. • 7 This is a trivial lo wer b ound such that the ra te o f ea ch pee r is the same as the download bandwidth. The distr ibution o f the w eighted av era ge download times of 500 exp e riments are shown in Fig. 8. The distribution of the difference and the rela tive difference betw een Method 3 and other methods are shown in Fig. 9 and Fig. 10. The weigh ted average download times o f Metho d 1 is conce n- trated in the range of [1 . 7 , 4 . 1] with mea n v alue 2 .877. Metho d 2 and Metho d 3 provide the upper bo und and low er b ound for the minimum W ADT. Fig. 8, 9, a nd 10 show that these tw o b ounds ar e v ery tight. In this cas e , the low er bo und is almost alwa ys the same as the optimal so lu- tion since the distribution curves of Method 1 and Method 3 p erfectly match. The distribution c urve of Metho d 2 is slightly different from that o f Metho d 1, whic h means that the upp er b ound is only slightly larg er than the optimal solution for mo st of the exp eriments. In this simulation, the bandwidth of the ser ver is 1 0, which is no t muc h larger than the maximum of the upload bandwidths. That is wh y the upp er b ound is still slightly different fro m the optimal solution. The distribution of Metho d 5 sho ws that in most of the expe riments, the W ADT of Metho d 5 is close to the optimal s olution, how ever, it is s ometimes muc h la r ger than the optimal solution. This is b ecause the p eer placement in Metho d 5 is usually very go o d but so metimes bad. Note that it is NP c o mplete complex to find the best peer place- men t. In order to improve Metho d 5 without incr easing the complexity , we need provide a b etter but still lo w-complex pee r place men t alg orithm. The per formance o f Metho d 4 is m uch worse than the p erformance of Method 5 b ecause the p eer placement a lg orithm is Metho d 4 is muc h worse that in Method 5. The bandwidth usage is the ratio of the to tal transmis- sion ra te and the tota l download bandwidth o f all the peer s in the netw ork . F or a fixed W ADT, it is clear that the lower bandwidth usage the b etter. Ho wever, it is a trade o ff to 0 5 10 15 0 0.05 0.1 0.15 0.2 0.25 Weighted average download time Distribution Experiment A. Method 7: trivial lower bound Method 1: optimal Method 2: tight upper bound Method 3: tight lower bound Method 5: strictly hierarchical with suboptimal placements Method 4: strictly hierarchical with random placements Method 6: trivial upper bound Fig. 8 Distribution of the W ADT for different methods. −0.5 0 0.5 1 1.5 2 2.5 3 3.5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 absolute distance of weighted average download time Distribution Experiment A. Method 7: trivial lower bound Method 1: optimal Method 2: tight upper bound Method 3: tight lower bound Method 5: strictly hierarchical with suboptimal placements Fig. 9 Distribution of the differences of the W ADT between Method 3 and other m ethods. decrease the bandwidth usage and to decrea se the W ADT, which is also v erified in Fig. 11. Fig. 11 shows the dis tri- bution of the bandwidth usage of different metho ds. The distribution of Method 1, the optimal solution, is exa c tly the same as the distribution of Metho d 3, the low er bo und. The ba ndwidth usage of Metho d 2, the upp er b ound, is slightly less than that of Method 1 and the bandwidth us- age of Method 5 is slig h tly les s than tha t o f Metho d 2. It is verified tha t the metho d with s maller W ADT alwa ys has higher bandwidth usage. The mean v alues of the weigh ted av er age download times and the bandwidth usage of differ- ent methods are listed in T able I. F or one typical exp eriment, the plots o f the vir tual server bandwidths v er sus the levels for differen t metho ds are shown in Fig. 12. F or Metho d 1, the n um b er of the lev els K is ma n ually chosen. In this exp eriment, K is 30. One ca n −0.2 0 0.2 0.4 0.6 0.8 1 1.2 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 Experiment A. relative difference of weighted average download time Distribution Method 7: trivial lower bound Method 1: optimal Method 2: tight upper bound Method 3: tight lower bound Method 5: strictly hierarchical with suboptimal placements Fig. 10 Distribution of the rela tive d ifference of the W ADT between Method 3 and other methods. 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 bandwidth usage Distribution Experiment A. Method 1: optimal Method 2: tight upper bound Method 3: tight lower bound Method 5: strictly hierarchical with suboptimal placements Method 4: strictly hierarchical with random placements Method 6: trivial upper bound Fig. 11 Distribution of the bandwidth usage for diff erent m ethods. T ABLE I The mean v a lues of the weighted a verage download times (W.A.D.T.), the normalized weighted a verage do wnload times (N.W.A.D.T.)and the bandwid th usage (B.U.)of different methods for experiment A. Metho d W.A.D.T. N.W.A .D.T. B.U. 7 2.468 0.854 1.000 3 2.877 1.000 0.650 1 2.877 1.000 0.650 2 2.947 1.025 0.633 5 3.461 1.200 0.621 4 5.338 1.849 0.471 6 6.361 2.194 0.551 0 5 10 15 20 25 30 35 −2 0 2 4 6 8 10 level bandwidth of virtual servers Experiment A. Method 1: optimal Method 2: tight upper bound Method 5: strictly hierarchical with suboptimal placements Method 4: strictly hierarchical with random placements Fig. 12 Bandwidt h of vir tual ser vers for differen t meth ods. see that the bandwidths o f the virtual servers from level 5 to level 30 are linearly decreasing to 0 for Method 1 . The bandwidth of the v irtual server g enerated by the last level is almost 0 . In other w ords, all the upload bandwidths of the server and the pe ers a re fully used. This is the rea son why the per formance of Metho d 3, the tigh t low er b ound, is almo st the same as that of Method 1 . F o r Metho d 2, the nu mber of the levels needed is automatically solved. It is 15 in this exp eriment. B. A lar ge n etwork simulation In this simulation, the bandwidth of the server is 50 and there are 4000 p eers in the net work. The download ba nd- widths d i , i = 1 , · · · , 4000 , are i.i.d. with uniform distri- bution ov e r [0 . 01 , 1 . 99 ]. The uploa d bandwidth u i is uni- formly dis tributed ov er [0 . 1 d i , d i ]. The weigh ts for all the pee rs a re equal and nor malized to be 1 / N = 1 / 40 00, and so P i w i = 1. The distr ibution o f the w eighted av era ge download times of 80 0 exp eriments ar e shown in Fig. 1 3. The distribu- tion of the difference and the rela tiv e difference b etw een Metho d 3 and other metho ds a r e shown in Fig. 14 and Fig. 15. These figures show that the low er bound and the upper bound provided by Metho d 3 and Metho d 2 are very close. The p erformance of Metho d 1 should b e betw een these tw o bo unds, a lthough we don’t simulate Metho d 1 in this case. In this simulation, the bandwidth of the server is 50 , which is muc h larger than the maximum of the up- load bandwidths. That is why S ≃ S − max i ( u i ) and the upper bo und is almost the same as the low er bo und. The per formance o f Metho d 5 is worse than that of Metho d 2 but still a lot b etter that of Metho d 6 a nd 7. The bandwidth us a ges o f these metho ds a re shown in Fig. 16. The distribution of Metho d 2 is a lmost the same as the distribution o f Metho d 3, which verifies the almost same pe rformance of Method 2 a nd 3. The mean v alues of 2 3 4 5 6 7 8 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 Weighted average download time Distribution Experiment B. Method 7: trivial lower bound Method 2: tight upper bound Method 3: tight lower bound Method 5: strictly hierarchical with suboptimal placements Method 4: strictly hierarchical with random placements Method 6: trivial upper bound Fig. 13 Distribution of the W ADT for different m ethods. −2 −1 0 1 2 3 4 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 difference of weighted average download time Distribution Experiment B. Method 7: trivial lower bound Method 2: tight upper bound Method 3: tight lower bound Method 5: strictly hierarchical with suboptimal placements Method 4: strictly hierarchical with random placements Method 6: trivial upper bound Fig. 14 Distribution of the differences of the W ADT between Method 3 and other methods. the weight ed av erage do wnload times and the bandwidth usage o f different metho ds a re listed in T able II . Co m bining the simulation results, the comparis on of these 7 metho ds in different criteria a re listed in T a ble I I I. VI. Conclusions This pap er pro p os es a n analytical framework for peer -to- pee r (P2P) net works and in tro duces schemes for building P2P net works to a pproach the minimum w e ighted av erage download time (W ADT). In the considered P2P framework, the server, which has the information of all the download bandwidths and upload bandwidths of the pee r s, minimizes the weigh ted av era ge download time b y determining the optimal transmission rate from the server to the pe ers and from the peers to the other p eers. This pap er first defines the static P2 P netw or k, the hi- −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 relative difference of weighted average download time Distribution Experiment B. Method 7: trivial lower bound Method 2: tight upper bound Method 3: tight lower bound Method 5: strictly hierarchical with suboptimal placements Method 4: strictly hierarchical with random placements Method 6: trivial upper bound Fig. 15 Distribution of the rela tive diff erence of the W ADT between Method 3 and other methods. 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 bandwidth usage Distribution Experiment B. Method 2: tight upper bound Method 3: tight lower bound Method 5: strictly hierarchical with suboptimal placements Method 4: strictly hierarchical with random placements Method 6: trivial upper bound Fig. 16 Distribution of the bandwidth usage for diff erent m ethods. T ABLE I I The mean v alues of the weighted a verage download times (W.A.D.T.), the normalized weighted a verage do wnload times (N.W.A.D.T .)and the bandwid th usa ge (B.U.)of different methods for ex periment B. Metho d W.A.D.T. N.W.A.D.T. B.U. 7 2.659 0.6898 1.000 3 3.854 1.000 0.562 1 - - - 2 3.870 1.041 0.562 5 4.666 1.210 0.552 4 6.709 1.740 0.438 6 6.804 1.765 0.550 T ABLE I I I Comp arison of the methods in the criteria of the weighted a verage do wnload time (W. A.D.T.), the b andwidt h usage (B.U.), the complexity of the comput a tion in the ser v er (S . Comp.) and the complexity of the algorithms in peers (P. Comp.) Metho d W.A.D.T. B.U. S. Comp. P . Comp. 1 Optimal Highest O ( K 3 N 3 ) High 2 Almost Opt. V e ry High O ( N ) Low 5 Go o d High O ( N ) Low 4 Bad Low O ( N ) Low 6 Bad Low O ( N ) Low erarchical P2P netw or k and the s trictly hierarchical P2P net work and studies the graph structures o f these P 2P net- works. The main result is that an y static P 2P netw ork can be decomp osed in to an equiv a lent netw ork o f sub-p eers that is stric tly hierarchical. T her efore, conv ex optimization can minimize the W ADT fo r P2P net works by equiv ale n tly minimizing the W ADT for strictly hierar chical netw orks of sub-p eers . This pap er then g ives an achiev able upp e r bo und fo r minimizing W ADT by constructing a hier archi- cal P2P net work, a nd low er b o und by weak ening the c on- straints o f the con vex pro blem. B oth the upper bo und and the low er b ound ar e very tigh t. The str ictly hiera rchical P2 P net work is pr actical for pro- to col design beca use p eer selectio n algor ithms and ch unk selection algorithms can b e lo cally designed level b y level instead of globally designed. Minimizing the W ADT for strictly hierarchical netw orks is a 0-1 conv ex optimization problem. How ever, if we have assigned all p eers each to a level, then the globa l bandwidth allo cation pr oblem de- comp oses into lo cal ba ndwidth a llo cation problems at ea c h level, which have w ater-filling solutions. Several s ubop- timal p eer ass ignment algor ithms are provided and simu- lated. References [1] “Napster.”. [O nline]. A vailable: http://www.napster.c om . [2] “Gn utella.”. [Online] . Available: http://www.gnutel la.c om . [3] “KaZaA.”. [ Online]. A vailable: http://www.kazaa.c om . [4] S. A ndroutsellis-Theotokis and D. Spi nell is. “A surv ey of p eer- to-peer cont en t distri bution technologies”. ACM Compl Surveys , 36(4):335– 371, Dec. 2004. [5] J. Liu, S. G. Rao, B. Li, and H. Zhang. “Opportunities and c hallenges of p eer-to-p eer i n ternet video broadcast”. Pr o c e e dings of the IEEE, Sp e cial Issue on R e c ent A dvanc e s in Distribute d Multime dia Communic ations , 2007. [6] X. Zhang, J. Liu, B. Li, and T. S. P . Y um. “Coolstream- ing/donet: A data-driven ov erlay net wo rk for efficient live media streaming”. in Pr o c. INFOCOM’05 , 2005. [7] V. P ai, K. Kumar, K. T amilmani, V. Samb amurth y , and A. E. Mohr. “Chainsaw: Elimi nating trees fr om o verlay multicast”. in Pr o c. 4th Int. Worksh op on Pe er- to-Pe er Systems (IPTPS) , F eb. 20 05. [8] J. Li. “PeerStrea ming: A practical receive r-driven p eer-to-p eer media str eaming system”. Micr osoft, T e ch. R ep. MSR-TR-2004- 101 , Sep. 20 04. [9] Z. Xiang, Q. Zhang, W. Zhu , Z. Zhang, and Y.-Q. Zhang. “Peer- to-peer based multimedia distribution service”. IEEE T r ans. Multime dia , 6(2):343–355, Apr. 2004. [10] J. Jannotti, D. K. Gifford, K. L. Johnson, M. F. Kaashoek, and J. W. O’T o ole. “Overcast: R eliable multicasting with an ov erlay net work”. in Pr o c . of the F ourth Symp osium of Op er ating Sys- tem Design and I mplementation (OSDI) , pages 197–212, Oct. 2000. [11] Y. Chu, A. Ganjam, T. S. E . Ng, S. G. Rao, K. Sripanid- kulc hai, J. Zhan, and H. Zhang. “Early experi ence with an i n- ternet broadcast system based on ov erlay multicast ”. in Pr o c . of USENIX , 2004. [12] H. Deshpande, M. Baw a, and H. Garcia-Molina. “Streaming live media ov er a p eer-to-peer netw ork”. St anfor d Univ. Comput. Sci. Dept., T e ch. R ep. , Jun. 2001. [13] X. Jiang, Y. Dong, D. Xu, and B. Bharga v a. “Gn uStream: A P2P media streaming system protot yp e”. in P r o c. of 4th In- ternational Confer enc e on Multime dia and Exp o , Jul. 2003. [14] Y. Cui, B. Li , and K. Nahrstedt. “oStream: asynchronous streaming m ulticast in application-lay er o v erlay net works”. IEEE J. Se le ct. Ar e as Commun. , 22(1):91–1 06, Jan. 2004. [15] V. N. Padman abhan, H. J. W ang, and P . A. Chou. “Resili en t peer- to-p eer streaming”. Micr osoft, T ech. R ep. M SR-TR-2003- 11 , Mar. 2003. [16] V. N. Padmanabhan , H . J. W ang, P . A. Chou, and K. Sripanid- kulc hai. “Distributing streaming media conten t using coopera- tiv e netw or king”. in Pr o c. NOSSD A V’02 , May 2002. [17] K. Jain, L. Lov asz, and P . A. Chou. “Building scalable and robust p eer- to-peer ov erlay netw orks for broadcasting using net- wo rk co ding”. Micr osoft R ese ar ch T e chnic al R ep ort MSR-TR- 2004-135 , Dec. 2004. [18] S. Accendan ski, S. Deb, M. M edard, and R. Ko etter. “Ho w go o d is r andom linear coding based distributed net work ed storage? ”. in Pr o c. 1st Workshop on Net work Co ding, WiOpt 2005, Riva del Gar da, Italy , Apr. 2005. [19] D. Qiu and R. Srik an t. “Modeling and Performance Analysi s of BitT orrent -Like Peer-to-P eer Neto wks”. In Pr o c. of SIG- COMM04, Portland, OR , Aug. 30 - Sep. 3 2004 . [20] Z. Ge, D. R. Figueiredo, S. Jaiswal, J. Kurose, and D . T owsley. “Modeli ng p eer-peer file sharing systems”. In Article of IEEE INF OCOM , 200 3. [21] F. Clev enot and P . Nain. “A Simpl e Fluid Model for the Anal- ysis of the Squirrel P eer-to-Pee r Cac hing System”. In Article of IEEE INF OCOM , 2004. [22] Y. Chu, S. G. Rao, and H. Zhang. “A case of end system m ulti- cast”. in Joint Int’l Conf. M e asur ement and M o deling of Com- puter Systems (SIGMETRICS) , Jun. 2000. [23] S. W ee, W.- T. T an, and J. Ap ostolopoulos. Infr astructur e-Base d Str e aming Me dia Overlay Networks . i n M. v an der Sc haar and P . Chou (eds.), Multimedia ov er IP and Wireless Netw orks: Com- pression, Netw orking, and Systems, Academic Pr ess, 2007. [24] J. Pou welse, P . Garbac ki, J. W ang, A. Bakk er, J. Y ang, A . Iosup, D. Ep ema, M. Reinders, M. v an Steen, and H. Sips. “T ribler: A social - based Peer-to-P eer system”. The 5th International Work- shop on Pe er-to-Pe er Systems , 2006. [25] S. Boyd and L. V andenberghe. Convex Optimization . Cambridge Univ. Press, 2004. [26] M. Grant , S. B oyd and Y. Y e. “CVX: Matlab Softw are for Disciplined Con vex Programming.”. [Online ]. A vailable: http://www.stanfor d.e du/ ∼ b oyd/cvx .
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment